- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Memory by user - old HP-UX 10.20
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
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
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-15-2012 05:57 AM
03-15-2012 05:57 AM
Dear friends,
I want to know amount of memory used by some process. I try "ps -eo vsz,ruser,pid,args | grep oracle" but "-o" option doesn't work in old 10.20 version. Any tips?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2012 09:53 AM
03-15-2012 09:53 AM
Re: Memory by user - old HP-UX 10.20
Have you used something similar to this syntax?
UNIX95=EXTENDED_PS ps -eo vsz,ruser,pid,args | grep oracle
- Tags:
- EXTENDED_PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2012 12:25 PM
03-15-2012 12:25 PM
Re: Memory by user - old HP-UX 10.20
Dennis,
Same problem:
ps -eo vsz,ruser,pid,args | grep oracle
ps: illegal option -- o
usage: ps [-edaflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2012 12:37 PM
03-15-2012 12:37 PM
Re: Memory by user - old HP-UX 10.20
I need data of RSS (glance screen) column in a format like "ps" command output:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2012 04:38 PM
03-15-2012 04:38 PM
Re: Memory by user - old HP-UX 10.20
@Dennis Handly wrote:Have you used something similar to this syntax?
UNIX95=EXTENDED_PS ps -eo vsz,ruser,pid,args | grep oracle
Dennis,
Just now i figure out that i NEED to use "UNIX95=" as part of command. My results are something like this:
PID SZ %CPU RUSER COMMAND
19093 2542 0 oracle oracleceeec (LOCAL=NO)
22224 2472 0 oracle ora_dbw4_ceeec
2010 0 0 root /etc/opt/resmon/lbin/emsagent
24165 2549 0 oracle oracleceeec (LOCAL=NO)
Second column is my target. I create a file named "test" and open it in VI to remove first line. So, i run:
cat test | awk '{ sum+=$2} END {print sum}'
7563 (total of second colunm)
Question: I need to multiply result by 4 to get size in kbytes?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2012 06:40 PM - edited 03-16-2012 11:22 AM
03-15-2012 06:40 PM - edited 03-16-2012 11:22 AM
Solution>Just now I figure out that I NEED to use "UNIX95=" as part of command.
Didn't I say that? :-)
>open it in VI to remove first line.
No need. You can use the "-oX=" form to remove the titles:
UNIX95=EXTENDED_PS ps -eo vsz= -oruser= -opid= -oargs=
Or get awk to remove it:
awk 'BEGIN { getline } { sum+=$2} END {print sum}' test
>I need to multiply result by 4 to get size in kbytes?
Yes. If you were worried about later OS releases with larger page sizes:
page_size=$(getconf _SC_PAGE_SIZE)
awk -v pg_s=$page_size 'BEGIN { getline } { sum+=$2} END {print sum * (pg_s/1024), "KB"}' test
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2012 04:31 AM
03-16-2012 04:31 AM
Re: Memory by user - old HP-UX 10.20
Thanks!!!