User:Daveh/countconn

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

A simple script to count and display the number of current connections on the server.

  #!/bin/sh
  
  echo -n $"Established: "
  netstat -an | grep ESTABLISHED | wc -l
  
  echo -n $"   Syn Recv: "
  netstat -an | grep SYN | wc -l
  
  echo -n $"       Wait: "
  netstat -an | grep WAIT | wc -l
  
  echo -n $"     Listen: "
  netstat -an | grep LISTEN | wc -l
  
  echo -n $"      Total: "
  netstat -an | wc -l