#1 22 Aug 2011 13:03

sarbjitsinghgill
Member
From: TORONTO CANADA
Registered: 09 Dec 2007
Posts: 112
Website

Watch cpu,disk and network on AIX ??

Friends,

I am new to AIX.

I need to monitor cpu disk and network for few db2 V8.2 and db2 V9.1 servers on AIX 5.3.
This has to be monitored for a week to capture peak hour stats.

Can someone help me with any commands/scripts for this.

Thanks

sarbjitsinghgill


Sarbjit Singh Gill
IBM certified DBA, MQ Solution Developer

Offline

#2 02 Nov 2011 07:36

ramesh.subbu.2005
Member
From: ECIL
Registered: 01 Nov 2011
Posts: 6

Re: Watch cpu,disk and network on AIX ??

For process details use this

this script writes the process information to file for every 15 min run it as daemon(background)

#!/bin/sh

while [ : ]
do
        date >>/home/user/process
        df -k >>/home/user/process
        netstat >>/home/user/process

        ps -eao comm,pid,etime,thcount,vsz,rssize |grep "processname">>/home/user/process
        sleep 900
done

exit 0


Regards,
Ramesh pasunoori

Offline

#3 02 Nov 2011 17:59

sarbjitsinghgill
Member
From: TORONTO CANADA
Registered: 09 Dec 2007
Posts: 112
Website

Re: Watch cpu,disk and network on AIX ??

Thank you Ramesh,

Now that you joined this forum, I am glad that we will get answres really quick !!

I will try to test these if it gives me a feasible solution, I have another question.

cpu % usage - I am using   iostat -t and adding up %user and %sys

this figure is usually lot lower than actual. On dev server it gives me 28% whereas if I load topas it gives me over 80%.

topas has no option to log this to textfile.

What can be my option to get close to accurate number.

Thanks for your response
Sarbjit


Sarbjit Singh Gill
IBM certified DBA, MQ Solution Developer

Offline

#4 04 Nov 2011 04:49

ramesh.subbu.2005
Member
From: ECIL
Registered: 01 Nov 2011
Posts: 6

Re: Watch cpu,disk and network on AIX ??

Hi Sarbjit

use the Below command
header :- cpu  min  maj  mpc  int   cs  ics   rq  mig lpa sysc us sy wt id   pc

mpstat 1 100 |grep ALL

Fields from ending 5,4 gives the entire system CPU utilization (user and sys).


Thanking you
Ramesh

Offline

#5 04 Nov 2011 12:50

sarbjitsinghgill
Member
From: TORONTO CANADA
Registered: 09 Dec 2007
Posts: 112
Website

Re: Watch cpu,disk and network on AIX ??

Great, is the your idea here, otherwise the % cpu utilization output is same as iostat.
Thanks for the line you posted.

mpstat 1 100 |grep ALL

I will use this as

mpstat 1 100 | grep ALL | awk '{sum=$12+$13;print sum}'

Now as my last requirement is to take the average of %tm_act on disk subsystem. That will complete my immediate assignment.

What I am thinking to do is iostat  and sum up % tm_act  and tps columns to keep track of the disk io subsystem contention.

Is this right way, or any other more accurate soln is available.

Parallelly, I do have HP-UX system, it would be nicer if my script can work on those systems.

Thanks Sir,
Sarbjit Singh Gill


Sarbjit Singh Gill
IBM certified DBA, MQ Solution Developer

Offline

#6 04 Nov 2011 13:41

ramesh.subbu.2005
Member
From: ECIL
Registered: 01 Nov 2011
Posts: 6

Re: Watch cpu,disk and network on AIX ??

In your systems sar command is available then check it.
use can use command like sar -d 1 1

I think we should not sum the both u directly use only %tm_act


Regards,
Ramesh

Offline

#7 04 Nov 2011 14:17

sarbjitsinghgill
Member
From: TORONTO CANADA
Registered: 09 Dec 2007
Posts: 112
Website

Re: Watch cpu,disk and network on AIX ??

ramesh.subbu.2005 wrote:

In your systems sar command is available then check it.
use can use command like sar -d 1 1

I think we should not sum the both u directly use only %tm_act


Regards,
Ramesh

Could not use sar

ibm06:/home/sgil $ sar -d 1 1
sar: The file access permissions do not allow the specified action.

This can be resolved somehow, where could be sar data file that I can check to resolve the access issue ?

Yes I could use %tm_act and %tps for historical trail - to indicate the load on the sub-system.


Regards


Sarbjit Singh Gill
IBM certified DBA, MQ Solution Developer

Offline

#8 04 Nov 2011 14:23

sarbjitsinghgill
Member
From: TORONTO CANADA
Registered: 09 Dec 2007
Posts: 112
Website

Re: Watch cpu,disk and network on AIX ??

on HP-UX, however

[/home/prod/sgil]$ sar -d 1 1

HP-UX hp25v02 B.11.11 U 9000/800    11/04/11

09:10:43   device   %busy   avque   r+w/s  blks/s  avwait  avserv
09:10:44   c0t8d0    1.98    0.50       2      16    0.00   12.89
          c0t10d0    0.99    0.50       2      16    0.00    5.47


Sarbjit Singh Gill
IBM certified DBA, MQ Solution Developer

Offline

Board footer

Powered by FluxBB