Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Created February 11, 2013 13:59
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