42
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

netstatで接続数カウント

接続状態の確認と接続元IPのカウントをnetstatで行う。

80番ポート状態カウント

netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c

      2 ESTABLISHED
      1 LISTEN
     18 TIME_WAIT

接続元ホストカウント

$ netstat -tan | grep ':80 ' | awk '{print $5}'  | cut -d : -f1 | sort -n | uniq -c | sort -n

      1 0.0.0.0
      1 1.78.2.xx
      1 180.9.50.xx
      1 182.249.240.xx
      1 182.249.246.xx
      1 203.139.205.xx
      1 210.147.29.xx
      1 221.191.193.xx
      1 27.142.240.xx
      1 61.125.133.xx
      2 221.189.114.xx
      2 49.98.130.xx
      2 59.128.83.xx
      2 66.249.79.xx
      6 60.138.174.xx

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
42
Help us understand the problem. What are the problem?