mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "James H. Cloos Jr." <cloos@jhcloos.com>
To: linux-kernel@vger.kernel.org
Subject: ps and free disagree on swap usage
Date: 12 Dec 2002 06:23:55 -0500	[thread overview]
Message-ID: <m3lm2v5vlg.fsf@lugabout.jhcloos.org> (raw)

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



                 reply	other threads:[~2002-12-12 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lm2v5vlg.fsf@lugabout.jhcloos.org \
    --to=cloos@jhcloos.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®