Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Created February 11, 2013 13:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregoryyoung/4754560 to your computer and use it in GitHub Desktop.
Save gregoryyoung/4754560 to your computer and use it in GitHub Desktop.
Let's look for heavy cpu usage!
fromStream("$stats-127.0.0.1:2113").when( {
"$stats-collected" : function(s,e) {
var total = e.body["sys-cpu"];
if(total > 40) {
emit("heavycpu", "heavycpufound", {});
}}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment