Skip to content

Instantly share code, notes, and snippets.

@mpurzynski
Created September 25, 2018 23:37
Show Gist options
  • Select an option

  • Save mpurzynski/de300202847d75163d534c3dcfeae78a to your computer and use it in GitHub Desktop.

Select an option

Save mpurzynski/de300202847d75163d534c3dcfeae78a 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=16
elif [[ "${CPU_NUM}" -eq 56 ]]; then
export SNF_NUM_RINGS=28
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 --pcap=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