02-08-2012
Swap usage by top and free command doesn't match
Its rather confusing, the output of top command is below:
Quote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP COMMAND
25303 mysql 15 0 2968m 708m 4948 S 38.2 9.0 225:26.20 2.2g mysqld
The "swap" field of top is described by the manpage as: "The swapped out portion of a task's total virtual memory image."
But the output of free command suggests something else and it does tally with the output of swapon command:
Quote:
[root@server ~]# free
total used free shared buffers cached
Mem: 8046000 7476800 569200 0 296012 5291468
-/+ buffers/cache: 1889320 6156680
Swap: 4192956 61320 4131636
[root@server ~]# swapon -s
Filename Type Size Used Priority
/dev/cciss/c0d0p2 partition 4192956 61320 -1
So why is this discrepancy? How would i determine which process is using how much swap?
---------- Post updated at 05:40 PM ---------- Previous update was at 03:05 AM ----------
Any help will be highly appreciated..
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
in unix when i use top
i get an output like this:
load averages: 0.64, 0.57, 0.53 14:04:42
347 processes: 1 running, 1 waiting, 169 sleeping, 172 idle, 4 stopped
CPU states: 16.4% user, 2.8% nice, 7.6%... (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies
2. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
3. UNIX for Dummies Questions & Answers
Ok, so I am using the Top command on my linux VPS to try and see the processes using the most CPU %.
I hit the P to sort by CPU % but it wants to sort them from lowest to highest (ascending). My Telnet-SSH screen is only about 60 rows high so the processes with the highest CPU % usage are at the... (6 Replies)
Discussion started by: davemehta
6 Replies
4. Solaris
Hi Export,
i execute 'top' command to show the free memory in Solaris host, but the read is much lower than the RSS value shown in prstat command. Which one can reflect the real status and it is possible the difference caused by any patch of OS?
Top command (only 883 memory is free)... (3 Replies)
Discussion started by: eiga
3 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have checked the output of top command in which there is a difference shown between the swap of top command for a process with total swap memory usage of the top command.
Swap usage of process is higher than the total swap memory usage.
top - 18:28:21 up 7:13, 5 users, load... (2 Replies)
Discussion started by: gagan2914
2 Replies
6. Solaris
Hi all,
I have a server running an Oracle database that is part of a Solaris M5000 container. Presumably this is referred to as a zone within a cluster, not sure if I get the terminology right.
Anyway, a third-party manages the zone and unfortunately is not "helpful/friendly" to assist me on... (1 Reply)
Discussion started by: newbie_01
1 Replies
7. Linux
Hi,
Yersterday I started monitoring my homeserver memory consumition due some errors found in the system (network hangs). I've detected almost all the memory used (~10 MB free from 1GB).
First I thought it was because of the MySQL configuration, so I monitored it with top and found it wasn't... (6 Replies)
Discussion started by: nefeli
6 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have just installed my first Linux server ( Ubuntu 11.10 ).
I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap
but when I use 'free -m' , returned a "Swap" line as below.
total used free shared buffers cached
Mem: ... (3 Replies)
Discussion started by: joaming
3 Replies
9. Solaris
Hi,
When I run the free command on solaris, I get the following:
"Memory: 60G phys mem, 69G free mem"
Q: how cna the free mem be higher then the physical mem?:confused:
Amit (3 Replies)
Discussion started by: amitlib
3 Replies
10. Red Hat
Hi,
from below output.How to read or relate one marked in bold.
$ free -m
total used free shared buffers cached
Mem: 129176 92753 36423 0 2268 39973
-/+ buffers/cache: 50511 78664
Swap: 31996 ... (1 Reply)
Discussion started by: manoj.solaris
1 Replies