[Durham] Swap usage by process

Richard Patterson Richard at helpquick.co.uk
Fri Mar 23 06:03:33 UTC 2012


Hi Olly,

Thanks - but did you forget to attach the script?

Regards

Richard


Richard Patterson
Mobile: 07921 512 459



HelpQuick Ltd
The headquarters of
innovative IT solutions

Office: 0191 2582888, Fax: 0191 6408666
Web: http://www.helpquick.co.uk

Have you used our services? Why not write a review on the FreeIndex website

HelpQuick Limited, Registered in England & Wales, Company number
5334746, Vat registration number: 859 6133 89, Registered office:
18 Camden Square, North Shields, NE30 1NR, UK

> -----Original Message-----
> From: durham-bounces at mailman.lug.org.uk [mailto:durham-
> bounces at mailman.lug.org.uk] On Behalf Of Oliver Burnett-Hall
> Sent: 22 March 2012 23:16
> To: Durham Linux User Group mailing list (durham at mailman.lug.org.uk)
> Subject: [Durham] Swap usage by process
> 
> This one's for Dougie following this week's meeting -- the attached file is a
> better script for analysing swap usage as reported by /proc/*/smaps.
> 
> Save it somewhere, chmod it so that it's executable, and run it (possibly via
> sudo if you can't read all of the files in /proc/*/smaps) and it will output swap
> usage (in kB), process PID and process name.
> You can bung it though sort -n to order by swap usage.
> 
> Random note 1: http://weather.ou.edu/~apw/projects/stress/ (which is in
> the Debian archives as package 'stress') was very useful for making my
> system return non-zero results with this script.
> 
> Random note 2: I haven't programmed in perl in a couple of years, and I've
> forgotten *everything*.  Writing that script was far harder than it should
> have been, and I completely failed to come up with a utterly obfuscated one-
> liner, which was my real goal.
> 
> Random note 3: I've absolutely no idea how accurate the smaps information
> is.  Google might know that.
> 
> - olly



More information about the Durham mailing list