title: how to use kill SIGUSR2 in bash?
body: <p>I use iptraf to monitor the network traffic in linux, and the shell command is(make iptraf running in background):</p>
  
  <pre><code>iptraf -s eth0 -f -B -L ./traffic.dat
  </code></pre>
  
  <p>if I want to get the result, I have to stop iptraf first, so I use the shell command:</p>
  
  <pre><code>kill -SIGUSR2 $pid
  </code></pre>
  
  <p>however, I could not stop iptraf if I move these shell commands into a bash script file(net.sh), and I get an error:</p>
  
  <pre><code>kill: SIGUSR2: invalid signal specification
  </code></pre>
  
  <p>I use 'kill -l' in the script file(net.sh), and I find there is no parameter which name is SIGUSR2. and I would get nothing if I use USR2 or -9.</p>
  
  <p>the complete script file is:</p>
  
  <pre><code>    iptraf -s eth0 -f -B -L ./temp.txt
      pid=`ps -ef | grep iptraf | grep -v grep | awk '{print $2}'`
      kill -USR2 $pid
      cat temp.txt
  </code></pre>
  
  <p>I get nothing after these commands.</p>
  
  <p>what shoud I do if I want to get the result?</p>