1. 查看系统内核
uname -a
2. ip地址
ifconfig <net-card-name> (ifconfig ens33)
ip addr
3. selinux
getenforce/setenforce
vi /etc/selinux/config -> SELINUX=enforce/disabled
4. netstat
接口: netstat -i
路由: netstat -r
5. network
service network restart
6. tail
-f: --follow
-n: --lines
-s: --sleep-interval
7. ps
a: 当前终端所有进程
u: 格式含当前用户
x: 当前用户所有终端进程
-e: 系统所有进程
-l: long
-f: full
8. top 实时动态查看系统运行
-u <user-name>
-p <pid>
-c <command-line>
9. df 磁盘使用
-h
-i
10. free 内存
-b/-k/-m/-t
11. netstat -anp | grep nginx
[root@k8s-master conf]# netstat -anp | grep nginx
tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 49278/nginx: master
unix 3 [ ] STREAM CONNECTED 257179 49278/nginx: master
unix 3 [ ] STREAM CONNECTED 257180 49278/nginx: master
12. ps aux | grep nginx
[root@k8s-master conf]# ps aux | grep nginx
10000 22072 0.0 0.1 23824 2536 ? Ss 23:02 0:00 nginx: master process nginx -g daemon off;
10000 22363 0.0 0.0 24288 1484 ? S 23:02 0:00 nginx: worker process
10000 22547 0.0 0.1 30136 2604 ? Ss 23:02 0:00 nginx: master process nginx -g daemon off;
10000 22762 0.0 0.0 30580 1580 ? S 23:02 0:00 nginx: worker process
root 49278 0.0 0.0 20536 608 ? Ss 23:20 0:00 nginx: master process nginx
nobody 49279 0.0 0.0 20980 1316 ? S 23:20 0:00 nginx: worker process
root 53721 0.0 0.0 112724 996 pts/0 R+ 23:23 0:00 grep --color=auto nginx
13. ps -elf | grep nginx
[root@k8s-master conf]# ps -elf | grep nginx
4 S 10000 22072 22000 0 80 0 - 5956 sigsus 23:02 ? 00:00:00 nginx: master process nginx -g daemon off;
5 S 10000 22363 22072 0 80 0 - 6072 ep_pol 23:02 ? 00:00:00 nginx: worker process
4 S 10000 22547 22530 0 80 0 - 7534 sigsus 23:02 ? 00:00:00 nginx: master process nginx -g daemon off;
1 S 10000 22762 22547 0 80 0 - 7645 ep_pol 23:02 ? 00:00:00 nginx: worker process
1 S root 49278 1 0 80 0 - 5134 sigsus 23:20 ? 00:00:00 nginx: master process nginx
5 S nobody 49279 49278 0 80 0 - 5245 ep_pol 23:20 ? 00:00:00 nginx: worker process
0 S root 53799 9811 0 80 0 - 28182 pipe_w 23:23 pts/0 00:00:00 grep --color=auto nginx
14.