DBILITY

linux apache 동시 접속 수 확인 본문

was

linux apache 동시 접속 수 확인

DBILITY 2023. 2. 13. 11:03
반응형

 

watch -n 10 'netstat -anp | grep ":80\|:443" | grep ESTABLISHED | wc -l'
or
watch -n 10 'netstat -anp | grep ":80\|:443" | egrep "(ESTABLISHED|SYNC)" | wc -l'

10초마다 명령을 실행하여 화면에 표시해 준다.

netstat, grep, egrep, wc 명령의 옵션들은 알아서 찾아 보자.

watch --help

Usage:
 watch [options] command

Options:
  -b, --beep             beep if command has a non-zero exit
  -c, --color            interpret ANSI color and style sequences
  -d, --differences[=<permanent>]
                         highlight changes between updates
  -e, --errexit          exit if command has a non-zero exit
  -g, --chgexit          exit when output from command changes
  -n, --interval <secs>  seconds to wait between updates
  -p, --precise          attempt run command in precise intervals
  -t, --no-title         turn off header
  -x, --exec             pass command to exec instead of "sh -c"

 -h, --help     display this help and exit
 -v, --version  output version information and exit

http proxy pass에 ajp로 연결된 것도 확인 해 봤다. 8109번 포트를 사용 중으로 맞는지는 확인해 봐야 함.

netstat -anp | grep ":81\|:18443" | egrep "(ESTABLISHED|SYNC)" | wc -l
tcp        0      0 127.0.0.1:59464      127.0.0.1:8109       ESTABLISHED 7184/httpd
tcp        0      0 127.0.0.1:59350      127.0.0.1:8109       ESTABLISHED 7073/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59520      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59450      127.0.0.1:8109       ESTABLISHED 7162/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59392      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59384      127.0.0.1:8109       ESTABLISHED 7117/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59380      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59450      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59464      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59524      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59384      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59508      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59520      127.0.0.1:8109       ESTABLISHED 6988/httpd
tcp        0      0 127.0.0.1:59508      127.0.0.1:8109       ESTABLISHED 7216/httpd
tcp        0      0 127.0.0.1:59396      127.0.0.1:8109       ESTABLISHED 7122/httpd
tcp        0      6 127.0.0.1:8109       127.0.0.1:59540      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59202      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:8109       127.0.0.1:59396      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59540      127.0.0.1:8109       ESTABLISHED 7220/httpd
tcp        0      0 127.0.0.1:59448      127.0.0.1:8109       ESTABLISHED 7161/httpd
tcp        0      0 127.0.0.1:59202      127.0.0.1:8109       ESTABLISHED 6988/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59448      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59392      127.0.0.1:8109       ESTABLISHED 7119/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59350      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59524      127.0.0.1:8109       ESTABLISHED 7219/httpd
tcp        0      0 127.0.0.1:59380      127.0.0.1:8109       ESTABLISHED 7115/httpd
tcp        0      0 127.0.0.1:8109       127.0.0.1:59456      ESTABLISHED 30136/java
tcp        0      0 127.0.0.1:59456      127.0.0.1:8109       ESTABLISHED 7168/httpd

 

반응형
Comments