submitting script for review: counting per process swap usage
31 Jan
2012
31 Jan
'12
09:19
Hi all
This is my first contribution toward Grml. I have written a shell script that utilize Linux kernel provided statistic to account per process swap usage. Here it is:
for a in /proc/[0-9]* do strings $a/cmdline; # output the name of the process echo ; grep Swap $a/smaps | awk '{ SUM += $2 } END { print SUM }'; # swap usage in kilobytes echo ----------------; done
Thank you for your help and looking forward for opinions. I hope this little script could transform into "grml-" specific script.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
5281
Alter (vor Tagen)
5281
Zuletzt aktiv (vor Tagen)
0 Kommentare
1 Teilnehmer
Teilnehmer (1)
-
Mulyadi Santosa