Skip to content

Instantly share code, notes, and snippets.

@swistak
Created January 10, 2011 01:42
Show Gist options
  • Save swistak/772233 to your computer and use it in GitHub Desktop.
Save swistak/772233 to your computer and use it in GitHub Desktop.
Simple server load meter for.
ruby -e ' i=0; print " "; (1..20).each{|x| print "%3d |" % (x)}; puts; loop{ `uptime` =~ /load average: ([\d.]+)/; load = $1.to_f * 5; print("\r" + ("=" * load.ceil) + (" " * (100 - load.ceil)) + (%w{- \\ | /})[i%4]); $stdout.flush; i+=1; sleep 0.1} '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment