Operating System - HP-UX
1827769 Members
2760 Online
109969 Solutions
New Discussion

cpu memory and disk utilization

 
SOLVED
Go to solution
Ahmed_58
Regular Advisor

cpu memory and disk utilization

Hi,
I need to run sort of script to log cpu, memory & disk utilizatin as shown in glance to a file for approx. one hour, anyone hav somthing ready to use.

Ahmed
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: cpu memory and disk utilization

Shalom Ahmed,

http://www.hpux.ws/system.perf.sh

Collects them in the background to the /tmp filesystem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Asif Sharif
Honored Contributor

Re: cpu memory and disk utilization

Hi Steven,

Nice script. It will help in future.

Regards,
Asif Sharif
Regards,
Asif Sharif
Ahmed_58
Regular Advisor

Re: cpu memory and disk utilization

steven,
U r the best...
How can I stop it ?
Ahmed
Arunvijai_4
Honored Contributor

Re: cpu memory and disk utilization

Hi Ahmed,

You can check this thread,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=991381

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steven E. Protter
Exalted Contributor

Re: cpu memory and disk utilization

Ahmed,

It stops itself.

nohup sar -qM 1 600 > /tmp/HP_perf_info.report &

This says run it for 600 seconds.

I normally change the stock code to look like this:

# $1 must be run time in seconds
RT=$1

uname -a > /tmp/HP_info
model >> /tmp/HP_info
uptime >> /tmp/HP_info
swlist -l bundle >> /tmp/HP_info
bdf >> /tmp/HP_info
swapinfo -ta >> /tmp/HP_info
cat /etc/fstab >> /tmp/HP_info
lvlnboot -v >> /tmp/HP_info
vgdisplay -v >> /tmp/HP_info
lanscan >> /tmp/HP_info
ioscan -fn >> /tmp/HP_info
cat /etc/inittab >> /tmp/HP_info
dmesg >> /tmp/HP_info
crontab -l >> /tmp/HP_info
swlist -l fileset >> /tmp/HP_info
/usr/bin/top -f /tmp/HP_perf_info
cat /stand/system >> /tmp/HP_perf_info
nohup sar -qM 1 $RT > /tmp/HP_perf_info.report &
nohup sar -uM 1 $RT > /tmp/HP_perf_info.cpu &
nohup sar -b 1 $RT > /tmp/HP_perf_info.buffer &
nohup sar -d 1 $RT > /tmp/HP_perf_info.disk &
nohup sar -w 1 $RT > /tmp/HP_perf_info.swap &
nohup sar -v 1 $RT > /tmp/HP_perf_info.inode &
sysdef >> /tmp/HP_perf_info


Why I've not changed the version on my website, I don't know.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ahmed_58
Regular Advisor

Re: cpu memory and disk utilization

Steve,
How can I use ur script to have every say 5 minutes intervel.
by the way I can't see for memory usage?

Thanks Ahmed