Continually monitor things

while (true); do clear; uname -n; echo ""; df -h /; echo ""; tail -5 /var/log/auth.log; echo ""; vmstat 1 5; sleep 15; done
You can use this one-liner for a quick and dirty (more customizable) alternative to the watch command. The keys to making this work: everything exists in an infinite loop; the loop starts with a clear; the loop ends with a sleep. Enter whatever you'd like to keep an eye on in the middle.
Sample Output
hostname

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             182G   32G  141G  19% /

Aug 22 23:17:01 hostname CRON[27580]: pam_unix(cron:session): session closed for user root
Aug 22 23:25:01 hostname CRON[27584]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 22 23:25:01 hostname CRON[27584]: pam_unix(cron:session): session closed for user root
Aug 22 23:35:01 hostname CRON[27768]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 22 23:35:01 hostname CRON[27768]: pam_unix(cron:session): session closed for user root

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0    428 1382640  70536 252300    0    0     7     3   10    3  0  1 99  0
 0  0    428 1382632  70536 252388    0    0     0     0  181  152  0  0 100  0
 0  0    428 1382632  70536 252388    0    0     0     0  171  129  0  0 100  0
 0  0    428 1382632  70536 252388    0    0     0     0  176  153  0  1 99  0
 0  0    428 1382632  70536 252388    0    0     0     0  163  128  0  0 100  0

2
By: roknir
2010-08-23 04:37:58

What Others Think

Thc Vapes Choices carts Raw Garden carts Smok Vape Pen 22 Buy Smok Carts Smok carts for sale Smok Morph 219 kit Smok Carts Smok Cartridges Platinum Vape Platinum carts Platinum vape pens Off white Carts Off white vapes Off-white Carts Real Off white Carts Boom Carts Buy Boom Carts Clean Carts Clean Carts Vapes Clean Carts Review Eureka Carts Fake Eureka Carts Eureka Carts Fake Honeycomb carts Honeycomb clear Moxie Carts Moxie Carts Fake Springfield farms carts Springfield farms Tko Candyland Rove Glue Cartridge Review lions breath qr code Muha Med Gummies Rove ape Indica Fake Rove Carts Choices Lab Carts Choices carts Packaging Tko extracts wedding cake krt carts for sale Eureka carts fake muha carts price Choices Carts Choice Carts Choices Cart Choices Thc Carts Choice Carts Thc Choice Carts fake Raw Garden Carts Raw Garden Live Resin Krt Carts Fake krt carts krt carts for sale Muha Meds Carts Muha med carts Fake muha meds muha meds carts review muha meds fake carts muha meds authentication Muha Meds Muha Med cartridges Dime Battery Dime Carts Dime cart Flavors Dime cart Boom Carts Buy Boom Carts Clean Carts Clean Carts Vapes Clean Carts Review Eureka Carts Fake Eureka Carts Eureka Carts Fake Honeycomb carts Honeycomb clear Moxie Carts Moxie Carts Fake Springfield farms carts Springfield farms Tko Candyland Rove Glue Cartridge Review lions breath qr code Muha Med Gummies Rove ape Indica Fake Rove Carts Choices Lab Carts Choices carts Packaging Tko extracts wedding cake krt carts for sale Eureka carts fake muha carts price
Choices_Carts · 7 weeks ago
Thc Vapes Choices carts Raw Garden carts Smok Vape Pen 22 Buy Smok Carts Smok carts for sale Smok Morph 219 kit Smok Carts Smok Cartridges Platinum Vape Platinum carts Platinum vape pens Off white Carts Off white vapes Off-white Carts Real Off white Carts Boom Carts Buy Boom Carts Clean Carts Clean Carts Vapes Clean Carts Review Eureka Carts Fake Eureka Carts Eureka Carts Fake Honeycomb carts Honeycomb clear Moxie Carts Moxie Carts Fake Springfield farms carts Springfield farms Tko Candyland Rove Glue Cartridge Review lions breath qr code Muha Med Gummies Rove ape Indica Fake Rove Carts Choices Lab Carts Choices carts Packaging Tko extracts wedding cake krt carts for sale Eureka carts fake muha carts price Choices Carts Choice Carts Choices Cart Choices Thc Carts Choice Carts Thc Choice Carts fake Raw Garden Carts Raw Garden Live Resin Krt Carts Fake krt carts krt carts for sale Muha Meds Carts Muha med carts Fake muha meds muha meds carts review muha meds fake carts muha meds authentication Muha Meds Muha Med cartridges Dime Battery Dime Carts Dime cart Flavors Dime cart Boom Carts Buy Boom Carts Clean Carts Clean Carts Vapes Clean Carts Review Eureka Carts Fake Eureka Carts Eureka Carts Fake Honeycomb carts Honeycomb clear Moxie Carts Moxie Carts Fake Springfield farms carts Springfield farms Tko Candyland Rove Glue Cartridge Review lions breath qr code Muha Med Gummies Rove ape Indica Fake Rove Carts Choices Lab Carts Choices carts Packaging Tko extracts wedding cake krt carts for sale Eureka carts fake muha carts price
Choices_Carts · 7 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: