HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: monitoring CPU and Memory usage for applicatio...
Operating System - HP-UX
1834935
Members
2479
Online
110071
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
10-11-2007 05:46 AM
10-11-2007 05:46 AM
Hi All,
We are conducting UAT for one of the application to be soon deployed to production.
I need to monitor the CPU and Memory usage for this application processes when UAT is going on.
Anyone out there give me some tips?
Is there way to run top command in a script and send the output to a file?
Any tips are appreciated.
HP-UX 11.23.
We are conducting UAT for one of the application to be soon deployed to production.
I need to monitor the CPU and Memory usage for this application processes when UAT is going on.
Anyone out there give me some tips?
Is there way to run top command in a script and send the output to a file?
Any tips are appreciated.
HP-UX 11.23.
be good and do good
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2007 05:51 AM
10-11-2007 05:51 AM
Solution
top -d 1 -f /path/to/somefilename.out
Rgds...Geoff
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2007 05:58 AM
10-11-2007 05:58 AM
Re: monitoring CPU and Memory usage for application processes
Here's some other scripts that you may want to use:
# cat /usr/local/bin/usermem
#!/bin/ksh
# usermem - display memory claimed by a user
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "usermem \"userid\""
echo "Example:"
echo "usermem gwild"
exit 1
fi
echo " "
USER=$1
t=0
for j in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep " $USER " | awk '{print $1}'`
do
t=`expr $t + $j`
done
echo "\nMemory claimed by $USER: $t Kbytes.\n"
Attached is the c source for memdetail - just compile with the built in hp compiler...
Also, I use mwa to collect info...
From root's cron:
# performance
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 'SAP Server performance report' sysadm >/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_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
# cat /usr/local/bin/usermem
#!/bin/ksh
# usermem - display memory claimed by a user
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "usermem \"userid\""
echo "Example:"
echo "usermem gwild"
exit 1
fi
echo " "
USER=$1
t=0
for j in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep " $USER " | awk '{print $1}'`
do
t=`expr $t + $j`
done
echo "\nMemory claimed by $USER: $t Kbytes.\n"
Attached is the c source for memdetail - just compile with the built in hp compiler...
Also, I use mwa to collect info...
From root's cron:
# performance
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 'SAP Server performance report' sysadm >/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_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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2007 07:53 PM
10-11-2007 07:53 PM
Re: monitoring CPU and Memory usage for application processes
HI,
some useful links:
http://h20331.www2.hp.com/Hpsub/cache/286022-0-0-225-121.html
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1161688&admit=-682735245+1190100634357+28353475
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1077655&admit=-682735245+1164099581655+28353475
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1060606&admit=-682735245+1158564478357+28353475
HTH,
Art
some useful links:
http://h20331.www2.hp.com/Hpsub/cache/286022-0-0-225-121.html
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1161688&admit=-682735245+1190100634357+28353475
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1077655&admit=-682735245+1164099581655+28353475
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1060606&admit=-682735245+1158564478357+28353475
HTH,
Art
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP