From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,286957be45957ae9 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-03-05 14:29:40 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!gazette.loc1.tandem.com!nabeth.cxo.dec.com!alan Newsgroups: comp.unix.tru64 From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Distribution: world References: <3aa400de.421702896@news.telusplanet.net> Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: Monitoring memory usage Message-ID: Date: Mon, 05 Mar 2001 22:27:59 GMT NNTP-Posting-Host: 16.82.16.67 X-Complaints-To: abuse@Compaq.com X-Trace: gazette.loc1.tandem.com 983831279 16.82.16.67 (Mon, 05 Mar 2001 14:27:59 PST) NNTP-Posting-Date: Mon, 05 Mar 2001 14:27:59 PST Organization: Compaq Computer Corporation Xref: supernews.google.com comp.unix.tru64:1773 In article <3aa400de.421702896@news.telusplanet.net>, trevor.osatchuk@nospam.pscl.com (Trevor Osatchuk) writes: >Pretty simple question to which I have not been able to find a simple >answer. Is there a way to monitor total virtual memory and total >actual memory used by a single process? Top will give a SIZE and RES >value in kilobytes, but I have heard that it may not be the most >accurate program around. I want to know if there is another tool that >can give me process by process vm usage and physical memory usage. To verify the general quality of top's data, compare the VM and RSS sizes for given process as listed by top and by ps(1). If they're the same, then that's about the as good as you're going to get without going deep within the kernel to get the data. Both top and ps(1) probably use the various I/O controls that are available with the process file system; proc(4). You can change how the data is reported by writing your own program, but the basic data won't change. One of the things that complicates matter is how you want to count shared pages. Should a process count shared page as though it has a private copy? Or, should the program try to figure out how many processes have the particular page mapped and split the "cost" among them equally. > >Thanks! > >Trevor Osatchuk > -- Alan Rollow alan@nabeth.cxo.dec.com