Skip to content

Instantly share code, notes, and snippets.

@andrewpmiller
Last active September 25, 2015 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewpmiller/80b2947a3cc60091c17b to your computer and use it in GitHub Desktop.
Save andrewpmiller/80b2947a3cc60091c17b to your computer and use it in GitHub Desktop.
This miniscule script is a hack to return the current CPU load.
#!/bin/bash
# getload
#
# This miniscule script is a hack to return the current
# CPU load. It is simply stripping off the first
# value returned from loadavg.
cat /proc/loadavg | head -n1 | cut -d " " -f1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment