Skip to content

Instantly share code, notes, and snippets.

@eighteyes
Last active December 18, 2015 12:48
Show Gist options
  • Save eighteyes/5784894 to your computer and use it in GitHub Desktop.
Save eighteyes/5784894 to your computer and use it in GitHub Desktop.
Node.js status indicator with GeekTool
limit=3;
num=$(ps -a | grep -c "node");
if [[ $num -lt $limit ]];
then
exit 1;
fi
echo $num;
@eighteyes
Copy link
Author

Using : http://projects.tynsoe.org/en/geektool/

  1. Check your running and error condition node count with ps -a | grep -c "node"
    Yes, it includes the grep in the count, if anyone can remind me of how to fix that... :)
  2. Set limit to somewhere between that.
  3. Make a new Shell command in GeekTool
  4. Turn on Display Status Feedback Image
  5. Paste the above gist into the command.
  6. Refresh every one second or so
  7. Keep on top and put it in your menu bar somewhere

@dresende
Copy link

ps -C node ?

@eighteyes
Copy link
Author

If only. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment