- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ps command and %CPU
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
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
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
тАО02-01-2005 12:29 AM
тАО02-01-2005 12:29 AM
I would like monitoring some proceses and I need to know the %CPU used.
With Solaris I can used the ps -aux command but it doesn't display %CPU field on HP-UX...
Someone can help me ?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:31 AM
тАО02-01-2005 12:31 AM
Re: ps command and %CPU
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
root 1617 2.1 22.8926424916624 ? S Jan 26 1949:14 /opt/eh55/bin/sys/
root 5252 0.1 0.1 1816 1344 pts/1 O 13:30:28 0:00 /usr/ucb/ps -aux
root 3 0.1 0.0 0 0 ? S Jan 26 15:20 fsflush
eh 1618 0.1 2.310068892960 ? S Jan 26 12:15 /opt/eh55/bin/sys/
root 463 0.0 0.312944 8992 ? S Jan 26 5:50 /opt/VRTSvmsa/jre/
root 2841 0.0 0.1 5840 2336 ? S 13:08:40 0:00 /usr/local/sbin/ss
root 5251 0.0 0.1 1248 992 pts/1 S 13:30:28 0:00 more
root 0 0.0 0.0 0 0 ? T Jan 26 0:00 sched
root 1 0.0 0.0 888 368 ? S Jan 26 2:26 /etc/init -
I would like the field %CPU
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:35 AM
тАО02-01-2005 12:35 AM
Re: ps command and %CPU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:35 AM
тАО02-01-2005 12:35 AM
Re: ps command and %CPU
the top command in hpux can tell you the % usage of a process.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:39 AM
тАО02-01-2005 12:39 AM
Re: ps command and %CPU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 12:53 AM
тАО02-01-2005 12:53 AM
Re: ps command and %CPU
It works properly.
Could you please explain me what does ti mean "UNIX95=" ?
And what I have some results up to 100%... for instanca I have a process which used 201.5 % of CPU ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 01:00 AM
тАО02-01-2005 01:00 AM
Re: ps command and %CPU
I use the following:
ps -ef | cut -c42-80 | sort -nr | head
This will list the top 10 processes by CPU from the PS command.
I'll use it a few times in a row to see what's eating the CPU right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 01:09 AM
тАО02-01-2005 01:09 AM
Re: ps command and %CPU
You will have more than 100% CPU depending on how many CPUs you have. If you have 8 CPUs, you can run up to 800%.
The UNIX95 variable is set to enable XPG4 compatibility with certain commands. See 'man ps' for more information
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2005 01:26 AM
тАО02-01-2005 01:26 AM
Re: ps command and %CPU
In this case, when UNIX95 is not set, the ps command behaves in hpux as laid down for hpux.
Setting UNIX95 means using standard features of various unix flavours enabled by a group of persons referred to as the Xopen Posix Group. This means changing the whole behaviour of the ps command, gaining access to non-hp standard features.
However, setting UNIX95 may influence other commands then just ps, so I would recommend that you execute it only as specified with the space after the equal sign - if not, it is difficult to describe the influence on other commands.
I am sorry to say that I cannot explain why some commands use 200% cpu: is it a multiprocessor system where commands may take resources from more than a single cpu?
Perhaps others har better explanations.
regards,
John K.