home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / hp / 14194 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  4.2 KB

  1. Path: sparky!uunet!news.centerline.com!franl
  2. From: franl@centerline.com (Fran Litterio)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Process memory usage
  5. Date: 17 Dec 92 15:45:54
  6. Organization: CenterLine Software, Inc.
  7. Lines: 80
  8. Message-ID: <FRANL.92Dec17154554@draco.centerline.com>
  9. References: <morgaine.724087654@siap.sublink.org>
  10.     <FRANL.92Dec15151723@draco.centerline.com> <17610@umd5.umd.edu>
  11. NNTP-Posting-Host: 140.239.3.116
  12. In-reply-to: mark@roissy.umd.edu's message of 17 Dec 92 19:38:19 GMT
  13.  
  14. mark@roissy.umd.edu (Mark Sienkiewicz) writes:
  15.  
  16. > franl@centerline.com (Fran Litterio) writes:
  17. >
  18. > > > I need a way to find how much (virtual) memory is
  19. > > > available and the amount of memory of each process.
  20. > >
  21. > > You want a combination of "/etc/swapinfo -t" (to get total available
  22. > > swap space) and "ps -el" (the SZ column shows process memory usage in
  23. > > 4096-byte blocks -- including the text segment which SunOS does _not_
  24. > > count in the SZ column of its "ps -l" output).
  25. > The ps man page says:
  26. >       SZ    (l)       The size in blocks of the core image of the process.
  27. > Does this mean the number of pages allocated to the process or does this
  28. > mean the number of pages the process has _in_core_?
  29.  
  30. From my experience, it is the number of 4096-byte blocks (i.e., pages)
  31. allocated to the process.  So it's representative of that process's
  32. swap space usage after you subtract out the size of the process's text
  33. segment (available via size(1)).
  34.  
  35. > Is there also a way
  36. > to find out the other one?
  37.  
  38. If you have /usr/contrib/bin/monitor on your system, then you can use
  39. the 'p' command to have it analyse a single process.  It gives a
  40. continuously-updated screenful of info that looks like this (you want
  41. the value shown after "Current resident set size", but do some
  42. experiements to find out if that value include the text segment or not
  43. -- I would guess it does):
  44.  
  45. Thu Dec 17 15:37:25 1992  9000/720 HP-UX monitor - SINGLE PROCESS INFO   1 of 1
  46.  
  47.   Resource usage for pid 5621             Started: Thu Dec 17 13:44:28
  48.   Command: xterm -ut -display draco:0.0 -title medusa -n medusa
  49.   User time accumulated:     0:00:00      System time accumulated    0:00:00
  50.   Average CPU usage:              0%      Instantaneous CPU usage:        0%
  51.   Current resident set size:     162      Number of open files:           13
  52.  
  53. ----- Address Space Usage -------
  54. Region    Vaddr    Size Type Vpgs    --------------- Open Files ---------------
  55.   DATA 40001000  446464 PRIV 104     fd  flags type  maj minor    count offset
  56.  UAREA 68fa8000   12288 PRIV   3     0   00001 char  3   0x000002 1     0
  57.  SHMEM 68fad000   20480 PRIV   5     1   00002 file  0   0x000000 23    0
  58.   MMAP 6df62000    8192 PRIV   2     2   00002 file  0   0x000000 23    0
  59.   MMAP 6df64000   40960 PRIV   9     3   00002 file  0   0x000000 23    0
  60.   MMAP 6df6e000   98304 PRIV   5     4   00002 file  0   0x000000 23    0
  61.   MMAP 6df86000    4096 PRIV   1     5   00002 file  0   0x000000 23    0
  62.   MMAP 6df87000   28672 PRIV   5     6   00002 file  0   0x000000 23    0
  63.   MMAP 6df8e000    8192 PRIV   1     7   00002 file  0   0x000000 23    0
  64.   MMAP 6df90000    4096 PRIV   1     8   00002 file  0   0x000000 23    0
  65.   MMAP 6df91000   45056 PRIV  11     9   00002 file  0   0x000000 23    0
  66.   MMAP 6df9c000   12288 PRIV   3     10  00003 socket             1     0
  67.   MMAP 6df9f000   49152 PRIV  12     11  00003 socket             1     148172
  68. NLLDRF        0    4096 SHRD   1     12  00007 char  16  0x000039 1     36637
  69.   TEXT     1000  118784 SHRD  24
  70.   MMAP 80000000   32768 SHRD   7
  71.   MMAP 80008000  655360 SHRD 136
  72.   MMAP 8017f000  258048 SHRD  57
  73.   MMAP 801c8000  307200 SHRD  70
  74.   MMAP 80325000   32768 SHRD   5
  75.   MMAP 8032d000   90112 SHRD  13
  76. --
  77. franl@centerline.com         "So what we've decided to do is set you up in
  78. uunet!centerline!franl        Cicely, situated in an area that we Alaskans
  79. 617-498-3255 (USA)            refer to as The Alaskan Riviera."
  80.  
  81. -----BEGIN PGP PUBLIC KEY BLOCK-----
  82. Version: 2.0
  83.  
  84. mQCNAisQJSUAAAED/jbCQchSwFG7IFKkrCQ6QKLxB0LVbP6co87karNBb88ur1+S
  85. FK82JT9mNlWKvP4HHFEI1kLKk0PAvd0nez/mQIriAMUT2pfOnIAtdqtpddgQseZZ
  86. 7BY2vMiorjG7pe6e11Q+UIQcvqsY3Bl89YBgqrydWm8UWMy2qXeXQmAScOodAAUR
  87. tC9GcmFuY2lzIFAuIExpdHRlcmlvLCBKci4gPGZyYW5sQGNlbnRlcmxpbmUuY29t
  88. Pg==
  89. =6hNb
  90. -----END PGP PUBLIC KEY BLOCK-----
  91.