Re: Memory usage of processes
Posted in 1998
Nigel Gall wrote: > > Hi! > > What is the best way to get accurate measurements of the amount of real and > virtual memory sizes used by a process, and how does one monitor swapping? > > Basically, I'd like to track the swapping and memory usage on my system, an > AlphaServer 2100 running Digital Unix 3.0B. We're also about to upgrade to > an AlphaServer 4100 running DU 4.0D, so I'd like to know if the suggested > method will work on this platform as well. > > I tried using the ps -A -o rssize, vsize command, and passed it through an > awk script, but the figures I got don't seem to match what I *know* to be > my total physical and virtual memory. I suspect that I misunderstand my > server's manpages on the ps command. Keep in mind that shared memory may be reported for ALL processes attached to the same segments so that will skew any arithmatic based on these figures if you are trying to add across processes. Check your man pages for the process table information and functions to retrieve that data to get local -vs- shared memory usage. Then just add up all local memory plus the sizes of all shared segments reported by ipcs. Art S. Kagel