Last active
December 18, 2015 12:48
-
-
Save eighteyes/5784894 to your computer and use it in GitHub Desktop.
Node.js status indicator with GeekTool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
limit=3; | |
num=$(ps -a | grep -c "node"); | |
if [[ $num -lt $limit ]]; | |
then | |
exit 1; | |
fi | |
echo $num; |
ps -C node ?
If only. :(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using : http://projects.tynsoe.org/en/geektool/
ps -a | grep -c "node"
Yes, it includes the grep in the count, if anyone can remind me of how to fix that... :)