Skip to content

Instantly share code, notes, and snippets.

@chmac
Created February 14, 2017 20:40
Show Gist options
  • Save chmac/8e6bd903e5b73030d909495e3ca060bc to your computer and use it in GitHub Desktop.
Save chmac/8e6bd903e5b73030d909495e3ca060bc to your computer and use it in GitHub Desktop.
Utility script to send output of ps to an email during high load (needs to be called from something like monit)
#!/bin/bash
echo "$(/bin/ps auxww)$(/usr/bin/top -bn1)" | /usr/bin/mail -s "HOST high load psauxww" EMAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment