root: my new texting friend
I’m monitoring a long-running command at OpenSky this weekend which has a tendency to die from time to time for various reasons (seg faults, lost cursors, you name it). I cooked up this little diddy to keep my sanity:
$ ssh server
$ screen
$ cd /path/to/project
$ ./app/console my-command; echo $? | mail 8885551212@txt.att.net
# press ^a ^d to detach the screen
$ exit
This way my good friend root will send me a text message when it’s time to restart the command and I can focus on more important things.
Happy Sunday!