Skip to content

Instantly share code, notes, and snippets.

@mpurzynski
Created July 1, 2016 03:52
Show Gist options
  • Save mpurzynski/c2641800619cd5835f11f8d81d8b8366 to your computer and use it in GitHub Desktop.
Save mpurzynski/c2641800619cd5835f11f8d81d8b8366 to your computer and use it in GitHub Desktop.
#!/bin/bash
CPU_NUM=`cat /proc/cpuinfo | grep -E 'model name' | wc -l`
if [[ "${CPU_NUM}" -eq 32 ]]; then
export SNF_NUM_RINGS=26
elif [[ "${CPU_NUM}" -eq 56 ]]; then
export SNF_NUM_RINGS=32
else
exit 1;
fi
export LD_LIBRARY_PATH=/opt/snf/lib
export SNF_DATARING_SIZE=34359738368
export SNF_DESCRING_SIZE=8589934592
export SNF_DEBUG_MASK=0x3
exec sudo -E -u suricata -g suricata /opt/suricata/bin/suricata -c /etc/nsm/suricata.yaml -i snf0 --pidfile /home/suricata/run/suricata-internal.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment