Operating System - HP-UX
1830356 Members
2955 Online
110001 Solutions
New Discussion

Find memory usages in user mode

 
rayofmoon
Occasional Contributor

Find memory usages in user mode

How can I find memory usages in user mode without
using glance or top command?
OR
How can I grep memory usages from glance command?

Can anybody help me.
3 REPLIES 3
Michael Steele_2
Honored Contributor

Re: Find memory usages in user mode

Hi rayofmoon:

(* kinda like moon beam. I'm a baby boomer and I knew some kids named moonbeam. :-) *)

Here is a list of all man pages for all user commands. The first url is the first half of the alphabet. The second url is the last half of the alphabet. The commands are listed alphabetically.

Start 'ps'. Refer to 'vsz' and 'rsz' arguements.

Also, search the itrc for UNIX95. This is a very good system administrator command that you may be able to use as a user. But I don't know. I haven't been a user since, oh, college?


http://docs.hp.com/en/B2355-90689/index.html

http://docs.hp.com/en/B2355-90690/index.html
Support Fatherhood - Stop Family Law
Tim Nelson
Honored Contributor

Re: Find memory usages in user mode

either ps -ef look at RSS

or

kmeminfo is a great tool found on this forum.
tool: kmeminfo 5.19
unix: /stand/vmunix 11.23 64bit IA64 on "test"
core: /dev/kmem live
link: Thu May 01 10:12:19 CDT 2008
boot: Mon Jul 7 09:26:31 2008
time: Wed Jul 9 11:08:46 2008
nbpg: 4096 bytes


----------------------------------------------------------------------
Summary of processes memory usage:

List sorted by physical size, in pages/bytes:

virtual physical swap
pid ppid pages / bytes pages / bytes pages / bytes command
21844 21824 21899 85.5m 7617 29.8m 12457 48.7m mysqld
2025 2024 10578 41.3m 4338 16.9m 4755 18.6m rapsd
1576 1 11790 46.1m 3420 13.4m 4479 17.5m midaemon
1645 1607 32715 127.8m 2963 11.6m 3625 14.2m coda
1546 1 14778 57.7m 2691 10.5m 4409 17.2m scopeux
1321 1 11570 45.2m 2671 10.4m 2963 11.6m postmaster
1758 1 28012 109.4m 2315 9.0m 14862 58.1m vxsvc
1833 1783 81638 318.9m 2183 8.5m 6533 25.5m httpd

Emil Velez
Honored Contributor

Re: Find memory usages in user mode



glance has a mode called advisor mode. This allows you to output any glance metric you want. You mention user mode memory

# vi mymetrics
print gbl_cpu_user_mode_util, gbl_cpu_sys_mode_util, gbl_cpu_idle_util

Run Glance to output the metrics
# glance -adviser_only -syntax ./mymetrics -j 10
4.0 1.3 94.7
0.2 0.7 99.1

You could use GBL_MEM_UTIL and GBL_USER_UTIL


# vi mymetrics2
print date,time,gbl_mem_UTIL, gbl_user_util

# glance -adviser_only -syntax ./mymetrics2 -j 30

that should print out the memory metrics every 30 seconds.