swap space usage
Eberhard Moenkeberg
emoenke at gwdg.de
Wed Jan 3 09:27:12 CST 2007
Hi,
On Wed, 3 Jan 2007, Robert Gravsjö wrote:
> catam skrev:
> > Same info comes from ps :)
> >
> > ps axu|head -2
> > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> > root 1 0.0 0.0 1516 376 ? S 2006 0:28 init
> >
> > grep -E 'VmSize|VmRSS' /proc/1/status
> > VmSize: 1516 kB
> > VmRSS: 376 kB
> >
> >
> > On Wed, 3 Jan 2007, Haakon Gjersvik Eriksen wrote:
> >
> >>
> >> The /proc file system is your friend. You can easily make a list of the
> >> biggest processes by doing something like
> >> # grep VmSize /proc/*/status | sort -nr -k 2 | head
> >> And then match the PIDs you get out of that to /proc/PID/cmdline to get
> >> the process names if PIDs aren't sufficient.
>
> Thanks for swift and good responses! In addition to your advice I also
> found that top can show swap information (use 'f' and add swap by 'p').
Top and pressing M (uppercase) does sort the processes by memory usage,
like this:
top - 16:25:42 up 140 days, 5:49, 5 users, load average: 1.63, 2.10, 2.17
Tasks: 1879 total, 2 running, 1876 sleeping, 0 stopped, 1 zombie
Cpu(s): 1.1% us, 2.2% sy, 0.0% ni, 80.9% id, 12.3% wa, 0.0% hi, 3.5% si
Mem: 32459804k total, 31925940k used, 533864k free, 4306520k buffers
Swap: 61544936k total, 30372k used, 61514564k free, 21342780k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19328 emoenke 15 0 1574m 1.5g 1120 D 3.2 4.8 1:50.58 rsync
17456 emoenke 16 0 814m 790m 1120 S 0.0 2.5 2:27.55 rsync
17457 nobody 16 0 813m 787m 1268 S 0.0 2.5 3:11.41 rsyncd
16190 nobody 16 0 76744 59m 1308 S 0.6 0.2 2:00.80 rsyncd
21168 nobody 15 0 42168 25m 1308 S 0.6 0.1 0:12.02 rsyncd
5978 nobody 15 0 43372 22m 1324 S 0.6 0.1 15:55.18 rsyncd
18580 nobody 15 0 39020 21m 1308 S 0.0 0.1 0:22.37 rsyncd
21864 nobody 16 0 34608 17m 1308 R 5.1 0.1 0:39.62 rsyncd
22337 nobody 15 0 34092 16m 1312 S 0.0 0.1 0:04.21 rsyncd
9517 nobody 15 0 32324 16m 1324 S 0.3 0.1 1:14.36 rsyncd
32359 named 25 0 32692 8972 1480 S 0.0 0.0 0:24.74 named
Cheers -e
--
Eberhard Moenkeberg (emoenke at gwdg.de, em at kki.org)
More information about the Linux-PowerEdge
mailing list