mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* ps and free disagree on swap usage
@ 2002-12-12 11:23 James H. Cloos Jr.
  0 siblings, 0 replies; only message in thread
From: James H. Cloos Jr. @ 2002-12-12 11:23 UTC (permalink / raw)
  To: linux-kernel

Using procps from cvs at sources.redhat.com, up to date as of
wednesday night.

free(1) says:

             total       used       free     shared    buffers     cached
Mem:        514664     456576      58088          0      31988     173088
-/+ buffers/cache:     251500     263164
Swap:       538136      23016     515120

which looks correct compared to /proc/meminfo.

OTOH, ps(1) (and qps for that matter) show much higher aggregate swap
usage.  A couple of intersting lines from ps avxww --forest:

  PID TTY      STAT   TIME  MAJFL   TRS   DRS  RSS %MEM COMMAND
 1402 ?        S      2:29    784  1336 100875 22308  4.3  \_ /usr/X11R6/bin/X :0 vt07 -auth /var/lib/xdm/authdir/authfiles/A:0-PNAkTo

 1717 ?        S      0:05   2692   454 100353 18608  3.6          \_ kppp
 1718 ?        S      0:00     34   454 14329 3752  0.7          |   \_ kppp

 3985 ?        S      0:39  13864   785 57238 37040  7.1          \_ /opt/mozilla/mozilla-bin

 4718 ?        S      0:01    747   204 10219 6348  1.2          \_ xterm -u8
 4720 pts/1    S      0:00    392   414  2393 1704  0.3          |   \_ bash


plus another 8 or so xterms all with similar DRS vs RSS numbers.  Qps
shows results similar to ps.

ps avxww|awk '{print $6 + $7 - $8}'|awk '{i += $1} END {print i}'

returned 470418 just now, when meminfo is claiming:

SwapTotal:      538136 kB
SwapFree:       515120 kB


Is this just a bug in /proc/meminfo?

-JimC



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-12 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-12 11:23 ps and free disagree on swap usage James H. Cloos Jr.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®