Jan. 31, 2012
3:02 p.m.
Hi all Recently I dig out my old script that count the total number of swapped out pages. Basically, the script looks like this (sorry for any obvious typo): for a in /proc/[0-9]* do strings $a/cmdline; echo ; grep Swap $a/smaps | awk '{ SUM += $2 } END { print SUM }'; echo ----------------; done the problem is: the total number of swapped out pages (in kilobytes) doesn't match the output of "free" (swap used column). The difference is not really big, it ranges around 1-2 megabytes in my measurements. Anybody knows why? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
5308
Age (days ago)
5308
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mulyadi Santosa