Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 
share|improve this question

2 Answers 2

up vote 5 down vote accepted

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

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

From http://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.

share|improve this answer
    
why busybox choose such a strange defination of memory size? –  hugemeow Sep 28 '12 at 4:46
    
Wow, what an incredibly useless measurement! –  David Schwartz Apr 4 '13 at 1:11

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.

share|improve this answer
    
i see now that you are talking about memory... –  mantra Sep 27 '12 at 17:27
1  
If you feel this answer is incorrect, it may be best to delete it. –  DragonLord Sep 27 '12 at 21:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.