- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- find CPU, SIZE and RES for a specific process on H...
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
тАО01-09-2008 03:35 AM
тАО01-09-2008 03:35 AM
find CPU, SIZE and RES for a specific process on HP-UX
I want to find CPU, SIZE and RES information for a specific process on HP-UX 11i V1 platform.
I can see that 'top' command provides all this information, but here one has to navigate on diffrent screen to get stats of process of interest.
I would like to know if there is some command in HP-UX like 'prstat' command in Solaris which can be used to get stats of specific process
Solaris example:
prstat -p 15373 1 1
gives following
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
15373 usr1 271M 141M sleep 59 0 0:51:39 0.2% java/45
I tried using 'ps -p
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 03:42 AM
тАО01-09-2008 03:42 AM
Re: find CPU, SIZE and RES for a specific process on HP-UX
#export UNIX95=1;ps -ef -o comm,pcpu,vsz,args | grep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 03:58 AM
тАО01-09-2008 03:58 AM
Re: find CPU, SIZE and RES for a specific process on HP-UX
top is reporting the values in Mb/Kb/Gb [whatever it wants to really], hiding the conversion from kb or page units that it gets from the underlying mechanism. ps() is more directly reporting exactly what that mechanism (pstat) gives... and as such, sz is in pages and vsz is in kb. You'll want to account for that mentally (if the point is to read it yourself) or write a wrapping script / C program to convert it to something more suitable as top would.
This has been discussed many times before, and as such -- I'm sure there are many scripts/programs out there that may be really close to what you want [perhaps even exactly]. Try looking through:
https://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1183183
Don
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 05:32 AM
тАО01-09-2008 05:32 AM
Re: find CPU, SIZE and RES for a specific process on HP-UX
Thanks for your response.
I would like to rephrase my query. Actually i wanted to analyse system resource (cpu and memory (SIZE and RES)) usage stats by a particular process over a period of time.
top command provides SIZE (which is total virtual size of process in KBytes), RES (Resident size of the process in KBytes), CPU info along with some other process details also.
The problem with using top command is that it lists all top processes details at given point of time. I am interested in collecting the same stats as displayed by top command but for a specific process repititively at regular interval of times.
It is possible in Solaris with prstat command.
Please could you suggest if its possible to get stats displayed by top command for a particular process using either 'top' command or some other command.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 06:39 AM
тАО01-09-2008 06:39 AM
Re: find CPU, SIZE and RES for a specific process on HP-UX
while true
do
pseudo-prstat -p
sleep 5
done
or a shell script, or cron... or whatever you want. (And if you want this in a file pipe it there, etc.)
Just compile the program or copy the script, name the file whatever you want and use it.
(Or if you know C just revise the program to take a loop option and report N times or whatnot.)
There's no stock command that I know of or option to top that looks just like prstat as you've shown.... but it isn't hard to set up your own once you have a way to get the pstat data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 07:16 AM
тАО01-09-2008 07:16 AM
Re: find CPU, SIZE and RES for a specific process on HP-UX
http://www.hpux.ws/?p=8
That script or a slight modification should give you what you want.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 04:14 PM
тАО01-09-2008 04:14 PM
Re: find CPU, SIZE and RES for a specific process on HP-UX
using glance it is possible to achieve what u need.. system resources can be monitored for a period and even graph can be created using that.
Please refer the following doc for more details on the same:
http://docs.hp.com/en/B8733-90021/index.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-09-2008 04:14 PM
тАО01-09-2008 04:14 PM
Re: find CPU, SIZE and RES for a specific process on HP-UX
using glance it is possible to achieve what u need.. system resources can be monitored for a period and even graph can be created using that.
Please refer the following doc for more details on the same:
http://docs.hp.com/en/B8733-90021/index.html