LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Musings on technology, philosophy, and life in the corporate world
User Name
Password

Notices


Hi. I'm jon.404, a Unix/Linux/Database/Openstack/Kubernetes Administrator, AWS/GCP/Azure Engineer, 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: *nix.
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 1672 Comments 2 rocket357 is offline

  



All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration