mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
645 B
37 lines
645 B
#!/usr/bin/perl
|
|
|
|
if($ARGV[0] and $ARGV[0] eq 'config') {
|
|
print "graph_title SEMS calls\n";
|
|
print "graph_args --base 1000 -l 0\n";
|
|
print "graph_vlabel calls\n";
|
|
print "graph_category Porting\n";
|
|
|
|
print "calls.draw LINE2\n";
|
|
print "calls.label current\n";
|
|
print "peak.draw LINE2\n";
|
|
print "peak.label peak calls\n";
|
|
exit 0;
|
|
}
|
|
|
|
open(FILE, "sems-stats|");
|
|
|
|
while(<FILE>)
|
|
{
|
|
if($_ =~ /Active calls: (.*)\n/)
|
|
{
|
|
print "calls.value $1\n";
|
|
}
|
|
}
|
|
close FILE;
|
|
|
|
open(FILE, "sems-stats -c get_callsmax|");
|
|
|
|
while(<FILE>)
|
|
{
|
|
if($_ =~ /Maximum active calls: (.*)\n/)
|
|
{
|
|
print "peak.value $1\n";
|
|
}
|
|
}
|
|
close FILE;
|