- obvious first step would be to check the entire system, rather than a
subset you obviously think is the cause.
- smaps should be believed.
- Linux uses lazy (memory) allocation. This includes de-allocation. And swap.
Hence the various tools that simply read meminfo should be treated with
(extreme) care if you are basing decisions on it.
- the definitive way to check is swapoff/swapon. Bit drastic maybe, but the
swapoff will simply fail if there is insufficient memory available. Works
o.k. on test environments ...
Shane ...
On Thu, Apr 12th, 2012 at 12:09 PM, PHILIP TULLY wrote:
> I have a couple servers which show 100% swap space used but when I look
> I can't find which pids are have pages in swap.
>
> free -m
> total used free shared buffers
> cached
> Mem: 12061 11410 650 0 152
> 6425
> -/+ buffers/cache: 4832 7228
> Swap: 1129 1128 1
>
> I was using the following to show how much swap space was being used it
> is either not working or there is nothing allocated to swap.
>
> for pid in `ps -ef|grep ora| awk '{print $2}'`; do echo -n "Pid: $pid
> "; cat /proc/$pid/smaps |grep -i swap| awk '{SUM += $2} END {print "SUM:
> " SUM " kB (" SUM/1024 " MB)"}'; done
>
>
> Does anyone have a different method for finding which pids are actually
> using swap?
>
> TIA
>
> Phil
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>
>
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/