12 if ($arg && $arg eq "config") {
13 print "graph_title rrdcached stats\n";
14 print "QueueLength.label Queue length\n";
15 print "UpdatesReceived.label UpdatesReceived\n";
16 print "UpdatesReceived.type DERIVE\n";
17 print "FlushesReceived.label FlushesReceived\n";
18 print "FlushesReceived.type DERIVE\n";
19 print "UpdatesWritten.label UpdatesWritten\n";
20 print "UpdatesWritten.type DERIVE\n";
21 print "DataSetsWritten.label DataSetsWritten\n";
22 print "DataSetsWritten.type DERIVE\n";
23 print "TreeNodesNumber.label TreeNodesNumber\n";
24 print "TreeDepth.label TreeDepth\n";
25 print "JournalBytes.label JournalBytes\n";
26 print "JournalBytes.type DERIVE\n";
27 print "JournalRotate.label JournalRotate\n";
28 print "JournalRotate.type DERIVE\n";
32 my $sock = new IO::Socket::UNIX(
34 Peer => "/var/run/rrdcached.sock",
35 ) or die "Cannot open socket : $!";
37 print $sock "STATS\n";
42 print map { s/: /.value /; $_; } <$sock>;