cancel
Showing results for 
Search instead for 
Did you mean: 

memory usage per user

SOLVED
Go to solution
Jose Nuno Neto
Occasional Advisor

memory usage per user

Hi
I'm trying to sort memory usage per user and it seems the best way would be with glance

I'm trying to save the output with
glance -iterations 1 -f GLANCE > /dev/null
but only save 1st page
any option that can make it save all pages?

I've tried other commands from the forum like:
UNIX95=1 ps -ef -o vsz= -o pid= -o comm= -o user=
But when I sum it I get a total over my RAM (90GB)

Is there other way of getting this info?
Thanks
Jose
7 REPLIES
Sharma Sanjeev
Respected Contributor
Solution

Re: memory usage per user

Hi Jose

Please have a look on below link & SEP Comments

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1247500389886+28353475&threadId=60110

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Jose Nuno Neto
Occasional Advisor

Re: memory usage per user

Sorry I forgot to mention this is a HPUX system, not linux
Sharma Sanjeev
Respected Contributor

Re: memory usage per user

Hi Jose

The script what SEP has given in the link I have provided you is for HP-UX only

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Steven E. Protter
Exalted Contributor

Re: memory usage per user

Shalom Jose,

My comments were general and apply to HP-UX.

My memory lead detector runs on Linux, HP-UX and Sun Solaris.

http://www.hpux.ws/?p=8
Assuming this is a top user of memory, this process will show up. Increase the number of processes to be monitored and eventually you will get every process on the system.

Quite a good toy, the memory leak detector is.

It includes a ps command that can be manipulated a hundred different ways to produce the data you want.

Memory is about supply and demand. Increase the supply or decrease the demand, or both.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: memory usage per user

> UNIX95=1 ps -ef -o vsz= -o pid= -o comm= -o user=


This is not a simple task at all. Unix memory usage is quite complicated. For instance, virtually all copies of the shell and application programs will use shared libraries. Although each program needs these libraries, there is only one copy. The text area (unchanging instructions) are also shared as in one copy of vi text for dozens of copies of vi. Additionally, there is memory allocated for the buffer cache but every process that opens a file will use this shared kernel area. And some programs will have their own shared memory area (fbackup is a good example).

> But when I sum it I get a total over my RAM (90GB)

Perfectly normal in most Unix systems. You may have only 90 GB RAM but you can run 200, even 500 GB of programs dues to virtual memory in the kernel (ie, swap space). This command will be more useful than adding all the users together:

swapinfo -tam


Bill Hassell, sysadmin
Jose Nuno Neto
Occasional Advisor

Re: memory usage per user

Much thanks for all reply's
Very nice script Sthepen
Jose Nuno Neto
Occasional Advisor

Re: memory usage per user

thansk all