- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- %CPU without using the top
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
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
07-25-2002 11:17 PM
07-25-2002 11:17 PM
I have a requirement of not using top command and to generate similar output (what top gives).
Iam primarily looking for an alternate command like sar. PID, %CPU, TIME, USERNAME fields. sar -u gives me global statistics. Which is not I wanted.
I have done my homework of referring man pages of sar. I haven't found any flags that will help me.
Your help is greatly appreciated.
Thanks,
Allen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 11:27 PM
07-25-2002 11:27 PM
Re: %CPU without using the top
You could use a freeware tool like truespeed;
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/truespeed-0.1.0/
Or you can use HP's own glance, it has options like -adviser_only -syntax which allow you to display a one page list of cpu users to stdout(like top).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 11:29 PM
07-25-2002 11:29 PM
Re: %CPU without using the top
And just a FYI, you know you can use top -f to pipe the output to a file?
Cheers!
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 11:35 PM
07-25-2002 11:35 PM
Re: %CPU without using the top
Have a look at vmstat -n .
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 11:48 PM
07-25-2002 11:48 PM
Re: %CPU without using the top
Heres an even better tool for doing this!
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/yamm-2.6.0/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 01:21 AM
07-26-2002 01:21 AM
Re: %CPU without using the top
I'm a user of vmstat,
this for a global load :
#vmstat | tail -n 1 | awk ' { print "user :"$16" sys:"$17" idle:"$18 }'
Man vmstat for the details and options.
If you want a deteil for user, this the simple ps command, with proper options you will get %cpu, TIMe, for each process, then for each user..
hope that help
Benoit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 02:03 AM
07-26-2002 02:03 AM
SolutionUNIX95= ps -e -opid,pcpu,time,user,args
This will give the pid, %cpu, execution time, userid and command with aarguments
You can then sort this by piping it through
sort -rnk2
which will give the processes in order of $cpu used.
If you wish to use only a subset of processes then the normal flags (-u
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 02:41 AM
07-26-2002 02:41 AM
Re: %CPU without using the top
there are some goo dsolutions here but top with -f is till simplest
ex
top -d 1 -s 1 -n 100 -f /tmp/top
It is there
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 02:50 AM
07-26-2002 02:50 AM
Re: %CPU without using the top
-Gerald-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 03:26 AM
07-26-2002 03:26 AM
Re: %CPU without using the top
Thanks,
Allen