- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Percent cpu utilization per process
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
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
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
10-20-2005 10:01 PM
10-20-2005 10:01 PM
Percent cpu utilization per process
I'm porting a ksh script written to monitor the percent cpu utilization and percent memory utilization for certain process in the process table on Tru64 Unix. This script uses ps auxw command to get the %cpu and %memory utilization for all the processe in the ps table. Is there a equivalent command I can use on HP-UX to get the %CPU utilization and %memory utilization. HP-UX version HP-UX B 11.23.
Regards
Kaushik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:03 PM
10-20-2005 10:03 PM
Re: Percent cpu utilization per process
a) top
b) UNIX95= ps -ef -o cpu,pcpu,pid,comm (cpu %)
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:04 PM
10-20-2005 10:04 PM
Re: Percent cpu utilization per process
"man ps" - for more options.
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:04 PM
10-20-2005 10:04 PM
Re: Percent cpu utilization per process
See
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=964927
for details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:06 PM
10-20-2005 10:06 PM
Re: Percent cpu utilization per process
# UNIX95= ps -ef -o cpu,pcpu,pid,sz,vsz,comm gives that.
# glance may give (Don't know)
# openview + extract may give that too.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:16 PM
10-20-2005 10:16 PM
Re: Percent cpu utilization per process
Also checkout some performance tools for HP-UX
http://h21007.www2.hp.com/dspp/dld/dld_DownloadsListingPage_IDX/1,2381,11169,00.html
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:22 PM
10-20-2005 10:22 PM
Re: Percent cpu utilization per process
Using export UNIX95=true
ps ps -ef -o uid,pid,pcpu,vsz,sz,state,stime,time,comm
gives me the %CPU. I dont see any arguments to find the %MEM.
Regards
Kaushik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:31 PM
10-20-2005 10:31 PM
Re: Percent cpu utilization per process
You can only get %CPU statistics. You can memory size utilization but not the %MEM statistics.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:32 PM
10-20-2005 10:32 PM
Re: Percent cpu utilization per process
sz - The size in physical pages of the core image of the process, including text, data, and stack space. Physical page size is defined by _SC_PAGE_SIZE in the header file.
vsz - The size in kilobytes (1024 byte units) of the core image of the process.
(from man)
Alex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:38 PM
10-20-2005 10:38 PM
Re: Percent cpu utilization per process
Thanks for all your quick replies.
Heres a sample of what I get from ps auxw on Tru64
USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND
root 274249 20.5 1.6 73.2M 66M ?? S Mar 02 2-00:28:26 /usr/sbin/cron
kaushik 230295 0.3 0.0 11.2M 1.6M ?? S 09:41:37 0:03.35 /usr/dt/bin/dtterm -ls
root 292798 0.1 0.0 2.61M 328K pts/5 S 11:19:59 0:00.02 ksh
I extract column 3 and column 4 as a routine monitoring. If either the CPU util or the MEM util exceeds a certain limit I need to raise a trap.
The ps command indeed solves the problem of %CPU. I have not found anything in the ps man pages to give me the %MEM per process.
Thanks and regards
Kaushik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:44 PM
10-20-2005 10:44 PM
Re: Percent cpu utilization per process
http://www.circle4.com/jaqui/papers/cmgunixp.html
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:50 PM
10-20-2005 10:50 PM
Re: Percent cpu utilization per process
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40G_HTML/MAN/MAN1/0287____.HTM
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2005 10:50 PM
10-20-2005 10:50 PM
Re: Percent cpu utilization per process
(proc mem / total mem) * 100
Alex.