--- Em qui, 31/1/13, Simon Geard escreveu:

> De: Simon Geard
> Assunto: Re: [blfs-support] Swap use and speed doubts
> Para: blfs-support
> Data: Quinta-feira, 31 de Janeiro de 2013, 3:48
> On Wed, 2013-01-30 at 03:31 -0800,
> Fernando de Oliveira wrote:
> > 2. How a system with so much RAM is swapping?
> 
> Because swap isn't just extra memory to use once RAM runs
> out. I don't
> know specifics for Linux, but the OS is free to
> pre-emptively move data
> from RAM to swap if it thinks it's appropriate to do so.
> 
> For example, if that data hasn't been used in a while, it
> might page it
> out while the system isn't too busy, so that it doesn't need
> to do so
> should you suddenly want all that memory in future. Or it
> might decide
> that taking that memory for extra disk cache is a more
> efficient use,
> worth the cost of pulling that data out of disk if it's
> needed.
> 
> I emphasize that this is theory, not necessarily what Linux
> is actually
> doing. The point is simply that the kernel's memory
> management is more
> complicated than just "use swap if no RAM remaining".
> 
> Simon.

Thanks, Simon.

I understand now that even without the necessity of extra memory, a 
system might swap.

I was still trying to understand the other question, and can now 
answer. Question was essentially why Conky and a script I reproduced 
in the first mail give different swap values. Now, I include GKrellM 
in the question.

The answer is trivial, and I found when trying to run the script (which 
is not mine, I got it from the internet, that is why I was asking). The 
command

    find /proc -iname swap

results in many "Permission denied".

Therefore, the trivial answer is: script must be run by a privileged 
user.

Below, the output of the script, just before I started writing this 
message.

Again, thanks for clarifying question 2.

Believe the question 1 is not only noise, could help someone, 
eventually, anyway, sorry for the noise, if not.

[]s,
Fernando

sudo ./.find-out-what-is-using-your-swap.sh | sort -nk3
Password:
Overall swap used: 28028 KB
PID=25500 swapped 20 KB (fcron)
PID=2190 swapped 24 KB (gpm)
PID=1 swapped 28 KB (init)
PID=1701 swapped 32 KB (syslogd)
PID=2038 swapped 36 KB (vnstatd)
PID=2156 swapped 44 KB (fcron)
PID=7694 swapped 56 KB (xinit)
PID=1943 swapped 60 KB (dbus-daemon)
PID=2197 swapped 76 KB (agetty)
PID=2199 swapped 76 KB (agetty)
PID=2196 swapped 80 KB (agetty)
PID=2198 swapped 80 KB (agetty)
PID=1877 swapped 84 KB (vmnet-natd)
PID=2195 swapped 84 KB (agetty)
PID=1872 swapped 108 KB (vmnet-netifup)
PID=1879 swapped 112 KB (vmnet-netifup)
PID=2129 swapped 112 KB (sshd)
PID=2165 swapped 128 KB (vmware-usbarbit)
PID=1864 swapped 132 KB (vmnet-bridge)
PID=7638 swapped 172 KB (login)
PID=1874 swapped 224 KB (vmnet-dhcpd)
PID=1881 swapped 224 KB (vmnet-dhcpd)
PID=1892 swapped 232 KB (vmware-authdlau)
PID=2116 swapped 236 KB (ntpd)
PID=1852 swapped 240 KB (vmware-vmblock-)
PID=2131 swapped 340 KB (clamd)
PID=964 swapped 560 KB (udevd)
PID=1300 swapped 568 KB (udevd)
PID=989 swapped 644 KB (udevd)
PID=7639 swapped 904 KB (bash)
PID=2063 swapped 1152 KB (colord)
PID=2061 swapped 1344 KB (cupsd)
PID=1720 swapped 1704 KB (klogd)
PID=2067 swapped 1848 KB (colord-sane)
PID=7695 swapped 16264 KB (X)

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to