home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 9668 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.7 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usc!sdd.hp.com!hp-cv!hp-pcd!hpfcso!ajs
  2. From: ajs@hpfcso.FC.HP.COM (Alan Silverstein)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: What does sw_nfpgs really represent?
  5. Message-ID: <7371255@hpfcso.FC.HP.COM>
  6. Date: 25 Aug 92 19:32:11 GMT
  7. References: <1992Aug19.054613.8198@novatel.cuc.ab.ca>
  8. Organization: Hewlett-Packard, Fort Collins, CO, USA
  9. Lines: 31
  10.  
  11. > The question is, what does the value sw_nfpgs **really** represent...
  12. > The rest of the parameters seem to agree with what comes from
  13. > /usr/sam/bin/swapinfo.
  14.  
  15. My best understanding, as author of swapinfo(1M) (available on 8.07 and
  16. later):
  17.  
  18. For device swap, sw_nfpgs is the number of free pages in the device swap
  19. area (can be a whole disk (on S800, a whole partition) or follow a file
  20. system (S300/400/700 only?)).  Convert to bytes using the constant NBPG
  21. (which can change from one release to another?).  (My uncertainty is
  22. just because it's been awhile and I don't have time to re-research.)
  23.  
  24. Since swap space is always taken in swchunk increments (2Mb or 4Mb by
  25. default depending on Series), some device swap space is not usable.
  26. Swapinfo computes as follows (more or less, this is an excerpt):
  27.  
  28.     avail_bytes  = swapentry.sw_nblks * DEV_BSIZE;
  29.     wasted_bytes = avail_bytes % swchunk_bytes;
  30.     free_bytes   = swapentry.sw_nfpgs * NBPG;
  31.     used_bytes   = avail_bytes - free_bytes;
  32.  
  33. Hence wasted_bytes always appear "used" not "free".
  34.  
  35. Now, fsw_nfpgs for file system swap is different, but you didn't ask
  36. about that.  :-)
  37.  
  38. This response does not represent the official position of, or statement
  39. by, the Hewlett-Packard Company.  The above data is provided for
  40. informational purposes only.  It is supplied without warranty of any
  41. kind.
  42.