diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-26 21:11:20 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-26 21:11:20 +0000 |
commit | eb6a1ddef54020c002e36dcc46724350c8ed5f4c (patch) | |
tree | 1e5f0d5db620ea5418105226d53522ee34e98de1 /packages | |
parent | e069687fdddaeb96c54e19162bb9b980209a512f (diff) | |
download | pfsense-packages-eb6a1ddef54020c002e36dcc46724350c8ed5f4c.tar.gz pfsense-packages-eb6a1ddef54020c002e36dcc46724350c8ed5f4c.tar.bz2 pfsense-packages-eb6a1ddef54020c002e36dcc46724350c8ed5f4c.zip |
Take a memory sampling before and after starting snort. Report this information in the system logs so the Operator can guage how much ram Snort is using
Diffstat (limited to 'packages')
-rw-r--r-- | packages/snort/snort.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index af300c54..3c21903f 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -92,7 +92,7 @@ function sync_package_snort() { $start .= ";sysctl net.bpf.maxinsns={$bpfmaxinsns}"; /* go ahead and issue bpf changes */ - if($bpfbufsize) + if($bpfbufsize) mwexec_bg("sysctl net.bpf.bufsize={$bpfbufsize}"); if($bpfmaxbufsize) mwexec_bg("sysctl net.bpf.maxbufsize={$bpfmaxbufsize}"); @@ -109,7 +109,7 @@ function sync_package_snort() { /* write out rc.d start/stop file */ write_rcfile(array( "file" => "snort.sh", - "start" => $start, + "start" => "BEFORE_MEM=`top | grep Free | grep Wired | awk '{print \$10}'`\n{$start}\nsleep 10\nAFTER_MEM=`top | grep Free | grep Wired | awk '{print $10}'`\necho \"Ram usage BEFORE starting Snort: \${BEFORE_MEM} -- Ram usage AFTER starting Snort: \${AFTER_MEM}\"| logger -p daemon.info -i -t SnortMemory", "stop" => "/usr/bin/killall snort; killall snort2c" ) ); |