Operating System - HP-UX
1844192 Members
2331 Online
110229 Solutions
New Discussion

Re: Monitor system performance

 
SOLVED
Go to solution
Vic S. Kelan
Regular Advisor

Monitor system performance

Just wondering if anybody has a script that will monitor and capture to a file that I could use to make a chart my memory, CPU and disk utilization every 1hour? Also If this script can be run by non-root user?
I have glance but of course can only see at a point in time and I am having an unusual spike in memory and disk utilization.
Thanks!!
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Monitor system performance

Shalom Vic,

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

You will need to modify it slightly to make it work. It is designed to collect the info you desire in the background.

Most of it should work with a non-root user.

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
Ty Roberts
Frequent Advisor

Re: Monitor system performance

Here is a script I use to capture CPU load, Memory Usage and Waiting on IO percentage. I load it into a DB and graph out everything for easy viewing. You will have to change user names and passwords to suit your needs, obviously, but it should work.

Good luck!
Ty
Vic S. Kelan
Regular Advisor

Re: Monitor system performance

Hey! Thanks very useful tips, any addition from anybody out there will be helpfull too!!
Geoff Wild
Honored Contributor

Re: Monitor system performance

If you have glance plus pak, then you can use extract:

55 23 * * 1-5 /opt/perf/bin/extract -xp -r /home/gwild/zgbltemplate -g -b today 7:00 -e today 18:00 -f stdout | /bin/mailx -s 'svr004 performance report' sysadm >/tmp/performance.log 2>&1


# cat /home/gwild/zgbltemplate
REPORT "MWA Export on !SYSTEM_ID"
FORMAT ASCII
HEADINGS ON
SEPARATOR="|"
SUMMARY=60
MISSING=0
DATA TYPE GLOBAL
YEAR
DATE
TIME
GBL_CPU_TOTAL_UTIL
GBL_CPU_SYS_MODE_UTIL
GBL_CPU_USER_MODE_UTIL
GBL_CPU_SYSCALL_UTIL
GBL_CPU_INTERRUPT_UTIL
GBL_PRI_QUEUE
GBL_CPU_CSWITCH_UTIL
GBL_SWAP_SPACE_UTIL
GBL_DISK_UTIL_PEAK
GBL_DISK_SUBSYSTEM_QUEUE
GBL_MEM_UTIL
GBL_MEM_CACHE_HIT_PCT
GBL_MEM_PAGEOUT_RATE
GBL_MEM_SWAPOUT_RATE
GBL_MEM_QUEUE
GBL_NET_PACKET_RATE
GBL_NET_OUTQUEUE
GBL_NETWORK_SUBSYSTEM_QUEUE

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jannik
Honored Contributor

Re: Monitor system performance

Even if this document is for solaris i find it usefull for all UNIX variations some more that others :-).
http://www.adminschoice.com/docs/iostat_vmstat_netstat.htm

It will give some knowhow as to how the standard UNIX performance tools works.
jaton
Arturo Galbiati
Esteemed Contributor

Re: Monitor system performance

Hi,
I'm using glance in adviser_only mode to registser in a file CPu, disk, memory e swap utilization.
See teh attached script.
It uses this gln_syntax_file:
print "-- ",
gbl_statdate,
" ",
gbl_stattime,
" ",
gbl_cpu_total_util|3|0,
" ",
gbl_disk_util_peak|3|0,
" ",
gbl_mem_util|3|0,
" ",
gbl_swap_space_util|3|0


HTH,
Art