- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Process Memory size
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
тАО03-19-2010 03:58 AM
тАО03-19-2010 03:58 AM
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 04:09 AM
тАО03-19-2010 04:09 AM
Re: Process Memory size
In a shell, use 'ps'. If you are writing in C, you have the underlying 'pstat()' interface.
Regards!
...JRF...
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 04:12 AM
тАО03-19-2010 04:12 AM
Re: Process Memory size
UID PID PPID C STIME TTY TIME COMMAND
not the memory size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 04:29 AM
тАО03-19-2010 04:29 AM
Re: Process Memory size
Please let me know how to verify memory occupied by a particluar process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 04:38 AM
тАО03-19-2010 04:38 AM
SolutionIn the shell, you can do:
# UNIX95= ps -C myprocess -opid,vsz
This leverages the UNIX95 (XPG) behavior of 'ps' and allows you to create a custom list of the fields that 'ps' can report. In this case, we look for a process named "myprocess" and report its pid and virtual segment size.
Note the whitespace following the "=". There is no semicolon before the 'ps' and this keeps the UNIX95 behavior only for the duration of the command line. Setting UNIX95 in your environment may have effects on other commands that you will not necessarily be aware of.
Regards!
...JRF...
- Tags:
- UNIX95
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2010 10:03 PM
тАО03-21-2010 10:03 PM
Re: Process Memory size
Please look into the below example i am not getting result as expected
cbh10702 $ ps
PID TTY TIME COMMAND
4843 pts/tF 0:00 nameserv
4910 pts/tF 0:29 cor
4343 pts/tF 0:00 telnetd
9481 pts/tF 0:00 ps
4855 pts/tF 0:23 java
4344 pts/tF 0:00 ksh
cbh10702 $ UNIX95= ps -C 4910 -opid,vsz
PID VSZ
Please let me know how to do it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2010 10:32 PM
тАО03-21-2010 10:32 PM
Re: Process Memory size
You need to use:
UNIX95=EXTENDED_PS ps -p 4910 -opid,vsz
(-p is for PID, -C is for executable name)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2010 03:59 AM
тАО03-22-2010 03:59 AM
Re: Process Memory size
As you now know, you must do:
# UNIX95= ps -p 4910 -opid,vsz
...if you want to specify the *pid* of the process and substitute '-C
Dennis prefers to use:
# UNIX95=EXTENDED_PS
...to signify the we want the enhanced UNIX95 (XPG4) behavior. I prefer the shorter form:
# UNIX95=
Both are equavalent to:
# UNIX95=1
# UNIX95=0
Take note that the declaration and assignment of UNIX95 is sufficient to enable the behavior. You could just as easily set the variable to zero as you could to one.
This is why I prefer the short form:
# UNIX95= ps ...
To me, the short form is a reminder that that you can't reset the behavior by assigning zero (or anything).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2010 04:06 AM
тАО03-22-2010 04:06 AM
Re: Process Memory size
(Actually I show it that way so I don't have provide a thesis to explain it. And can search for those solutions. :-)
- Tags:
- EXTENDED_PS