HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ps -e -o pmem
Operating System - HP-UX
1837091
Members
2549
Online
110112
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-19-2002 03:30 PM
04-19-2002 03:30 PM
ps -e -o pmem
Hi Gurus,
In solaris, ps -e -o pmem shows the ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage. The -o option with HP-UX works after exporting env variable UNIX95=XPG4. but the "pmem" flag doesnt work and says :--
ps: pmem is not a valid field name
Does anyone know the any flag I can use with -o option to get the same output in HP-UX as "pmem" in Sun Solaris ?
I need it to get a perl script going.
Thanks in Advance
-Dayanand
In solaris, ps -e -o pmem shows the ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage. The -o option with HP-UX works after exporting env variable UNIX95=XPG4. but the "pmem" flag doesnt work and says :--
ps: pmem is not a valid field name
Does anyone know the any flag I can use with -o option to get the same output in HP-UX as "pmem" in Sun Solaris ?
I need it to get a perl script going.
Thanks in Advance
-Dayanand
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2002 05:46 PM
04-19-2002 05:46 PM
Re: ps -e -o pmem
Hi,
One workaround on HP-UX is to use the the output of top.
Following lists out 6000 processes (you can use a value that exceeds the total number of processes in your system) and pipes it into the file test without iterating:
# top -n 6000 -f test -d 1
Subsequently, you can use any of the regex tools such as awk or perl to extract the RES portion and compute a percentage over the total amount of physical memory or any other statistics:
# head -20 test
System: hpi2000 Sat Apr 20 06:24:25 2002
Load averages: 0.01, 0.00, 0.00
62 processes: 58 sleeping, 4 running
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.01 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
Memory: 34912K (20212K) real, 443812K (127300K) virtual, 149400K free Page# 1/1
TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
? 36 root 152 20 0K 1728K run 2:06 0.33 0.33 vxfsd
? 5724 root 154 20 10872K 1224K sleep 0:00 0.09 0.09 sshd
? 3 root 128 20 0K 64K sleep 6:58 0.06 0.06 statdaemon
? 7284 root 152 20 1812K 6056K run 0:22 0.06 0.06 samd
pts/0 5874 root 178 20 9372K 416K run 0:00 0.19 0.04 top
? 0 root 127 20 0K 80K sleep 0:16 0.02 0.02 swapper
? 1 root 168 20 8956K 296K sleep 0:00 0.02 0.02 init
? 2 root 128 20 0K 64K sleep 0:01 0.02 0.02 vhand
? 4 root 128 20 0K 64K sleep 0:05 0.02 0.02 unhashdaemon
? 8 root 100 20 0K 64K sleep 0:00 0.02 0.02 supsched
Hope this helps. Regards.
Steven Sim Kok Leong
One workaround on HP-UX is to use the the output of top.
Following lists out 6000 processes (you can use a value that exceeds the total number of processes in your system) and pipes it into the file test without iterating:
# top -n 6000 -f test -d 1
Subsequently, you can use any of the regex tools such as awk or perl to extract the RES portion and compute a percentage over the total amount of physical memory or any other statistics:
# head -20 test
System: hpi2000 Sat Apr 20 06:24:25 2002
Load averages: 0.01, 0.00, 0.00
62 processes: 58 sleeping, 4 running
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.01 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
Memory: 34912K (20212K) real, 443812K (127300K) virtual, 149400K free Page# 1/1
TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
? 36 root 152 20 0K 1728K run 2:06 0.33 0.33 vxfsd
? 5724 root 154 20 10872K 1224K sleep 0:00 0.09 0.09 sshd
? 3 root 128 20 0K 64K sleep 6:58 0.06 0.06 statdaemon
? 7284 root 152 20 1812K 6056K run 0:22 0.06 0.06 samd
pts/0 5874 root 178 20 9372K 416K run 0:00 0.19 0.04 top
? 0 root 127 20 0K 80K sleep 0:16 0.02 0.02 swapper
? 1 root 168 20 8956K 296K sleep 0:00 0.02 0.02 init
? 2 root 128 20 0K 64K sleep 0:01 0.02 0.02 vhand
? 4 root 128 20 0K 64K sleep 0:05 0.02 0.02 unhashdaemon
? 8 root 100 20 0K 64K sleep 0:00 0.02 0.02 supsched
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2002 04:40 AM
04-20-2002 04:40 AM
Re: ps -e -o pmem
.: HPUX offers similar flexibility with UNIX95:
HOW TO SET UP UNIX95 # export UNIX95="" or yes
.: To sort all the proceses by memory size:
# UNIX95= ps -eo vsz,ruser,args | sort -rn | more
(Note space usage between command & arguments)
To find all processes that have a specific basename:
UNIX95= ps -fC deamon_name
No grep needed, and most important, it returns ONLY the deamon you are after. Check out the difference between:
# ps -ef | grep sh
# UNIX95= ps -fC sh
The second form (which activates the -C option in XPG4 mode) is really inetresting.
HOW TO SET UP UNIX95 # export UNIX95="" or yes
.: To sort all the proceses by memory size:
# UNIX95= ps -eo vsz,ruser,args | sort -rn | more
(Note space usage between command & arguments)
To find all processes that have a specific basename:
UNIX95= ps -fC deamon_name
No grep needed, and most important, it returns ONLY the deamon you are after. Check out the difference between:
# ps -ef | grep sh
# UNIX95= ps -fC sh
The second form (which activates the -C option in XPG4 mode) is really inetresting.
Little learning is dangerous!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP