- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HP-UX Process Memory
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
тАО08-03-2010 06:08 AM
тАО08-03-2010 06:08 AM
HP-UX Process Memory
The ps command reports the total memory including shared text, which is about 400MB referenced, according to glance, by over 2,200 processes. The problem is that this shared text is included in sz and vsz by ps for each of those two thousand processes so that the total memory used is about five times (about 1000GB) physical memory (192GB) while glance reports only 79% of physical memory in use. The same TEXT memory region is being reported for every process that references it.
How can I get the PRIVATE memory used by a process in a script. (Note: I know that this can be seen in glance, but I need a non-interactive method.)
Cheers,
Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 06:20 AM
тАО08-03-2010 06:20 AM
Re: HP-UX Process Memory
Yes, you need to make sure you count it only once.
>How can I get the PRIVATE memory used by a process in a script?
You'll probably have to write a program and call pstat_getprocvm(2) for each process and region.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 06:34 AM
тАО08-03-2010 06:34 AM
Re: HP-UX Process Memory
# UNIX95= ps -ef -o pid,sz,vsz,comm
PID SZ VSZ
11838 95215 381376 ora_e000_ORCL
3463 94995 381696 oracleORCL
Both processes above reference the same shared TEXT memory region so that the actual memory used by both processes combined is the shared TEXT region + each processes' private working set. There are 2,200 such processes supporting 74 databases in which the single shared TEXT region referenced by all processes is included in the SZ and VSZ values of each and every process.
The easy way, I suppose, is to just subtract the TEXT region from the VSZ of each process. I wonder how dynamic that TEXT region might be.
Cheers,
Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 09:16 AM
тАО08-03-2010 09:16 AM
Re: HP-UX Process Memory
Compile as:
cc +DD32 -D_PSTAT64 -o psish psish.c
(Or whatever name you pick instead of psish).
You could get more detailed summaries from the structure (such as real pages only for data or stack or sysV shmem, mmap, etc.) but this was what you asked for -- and it shouldn't be hard to extend if you wish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 09:35 AM
тАО08-03-2010 09:35 AM