- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Memory Utilization check using ps
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
10-07-2001 10:41 PM
10-07-2001 10:41 PM
A question on memory utilisation. I have used the following command to sort the top memory processes on the system.
export UNIX95=1 ; ps -el -o pid -o sz -o vsz -o comm| grep -i -v "pid" | sort -nr -k 2,2.
I have a couple of questions related to this:
1. Am I correct to assume that the if I multiply the the sz field by 4 & divide by 1024 this gives me the size of the process resident in memory in MB (it seems to equate roughly to RSS field in glance ).
2. I have also totalled this column (sz) and the figure is 3843. My system only has 3GB of memory. I thought resident in memory meant it was currently loaded into memory?
3. Finally what is the difference between sz & vsz fields in ps listing. Do these columns relate to RSS/VSS in glance or RES & SIZE in top.
Thanks for any help.
Cheers
Con
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2001 11:24 PM
10-07-2001 11:24 PM
SolutionIf you are looking at checking your system performance, look at the threads below for some helpful reading.
http://us-support.external.hp.com/cki/bin/doc.pl/sid=93f51dd2190dd52819/screen=ckiDisplayDocument?docId=200000056493259
http://us-support.external.hp.com/cki/bin/doc.pl/sid=93f51dd2190dd52819/screen=ckiDisplayDocument?docId=200000009254450
http://us-support.external.hp.com/iv/bin/doc.pl/sid=195ee8681d70fbfa11/screen=ivHome/?NODEID=English_SHW::WW_SW_UX_SYSADM_EN_E/Q1.7&WARP=1
Hope this helps.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2001 01:55 AM
10-08-2001 01:55 AM
Re: Memory Utilization check using ps
The RES field from ps does indeed show memory used/utilised but it does NOT show shareable memory. ie. multiple copies of the same program running - their instruction code will all be shareable - but ps will show them all in the RES field for each copy, which means you cant use the RES field from ps to work out memory usage - it just wont add up - as youve found out.
For proper memory usage you really need to use glance/gpm - you can get a free trial to run it when you install if for the first time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2001 02:53 PM
10-08-2001 02:53 PM
Re: Memory Utilization check using ps
Thanks alot for your help. Im a bit clearer now on what the sz field is showing in ps.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2001 03:38 PM
10-08-2001 03:38 PM
Re: Memory Utilization check using ps
export UNIX95=1 ; ps ...
is definitely NOT recommended. UNIX95, whenever it is defined (doesn't matter what value it has, just defined), will change the behavior of several commands and libraries. This is called XPG4 behavior, and when needed (like certain options in ps) is very useful. But defining it as an exported variable means that all subsequent commands and processes can inherit the variable and behave differently.
Instead, set UNIX95 as a temporary variable on the command line as in:
UNIX95= ps -eH
which causes ps to see UNIX95 as a defined value (in this case, null) and produce a hierarchical list of processes.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2001 05:49 PM
10-08-2001 05:49 PM
Re: Memory Utilization check using ps
I hadn't thought about the implication of setting the UNIX95 variable.
Cheers
Con