LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > Musings on technology, philosophy, and life in the corporate world
User Name
Password

Notices

Hi. I'm a Unix Administrator, mathematics enthusiast, and amateur philosopher. This is where I rant about that which upsets me, laugh about that which amuses me, and jabber about that which holds my interest most: Unix.
Old

Paging? Swapping? Which is it?

Posted 04-15-2013 at 11:52 AM by rocket357 (Musings on technology, philosophy, and life in the corporate world)

It's a bit big to be called a "one-liner", but this "script" will give you a short overview of paging levels vs. swapping levels on your machine.

Set T=<seconds> to whatever timeframe you want to test for.

Code:
T=5; ( vmstat -s; sleep $T; vmstat -s ) | awk -v T="$T" -F'[(/)]' '/pages paged in/{ pgpio=pgpin; pgpin=$1 } /pages paged out/{ pgpoo=pgpon; pgpon=$1 } /pages swapped in/{ pgsio=pgsin; pgsin=$1 } /pages swapped out/{ pgsoo=pgson;
...
Member
Posted in Uncategorized
Views 463 Comments 2 rocket357 is offline

  



All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration