sarbjitsinghgill
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
----------------------------
#2 02 Nov 2011 07:36
ramesh.subbu.2005
For process details use this
this script writes the process information to file for every 15 min run it as daemon(background)
Code: Select all
#!/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
Ramesh pasunoori
----------------------------
#3 02 Nov 2011 17:59
sarbjitsinghgill
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
----------------------------
#4 04 Nov 2011 04:49
ramesh.subbu.2005
Hi Sarbjit
use the Below command
Code: Select all
header :- cpu min maj mpc int cs ics rq mig lpa sysc us sy wt id pc
mpstat 1 100 |grep ALL
Thanking you
Ramesh
----------------------------
#5 04 Nov 2011 12:50
sarbjitsinghgill
Great, is the your idea here, otherwise the % cpu utilization output is same as iostat.
Thanks for the line you posted.
Code: Select all
mpstat 1 100 |grep ALL
Code: Select all
mpstat 1 100 | grep ALL | awk '{sum=$12+$13;print sum}'
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
----------------------------
#6 04 Nov 2011 13:41
ramesh.subbu.2005
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
----------------------------
#7 04 Nov 2011 14:17
sarbjitsinghgill
Could not use sarramesh.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
Code: Select all
ibm06:/home/sgil $ sar -d 1 1
sar: The file access permissions do not allow the specified action.
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
----------------------------
#8 04 Nov 2011 14:23
sarbjitsinghgill
on HP-UX, however
Sarbjit Singh Gill[/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
IBM certified DBA, MQ Solution Developer