2

You want to find the line 3427 1 root S 36964 124% 2% tmux -L l in the following screenshots of top command.

Why can tmux use more than 100 percent of memory? That is confusing...

Is this a bug of top command?

Mem: 28748K used, 1060K free, 0K shrd, 888K buff, 2452K cached
CPU:  15% usr  80% sys   0% nic   3% idle   0% io   0% irq   0% sirq
Load average: 6.47 4.22 2.96 3/78 14674
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 1028     1 root     S     1536   5%   8% /usr/sbin/pppd pty /usr/sbin/pptp 10.
   81     2 root     SW       0   0%   4% [mtdblockd]
 1477     1 root     S     2616   9%   4% /usr/sbin/collectd -f 
 3427     1 root     S    36964 124%   2% tmux -L l 
 1561     1 root     S      752   3%   1% /usr/bin/luci-bwc -d 
  273     2 root     SW       0   0%   1% [usb-storage]
16393  6202 root     R     1368   5%   1% top 
  955     1 root     S     1420   5%   1% hostapd -P /var/run/wifi-phy0.pid -B 
14299 21514 root     R     1364   5%   1% top 
  345     1 root     S      788   3%   1% /sbin/hotplug2 --override --persisten
  949     2 root     SW       0   0%   1% [irq/39-b43]
 1619     1 root     S     1588   5%   0% /bin/sh /usr/bin/multiwan agent 
   67     2 root     SW       0   0%   0% [kswapd0]
 2540  1619 root     S     1496   5%   0% /bin/sh /usr/bin/multiwan agent 
  329     1 root     S     1372   5%   0% syslogd -C16 
 1826   345 root     S      784   3%   0% /sbin/hotplug2 --override --persisten
 8859  9515 root     S     3468  12%   0% vim python_pydiction.vim 
 1435     1 root     S N   2632   9%   0% smbd -D 
 1507  1506 root     S     2616   9%   0% /usr/sbin/collectd -f 
 1509  1506 root     S     2616   9%   0% /usr/sbin/collectd -f 

2 Answers 2

5

It's a bug (or maybe a "feature") in busybox.

busybox top calculates %MEM as VSZ/MemTotal instead of RSS/MemTotal.

From https://unix.stackexchange.com/questions/44948/what-do-tops-mem-and-vsz-mean

Remember that VSZ is virtual memory, there's more of that than there is real memory.

2
  • why busybox choose such a strange defination of memory size?
    – hugemeow
    Sep 28, 2012 at 4:46
  • Wow, what an incredibly useless measurement! Apr 4, 2013 at 1:11
-1

It is possible if you have several processors.

Run

expr $(grep processor /proc/cpuinfo | cut -d: -f2 | tail -1) + 1

to see how many processors you have; this will find the processor lines, take the last number from it and increment it by one. The command grep searches processor, cut takes the part after : and tail takes the last line, expr is then used to increment 1 to it; you can run man followed by such command to figure out how a certain command is used.

2
  • i see now that you are talking about memory...
    – mantra
    Sep 27, 2012 at 17:27
  • 1
    If you feel this answer is incorrect, it may be best to delete it.
    – bwDraco
    Sep 27, 2012 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .