- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Memory footprint command
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
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
05-06-2003 01:44 PM
05-06-2003 01:44 PM
Is there a HP-UX command that can be used to find out the memory footprint (resident set size) of a process?
Thanks.
WP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 02:02 PM
05-06-2003 02:02 PM
Re: Memory footprint command
UNIX95= ps -o vsz -p PID
notice the space after UNIX95= . That's important to define the XPG4 behavior of ps. Man ps for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 08:12 AM
05-07-2003 08:12 AM
Re: Memory footprint command
Does the vsz option give us the virtual memory size or the real-memory (resident set) size? Is there any other option we can use to get the other memory size in kilobytes?
Thanks a lot.
Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 08:31 AM
05-07-2003 08:31 AM
SolutionThe ps option for resident set size is -o sz instead of -o vsz. The -sz report is RAM size measured in 4K pages. The -vsz report is virtual size reported in 1K units.
Shared regions make accounting more complicated. Glance discounts shared memory size by dividing by the total number of times a shared region is mapped.
The attached programs use pstat_getprocvm system calls to find the resident set size of all memory regions and then total them up. The procvm_sizes program counts shared regions as full size. The procvm_sizes_glance program discounts shared region sizes the same way glance does.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 08:46 AM
05-07-2003 08:46 AM
Re: Memory footprint command
Here is another try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 10:01 AM
05-07-2003 10:01 AM
Re: Memory footprint command
Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 11:38 AM
05-07-2003 11:38 AM
Re: Memory footprint command
I tried with native CC:
cc procvm_sizes.c
(Bundled) cc: "procvm_sizes.c", line 8: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "procvm_sizes.c", line 44: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "procvm_sizes.c", line 74: error 1705: Function prototypes are an ANSI feature.
Tried with gcc:
gcc procvm_sizes.c
In file included from procvm_sizes.c:5:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: `__va__list' redefined
/usr/include/sys/stdsyms.h:422: warning: this is the location of the previous definition
In file included from procvm_sizes.c:6:
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:28: warning: `__va__list' redefined
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition
as: "/var/tmp/ccuOC81b.s", line 28: error 1052: Directive name not recognized - NSUBSPA
as: "/var/tmp/ccuOC81b.s", line 229: error 1052: Directive name not recognized - NSUBSPA
as: "/var/tmp/ccuOC81b.s", line 387: error 1052: Directive name not recognized - NSUBSPA
Thanks...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 12:51 PM
05-07-2003 12:51 PM
Re: Memory footprint command
However, "procvm_sizes_glance.c", line 122
s = malloc(sizeof(segment));
needs to be changed to
s = (shared_segment_struct *) malloc(sizeof(segment));
Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2003 02:52 PM
05-07-2003 02:52 PM
Re: Memory footprint command
I compile them with the HP ansi c compiler, /opt/ansic/bin/cc. They use ansi features, so they will not compile with the bundled /usr/ccs/bin/cc that is only intended for rebuilding kernel configuration files.
They also compile fine for me with gcc. It looks like you have a bad installation of gcc. Perhaps you could get around the gcc header file warning by applying a header file patch such as PHCO_26111 and then reinstalling gcc.
The error seems to come from using an incompatible 'as' assembler instead of 'gas'. You may find it easiest to install a new gcc from
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2003 05:40 AM
05-08-2003 05:40 AM
Re: Memory footprint command
Thanks...Geoff