Skip to content

Instantly share code, notes, and snippets.

@gnidan
Created May 16, 2013 14:28
Show Gist options
  • Save gnidan/5592114 to your computer and use it in GitHub Desktop.
Save gnidan/5592114 to your computer and use it in GitHub Desktop.
count remote httpd process in i3 status bar
#!/bin/sh
# prepend i3status with wb01
# metrics
i3status | while :
do
apache1=`ssh apache1 'ps -ef | grep httpd | wc -l'`
apache2=`ssh apache2 'ps -ef | grep httpd | wc -l'`
read line
echo "wb01: $apache1 | wb02: $apache2 | $line" || exit 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment