- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Memory and resource monitoring scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 03:46 PM
тАО04-20-2005 03:46 PM
We have Oracle Database sitting on HP 5470 running HP-UX 11i. I need to monitor the memory usage & cpu load of the system on regular basis for getting baseline statistics. I am a novice in term HP-UX, I have worked with Solaris and Linux extensively. Is there a tool like Linux's free or top by which I can easily get information about the usage of memory & cpu and can be used in scripts?
I already tried glance, top for cpu and memory and swapinfo -M for memory, but these show different Information. I am not sure which to trust.
Someone please help me on this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:01 PM
тАО04-20-2005 04:01 PM
Re: Memory and resource monitoring scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:09 PM
тАО04-20-2005 04:09 PM
Re: Memory and resource monitoring scripts
Thanks for the prompt response. I am using a script which does this,
glance -m -j 2 -iterations 2 -f output_file > /dev/null
which emails me the content of the file, but the contents are huge, all I need is small amount of information. the CPU load and memory utilization, its gives me two cycles of their usage, all i need is point in time use. any advice on this.
Any help is much appreciated.
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:17 PM
тАО04-20-2005 04:17 PM
Re: Memory and resource monitoring scripts
Other thing i would suggest is to write custom script to run from cron to collect the CPU load and memory usage by doing
uptime| cut -f2 -dl |cut -f2 -d: | cut -f1 -d, |awk '{print $1}'
swapinfo -t |grep ^total | awk '{print $5}' | cut -f1 -d%
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:21 PM
тАО04-20-2005 04:21 PM
Re: Memory and resource monitoring scripts
Are you talking about Linux or HP-UX? Linux I can manage very well. HP-UX I have no experience on it.
Thanks,
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:36 PM
тАО04-20-2005 04:36 PM
Re: Memory and resource monitoring scripts
I tried the commands you gave. They work but unfortunately I find it that the figure shown in swapinfo is weird and diff from the one shown in top and glance. Isn't there good tool which can tell me what exactly is happening?
thanks,
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:38 PM
тАО04-20-2005 04:38 PM
Re: Memory and resource monitoring scripts
And the script i was talking about is for HPUX, you use swapinfo to see the memory usage and uptime to see the CPU load and by cutting the desired field you get the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:42 PM
тАО04-20-2005 04:42 PM
Re: Memory and resource monitoring scripts
$ cat temp
print "Global memory utilisation =", gbl_mem_util
print "Global priority queue =", gbl_pri_queue
$ glance -adviser_only -syntax temp -j 5 -iterations 1 > outfile 2>&1
Even if you specify one iteration you will get minimum of 2.
List of all metrics that can be used on HP-UX is in
/opt/perf/paperdocs/mwa/C/methp.txt
See /var/opt/perf/adviser.syntax for some more examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2005 04:27 PM
тАО04-21-2005 04:27 PM
Solution1. use ADB
#!/sbin/sh
Getdate='date +%Y%m%d'
echo "phys_mem_pages/D" | adb /stand/vmunix /dev/kmem>>/script/mon/mem.Getdate
echo "freemem/D" | adb /stand/vmunix /dev/kmem>>/script/mon/mem.Getdate
2. Use glance at adviser mode
- set crontab
0 * * * * sh /home/script/glance.sh
- contents of glance.sh
GetDate=`date +"%Y%m%d"`
LOG_NM=/home/sysopr1/script/glance/glance.$GetDate
/opt/perf/bin/glance -adviser_only -syntax /home/script/glance.cf -iterations 12 -j 300 >>$LOG_NM
- contents of glance.cf
PRINT " ", gbl_statdate, " ", gbl_stattime
PRINT "------------------------------------------------------------------------------------"
PRINT "System Memory: ", gbl_mem_sys
PRINT "Buffer Cache: ", gbl_mem_cache
PRINT "User Memory: ", gbl_mem_user
PRINT "Free Memory: ", gbl_mem_free
PRINT "-------------------------------"
PRINT "Total Physical Memory: ", gbl_mem_phys
PRINT ""
PRINT "===================================================================================="
PRINT "Process Name PID RSS VSS SHMEM Region RSS SHMEM Region VSS"
PRINT "===================================================================================="
PROCESS LOOP
{
flag="off"
PROC_REGION LOOP
{
IF (proc_region_type == "SHMEM") THEN
flag="on"
}
IF (flag == "on") THEN
{
PRINT proc_proc_name, proc_proc_id, proc_mem_res, proc_mem_virt
PROC_REGION LOOP
{
IF (proc_region_type == "SHMEM") THEN
PRINT " ", proc_region_res, " ",
proc_region_virt
}
PRINT "------------------------------------------------------------------------------------"
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2005 02:56 AM
тАО04-22-2005 02:56 AM
Re: Memory and resource monitoring scripts
Yes, in HP-UX there is a top command. It doesn't, in my opinion provide a whole lot about memory usage. Glance, which has a cousin Glance/iX in MPE, does do a fairly good job. At a former employer, we used MetaView from Lund Performance Solutions as an independent verifier of top. We were quite happy with MetaView as it has some really cool extra stuff for performance alerts.
HTH,
Chuck Ciesinski
Ps www.lund.com is the website for looking at the Lund tools.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2005 04:08 AM
тАО04-22-2005 04:08 AM
Re: Memory and resource monitoring scripts
# memdetail
Memory Stat total used avail %used
physical 10080.0 7666.2 2413.8 76%
active virtual 6968.7 1014.2 5954.6 15%
active real 5073.5 578.1 4495.4 11%
memory swap 7707.8 1714.0 5993.8 22%
device swap 28080.0 6669.1 21410.9 24%
Also - if you have Measurware - you can extract data like so:
Root Cron:
55 23 * * 1-5 [ -d /oracle/PR/920_64 ] && /opt/perf/bin/extract -xp -r /home/gwild/zgbltemplate -g -b today 7:00 -e today 18:00 -f stdout | /bin/mailx -s 'svr003 performance report' gwild >/dev/null 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_MEM_UTIL
GBL_SWAP_SPACE_UTIL
GBL_MEM_CACHE_HIT_PCT
GBL_DISK_UTIL_PEAK
GBL_FS_SPACE_UTIL_PEAK
GBL_MEM_PAGEOUT_RATE
GBL_MEM_SWAPOUT_RATE
GBL_MEM_QUEUE
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2005 07:31 PM
тАО04-25-2005 07:31 PM
Re: Memory and resource monitoring scripts
Thanks a lot for all the help I got for this issue. I got a lot of data and found a lot issues in my HP-UX installation.
regards,
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2005 07:33 PM
тАО04-25-2005 07:33 PM
Re: Memory and resource monitoring scripts
I am closing this thread, got a lot of useful information.
thanks
Suresh