AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Need some help for AIX performance monitoring

    Posted Thu April 21, 2011 01:44 PM

    Originally posted by: SystemAdmin


    Hello
    I am new user of AIX; I have only basic knowledge of the UNIX commands, and I want to create script that will monitor the performance and resources usage on AIX 6.1 machine.
    Basically I wan to start a loop that will grab, every 10 seconds, the CPU usage, the memory usage, the disk usage, and the Network usage (especially the number of TCP connections that are not completely closed). And create an HTTP POST with all those information to send it to another machine on the same network.
    I started the script after looking in some example in the internet, but I ma not sure if what I did until now is correct. Any help or ideas are welcome.

    Thank you

    ##############################################
    1. Script:
    #################################################

    #Script to monitor Machine resources.

    1. Start loop

    #Get CPU usage
    cpu_usage = vmstat 1 1 |tail -1 | awk {'print $14'}
    cpu_user_usage = sar -u 1 1 |tail -1 | awk {'print $2'}

    #Get memory (RAM) usage
    mem_usage = svmon -G | tail -1 | awk {'print $3'}
    ((mem_usage = mem_usage / 256))

    mem_total=`lsattr -El sys0 -a realmem | awk {'print $2'}`
    ((mem_total = mem_total / 1000))
    ((mem_free = mem_total - mem_usage))

    #Get Disk usage
    #Get Network usage
    #Get Time
    #Get machine name
    #Create HTTP request params
    #Send HTTP request to Monitoring machine
    1. end loop


  • 2.  Re: Need some help for AIX performance monitoring

    Posted Thu April 21, 2011 01:52 PM

    Originally posted by: unixgrl


    Instead of writing this yourself, look at "nmon" which will do most of the data collection for you and can be formatted in various ways. You can also use open-source Ganglia tool to make really cool webpages with the nmon data.
    I think there is a while Forum topic devoted to nmon so hunt around.


  • 3.  Re: Need some help for AIX performance monitoring

    Posted Thu April 21, 2011 05:42 PM

    Originally posted by: SystemAdmin


    Thank you very much
    I will try this path.