Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!sri-spam!parcvax!hplabs!hp-sdd!ncr-sd!ncrcae!ncsu!mcnc!akgua!akguc!codas!peora!ucf-cs!novavax!houligan!dave@murphy.UUCP From: dave@murphy.UUCP (Dave Cornutt) Newsgroups: net.unix-wizards Subject: Re: size of text/data space of running process Message-ID: <16@houligan.UUCP> Date: Wed, 13-Aug-86 14:32:02 EDT Article-I.D.: houligan.16 Posted: Wed Aug 13 14:32:02 1986 Date-Received: Sun, 17-Aug-86 05:50:47 EDT Organization: Gould Electronics, Ft. Lauderdale, Florida. Lines: 46 Relay-Version: version B 2.10.1 6/24/83; site houligan.UUCP Path: houligan!novavax!ucf-cs!peora!codas!akguc!akgua!gatech!seismo!columbia!caip!clyde!burl!ulysses!bellcore!whuxcc!lcuxlm!whuxl!whuxp!picuxa!warren From: warren@picuxa.UUCP Newsgroups: net.unix-wizards Subject: size of text/data space of running process Message-ID: <149@picuxa.UUCP> Date: Wed, 6-Aug-86 16:58:52 EDT Article-I.D.: picuxa.149 Posted: Wed Aug 6 16:58:52 1986 Date-Received: Wed, 13-Aug-86 03:34:02 EDT Distribution: net Organization: AT&T Information Systems, Parsippany N.J. Lines: 24 Keywords: SYS V In article <149@picuxa.UUCP>, warren@picuxa.UUCP types: >How can one determine the amount of space taken up by a process, >broken up into text and data [being run shared by several users]? >... >One suggestion is to get the text size from the "size" command >and assume that the rest of [ps] SZ is data (accounting for page size). >Does this work? I'm not a SYS5 guru, but it should work. In all of the UN*X implementations that I'm aware, the size of the text segment is fixed at load time; it doesn't change during execution. Just subtract the text segment size (as reported by "size") from the total size shown by ps for each process, then add it back to the sum. This assumes that the ls -N option wasn't used to link the program. If it was, the text is not shared. If you don't know this, you can determine it by doing "file " on the program. If it says something that includes the words "pure executable", the text is sharable. --- "Pick it up and put it in your pocket, or somebody else will" - Stan Ridgeway Dave Cornutt, Gould Computer Systems, Ft. Lauderdale, FL UUCP: ...{sun,pur-ee,brl-bmd}!gould!dcornutt or ...!ucf-cs!novavax!houligan!dcornutt ARPA: wait a minute, I've almost got it... "The opinions expressed herein are not necessarily those of my employer, not necessarily mine, and probably not necessary."