Code: Select all
#!/usr/bin/perl
# Get zoneminder monitor frame rates
push @camarray, (
{ camname => "Back", camid => "10" },
{ camname => "Back-low", camid => "11" },
{ camname => "Fence", camid => "12" },
{ camname => "Front", camid => "1" },
{ camname => "Front-low", camid => "2" },
{ camname => "Garage", camid => "5" },
{ camname => "Garage-low", camid => "6" },
{ camname => "Side", camid => "3" },
{ camname => "Side-low", camid => "4" },
{ camname => "Workshop", camid => "7" },
{ camname => "Workshop-low", camid => "8" },
{ camname => "Workshop-int", camid => "15" },
{ camname => "Gates", camid => "14" },
);
foreach $cam (@camarray) {
$fps = `zmu -m $cam->{camid} -f -Uusername -Ppassword`;
chomp $fps;
print "0 ZM_$cam->{camname} fps=$fps $cam->{camname} ($cam->{camid}) running at $fps FPS.\n";
}
Probably not the best idea to put the username & password in there, if there's a way to get the info without that I'd be interested in a tip.