diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-26 21:46:44 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-26 21:46:44 +0000 |
commit | b24ed97f42c7c369297eb4a2745de815afc3b6d2 (patch) | |
tree | 8f2035674d6252bdc25c0fc7aeae34f7c2f79f13 /packages/snort | |
parent | 9399ff11ca02564641543544e33e1093abae1d42 (diff) | |
download | pfsense-packages-b24ed97f42c7c369297eb4a2745de815afc3b6d2.tar.gz pfsense-packages-b24ed97f42c7c369297eb4a2745de815afc3b6d2.tar.bz2 pfsense-packages-b24ed97f42c7c369297eb4a2745de815afc3b6d2.zip |
Sample actual snort memory usage as well as system free measurements.
Diffstat (limited to 'packages/snort')
-rw-r--r-- | packages/snort/snort.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index bd052c21..80ac2200 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -115,7 +115,7 @@ function sync_package_snort() { /* write out rc.d start/stop file */ write_rcfile(array( "file" => "snort.sh", - "start" => "BEFORE_MEM=`top | grep Free | grep Wired | awk '{print \$10}'`\n{$start}\necho \"Sleeping before final memory sampling...\"\nsleep 17\nAFTER_MEM=`top | grep Free | grep Wired | awk '{print $10}'`\necho \"Ram free BEFORE starting Snort: \${BEFORE_MEM} -- Ram free AFTER starting Snort: \${AFTER_MEM}\" -- Mode {$snort_performance} | logger -p daemon.info -i -t SnortStartup", + "start" => "BEFORE_MEM=`top | grep Free | grep Wired | awk '{print \$10}'`\n{$start}\necho \"Sleeping before final memory sampling...\"\nsleep 17\nTOTAL_USAGE=`top | grep snort | awk '{ print \$6 }'`\nAFTER_MEM=`top | grep Free | grep Wired | awk '{print $10}'`\necho \"Ram free BEFORE starting Snort: \${BEFORE_MEM} -- Ram free AFTER starting Snort: \${AFTER_MEM}\" -- Mode {$snort_performance} -- Snort memory usage: \$TOTAL_USAGE | logger -p daemon.info -i -t SnortStartup", "stop" => "/usr/bin/killall snort; killall snort2c" ) ); |