Skip to content

Instantly share code, notes, and snippets.

View witscher's full-sized avatar

David Heidt witscher

  • Karlsruhe, Germany
View GitHub Profile
@witscher
witscher / redis-stats
Last active August 29, 2015 14:15 — forked from zircote/redis-stats
#!/usr/bin/env python
import redis
import statsd
import time
import argparse
import logging
import sys
import os
@witscher
witscher / old-tomcat-threads
Created July 17, 2012 14:34 — forked from wataru420/old-tomcat-threads
Tomcat7 munin plugins
if($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'} &&
$xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadCount'}) {
print "busy.value " . $xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'} . "\n";
print "idle.value " .
($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadCount'} -
$xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'}) . "\n";
} else {
print "busy.value U\n";
print "idle.value U\n";
}