- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- UNIX95 and pcpu
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
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-02-2010 06:02 AM
тАО02-02-2010 06:02 AM
UNIX95=1 ps -e -o pcpu,state,pid,ppid,comm
Is the pcpu column here the same percentage that I would see if I viewed that process in top and compared value under the %CPU column?
When I run them on the command line now they seem very close (timing isn't perfect) but I have a discrepancy between what I captured in my log and what a user reported while viewing top.
TIA
Kevin
Solved! Go to Solution.
- Tags:
- UNIX95
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 06:17 AM
тАО02-02-2010 06:17 AM
Re: UNIX95 and pcpu
I would choose your method and make comparisons using that method only. Personally, I would use 'ps' since it is scriptable as its underlying 'pstat()' interface (with C code).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 06:23 AM
тАО02-02-2010 06:23 AM
Re: UNIX95 and pcpu
For example, if the process run at 100% CPU for a sustained period both ps's pcpu and top's %CPU should reflect 100% (in an ideal situation).
Thanks again
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 06:30 AM
тАО02-02-2010 06:30 AM
Solution> am I correct in assuming that those two CPU outputs are presenting the same data?
Yes, I believe that they are the same. From the 'ps' manpages 'pcpu' is the percentage of CPU time used by this process during the last scheduling interval. The 'top' manpages similarly say that the "%CPU" is the raw CPU percentage. Both values can only be values ascertained during a sampling interval.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2010 06:32 AM
тАО02-02-2010 06:32 AM