Skip to content
Snippets Groups Projects
Commit 87829cd2 authored by Eric Sproul's avatar Eric Sproul
Browse files

Allow Pf modules to work on FreeBSD as well. Fixes #15

git-svn-id: https://labs.omniti.com/resmon/trunk@431 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent d1676da2
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ sub wildcard_handler { ...@@ -71,7 +71,7 @@ sub wildcard_handler {
my $osname = $^O; my $osname = $^O;
my $metrics; my $metrics;
if ($osname eq 'openbsd') { if ($osname =~ m/(free)|(open)bsd/) {
foreach (split(/\n/, $output)) { foreach (split(/\n/, $output)) {
if (/(\w+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) { if (/(\w+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
$metrics->{$1}->{"evals"} += $2; $metrics->{$1}->{"evals"} += $2;
......
...@@ -68,7 +68,7 @@ sub wildcard_handler { ...@@ -68,7 +68,7 @@ sub wildcard_handler {
my $osname = $^O; my $osname = $^O;
my $metrics; my $metrics;
if ($osname eq 'openbsd') { if ($osname =~ m/(free)|(open)bsd/) {
foreach (split(/queue\s+/, $output)) { foreach (split(/queue\s+/, $output)) {
next unless /\w+/; next unless /\w+/;
if (/(\S+)\s+.*\n\s+\[\s+pkts\:\s+(\d+)\s+bytes\:\s+(\d+)\s+dropped\s+pkts\:\s+(\d+)\s+bytes\:\s+(\d+).*/) { if (/(\S+)\s+.*\n\s+\[\s+pkts\:\s+(\d+)\s+bytes\:\s+(\d+)\s+dropped\s+pkts\:\s+(\d+)\s+bytes\:\s+(\d+).*/) {
......
...@@ -113,7 +113,7 @@ sub handler { ...@@ -113,7 +113,7 @@ sub handler {
'synproxy' => 'counters_synproxy' 'synproxy' => 'counters_synproxy'
); );
if ($osname eq 'openbsd') { if ($osname =~ m/(free)|(open)bsd/) {
foreach (split(/\n/, $output)) { foreach (split(/\n/, $output)) {
if (/^\s+\w+.*/) { if (/^\s+\w+.*/) {
if (/^\s+current\sentries\s+(\d+)\s+/) { if (/^\s+current\sentries\s+(\d+)\s+/) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment