memory usage displsy

Per olof Ljungmark peo at intersonic.se
Wed Sep 2 00:00:22 UTC 2009


Dan Nelson wrote:
> In the last episode (Sep 01), Bill Moran said:
>> In response to Per olof Ljungmark <peo at intersonic.se>:
>>> What is a good way to find out how memory is used? Have a 6.4 box where
>>> memory is used by something but I fail to see what is using it - tried
>>> different switches to ps(1), tried the stat tools but a big chunk of
>>> memory does not show at all.
>>>
>>> A proper tool for analyzing memory usage "live", this is a production
>>> box?
>> I've always been able to get what I need from top.  You can do -o res to
>> sort by resident memory usage, which helps.
> 
> ps will sort by memory usage when given the -m flag.  Also check ipcs -a to
> see if there are any sysv shared memory segments hanging arnound.  If you
> don't see anything using the memory, where are you seeing that "something"
> is using it?
> 

...and here is top output after I stopped Postfix, slapd and Cyrus-IMAP. 
Still over 3G Active.

last pid: 10278;  load averages:  0.03,  0.02,  0.00 
 
                  up 93+02:50:16  01:57:35
45 processes:  1 running, 44 sleeping
CPU:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 3057M Active, 312M Inact, 228M Wired, 144M Cache, 112M Buf, 81M Free
Swap: 4096M Total, 80K Used, 4096M Free

   PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
   647 root        4  20    0  3372K  1508K kserel 110:35  0.00% apcupsd
   831 root        3  20    0  5008K  1920K kserel  58:48  0.00% bacula-fd
   480 root        1  96    0  1416K   932K select  25:23  0.00% syslogd
   596 bind        1   4    0  6400K  5160K kqread  23:05  0.00% named
   709 root        1  96    0  2780K  1484K select   4:26  0.00% ntpd
   661 root        1   4    0  3372K  1972K accept   0:53  0.00% saslauthd
   660 root        1  20    0  3372K  1972K lockf    0:53  0.00% saslauthd
   662 root        1  20    0  3372K  1972K lockf    0:53  0.00% saslauthd
   659 root        1  20    0  3372K  1972K lockf    0:53  0.00% saslauthd
   657 root        1  20    0  3372K  1972K lockf    0:52  0.00% saslauthd
   913 root        1   8    0  1412K   900K nanslp   0:22  0.00% cron
91648 peo         1  96    0 11372K  7572K select   0:04  0.00% sshd
  3419 nagios      1  96    0  1380K   960K select   0:01  0.00% nrpe2
91656 root        1  20    0  3880K  1952K pause    0:00  0.00% csh
10243 root        1  96    0  2516K  1604K RUN      0:00  0.00% top
95511 root        1   5    0  4120K  2156K ttyin    0:00  0.00% csh
95504 peo         1  96    0  6296K  2544K select   0:00  0.00% sshd
95502 root        1   4    0  6300K  2540K sbwait   0:00  0.00% sshd
91646 root        1   4    0  6300K  2476K sbwait   0:00  0.00% sshd
10223 root        1   4    0  6300K  2660K sbwait   0:00  0.00% sshd
10232 root        1   5    0  3880K  2044K ttyin    0:00  0.00% csh
91650 peo         1  20    0  3836K  1848K pause    0:00  0.00% csh
95506 peo         1  20    0  3940K  1916K pause    0:00  0.00% csh
10227 peo         1  20    0  3836K  1976K pause    0:00  0.00% csh
   906 root        1  96    0  3552K  2016K select   0:00  0.00% sshd
10225 peo         1  96    0  6296K  2664K select   0:00  0.00% sshd
   429 root        1  96    0   528K   284K select   0:00  0.00% devd
91654 peo         1   8    0  1804K  1112K wait     0:00  0.00% su
95510 peo         1   8    0  1804K  1168K wait     0:00  0.00% su
10231 peo         1   8    0  1804K  1244K wait     0:00  0.00% su
   961 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   962 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   968 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   964 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   966 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   963 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   965 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   967 root        1   5    0  1352K   784K ttyin    0:00  0.00% getty
   943 root        1 111    0  1444K   840K select   0:00  0.00% inetd
   138 root        1  20    0  1260K   636K pause    0:00  0.00% adjkerntz



More information about the freebsd-questions mailing list