shell script to capture OS and hardware details along with DB2 level and Websphere version details

Here I would like post a simple shell script which will help to capture multiple details in a test environment like ..

  1. Linux OperatingSystem name Version and level
  2. OS Bit level 
  3. Hardware (Processor) bit level
  4. DB2 Version and level
  5. Websphere version and level
  6. Hostname / IP
    The important re-usable things in shell script includes extracting the jar file contents in to a desired directory, logging the stdout (Output of shell script) on to a file, validating the number of arguments passed to a shell script etc ....

    #!/bin/sh
    # Log the stdout to a file in parameter 2
    exec 1> $2
    if [ $# != "2" ]; then
    echo "Usage: checkEnv.sh db2inst1 /opt/myEnv.log"
    exit
    else
    > $2
    chmod 777 $2
    echo "DCD Build Tested in this environment"
    for i in `find / -name MgmtCenterVersion.jar`
    do
    echo $i
    done
    jar -xvf $i
    echo "DCD Version and build number:"
    cat com/ibm/tivoli/cds/MgmtCenterVersion.properties
    rm -rf com/ META-INF/
    echo -e "\n########################################################################## "
    echo "System information :"
    uname -a
    nslookup `hostname`
    echo "Linux Level:"
    cat /etc/issue
    echo "Operating system Bit Level :"
    getconf WORD_BIT
    echo "Processor Bit Level : "
    getconf LONG_BIT
    echo "Websphere version:"
    /opt/IBM/WebSphere/AppServer/bin/versionInfo.sh
    file=`pwd`/$2
    echo $file
    echo "DB2 Version :"
    su - $1 << kris db2level >> $file
    exit
    kris
    echo "End of Script"
    fi


    Modify it according to your requirements.

    Read more


    class finder in JAR WAR EAR JarScan.jar

    It is very much important and most common for many java Developer to search for the required class file in the numurous jars/ ears / wars in the big project code base. So it is very much useful to have a handy tool like JarScan in work place. It is very simple and light weight tool which will help in searching the required class files in the big project code.
    JarScan.jar file can be downloaded from below link.
    http://www.softpedia.com/get/System/File-Management/JarScan.shtml

    JarScan helps when you are having problems finding a class that you need in order to compile your project. It will locate the class files in no time at all.
    Requirements:
    · Java 1.4 or above
    Download
     Usage : 
    1. To search class xyz
    java -jar e:\jarscan.jar -class xyz

    2.To display the help message type: 
    java -jar jarscan.jar -help OR java -jar jarscan.jar


    Hope this this helps my java mate ! :)

    Read more


    Shell script to pass arguments and validation of arguments in side shell

    The below is a simple shell script snippet which accepts two kinds of parameters(1. start 2. -start) while running.
    How to validate these parameters and how to run the shell script accordingly is the main motto :)
    set -x
    if [[ "$1" == "start" || "$1" == "-start" ]]; then
    echo "code for start action"
    else
    echo "Please input valid arguments"
    echo "Usuage: setup.sh start or setup.sh -start "
    exit
    fi

    Hope this helps in passing parameters to installer like scripts. 
    I observed the behavior of the same script differ in different shells like k shell and bash shell.
     

     
     

    Read more


    MANAGEMENT FUNCTIONS AND BEHAVIOUR (MS 1) IMP Questions and Answers

    I have compiled few improtant questions and their answers while preparing for MANAGEMENT FUNCTIONS AND BEHAVIOUR - MS 1 (MBA-IGNOU) exam. Please find the below PDF. Hope this helps :)
    MS 1 Imp Questions IGNOU MANAGEMENT FUNCTIONS AND BEHAVIOUR
    Old Papers :[1] [2]

    Read more


    How to broadcast your live video for streaming on internet ?

    How to broadcast your live streaming video on the internet ?
    This was most haunted question many computer geeks !This has made very simple with http://www.livestream.com/ .

    All you need to have is a good internet connection, Video source (Handy cam / Digi cam / Webcam / Mobile cam with supported Software) and Laptop / computer .
    http://www.ustream.tv/ is another best application which helps live streaming your events on net through phone.
    If you have an android phone you are ready to livecast your events. Log in to http://www.ustream.tv/ and create ur account and share the tube link for ur friends then install the ustream app on your android phone form market Ustream-app download for android . Now once ur 3G/Wifi connection is started on your phone you can start your own show.


    Live video by Ustream
    Once Internet is connected on your laptop login at http://www.livestream.com/ and start your own channel and start Go live and select your video source ! Thats it ! you all set to go LIVE ! :)


    kuube on livestream.com. Broadcast Live Free
    The above is my personal channel KUUBE, which K-tube for all my personal live casts !
    Today First time I tried the http://www.livestream.com/ site to broadcast my live videos.
    It is awesome and amazing. Best suits for multiple live broadcasring purposes like interacting with friends
    and live broadcasting your events like parties etc. I got this idea when most of our friends missed to attend one of my friends marriage event.
    Now there is no worry at all. You be any where just connect to http://www.livestream.com/ and broadcast your seld to be close with your loved ones.

    Below is my channel "Kuube" it is K-tube for all my live broadcasts

    Thanks you all for your great support and happy watching ... 

    Read more


    Sreesailam,Ishta kameswari,Alampur Jogulamba,Paataala Ganga, Akkamahadevi Caves

    Trip to Sreesailam, Nallamalai Ishta kameswari and Alampur Jogulamba
    This time I'm not the planner , I just joined with two of my friends who are very interested to visit this place again.
    Up on my interested request they extended the bookings for me also. Plan was simple start on Friday evening to Sreesailam by APSRTC bus and reach Sreesailam

    cover the places Sakshi Ganapati, Hatakeswaram , Lalitha peetam, phaala daara - pancha daara , sikaram and Chenchu Lakshmi Museum and visit to main temple of Sri Brahmarambika Mallikarjuna Swamy.
    And next to cover Rope way journey to paataala ganga, Trip to Damn and return journey to Karnool by bus and visit Alampur Jogulamba on the way before 10:30 to catch Bangalore express train in Karnool.

    It was well executed with out any interrupts. We reached majestic by 6 thinking that bus will leave sharply at 6:30 PM sharply. But it started at 7 PM and with many stops it reached sreesailam at 9:30 AM. Immediately with the help of a broker we got into one Lodge which was called as Telikala satram. Though we paid unnecessarily to broker we got really brand new AC room and it was a pleasure stay in between the nallamalai hills enjoying the damn view from the hotel room. Good thing is that they provided food for free.

    After quick fresh-up we started for local sight seeing to cover Sakshi Ganapati, Hatakeswaram , Lalitha peetam, phaala daara - pancha daara and sikaram by auto paying 50 INR per head. All the places are filled by Siva swamys and they were coming from different places by walk to here. As the road was single lane it was critical for drivers to drive in between. As that was shiva raatri season Temple committee started "Brahmotsavaalu" and full place was crowded with many groups performing different arts in front of Lord shiva. By 1 PM we finished visiting these places and lunch, next plan is to reach  NallaMala Ishta kameswari temple by commander jeeps. We were just three people and we have to wait for the jeep to fill minimum 10 people. They were charing around 250 per head and finally around at 2:45 pm we were able to start to that place and the whole road is full of rocks and the road was a difficult for any body to drive, I can say it's a good adventurous journey. I thoroughly enjoyed the ride and the scenic place near the temple.

    The ishta kameswari Deity was so beautiful and the temple was very very small. Any body has to bow-down their head and enter in the temple. Finally we were able to return to lodge by 6:45 pm.
    And after fresh-up we visited the main temple and then returned to room and took rest.

    The next day early morning we got fresh-up and went to main temple for darshan of Sreesaila Jyotirling and visited "Vrudda mallana" and other small temples inside the premises.Then after breakfast we went to patalaganga by rope-way and visited damn by boat. From there AP tourism is providing packaged tours to Akkamahadevi caves which are quite famous in this place but due to lack of time we couldn't go there.

    Finally we returned home and packed-up luggage to catch the Karnool bus. Luckily with uma maheswara swamy blessings we three got seats in the bus. We reached karnool town around at 5 PM , immediately from bus stop we hired one auto to go to Jogulamba temple in alampur for 400 INR. We reached the temple premises very quickly in less than 40 mins due to the village routes chosen by driver.

    Jogulamba temple in alampur is one of the powerful temple among the ashtadasa shakti peetas. There were no bounds to my joy when I see the Tungabadra river in the the evening just beside the temple. It's really worthy trip at the end.

    Read more

    Popular Posts

    Enter your email address:

    Buffs ...

    Tags


    Powered by WidgetsForFree