Home>Article>Operation and Maintenance> How to check nginx port

How to check nginx port

步履不停
步履不停 Original
2019-06-21 11:15:37 168074browse

How to check nginx port

Use the commandnetstat -apnto check the nginx port usage, and then useps -aux | grep 7017to see which process pid is used by which application used by the program.

[root@iZ94j7ahvuvZ sbin]# netstat -apn Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7017/nginx tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 870/sshd tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 991/mysqld tcp 0 0 120.25.153.204:51072 110.75.102.62:80 ESTABLISHED 1149/AliYunDun tcp 0 52 120.25.153.204:22 49.73.142.235:49769 ESTABLISHED 2231/sshd udp 0 0 120.25.153.204:123 0.0.0.0:* 878/ntpd udp 0 0 10.116.151.96:123 0.0.0.0:* 878/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 878/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 878/ntpd

See which process pid is used by which application

[root@iZ94j7ahvuvZ sbin]# ps -aux | grep 7017Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ root 7017 0.0 0.0 24276 788 ? Ss 11:07 0:00 nginx: master process ./nginx root 7044 0.0 0.0 103264 856 pts/0 S+ 11:22 0:00 grep 7017

For more Nginx related technical articles, please visitNginx tutorialcolumn to study!

The above is the detailed content of How to check nginx port. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn