进程信息

 ##########################

 

查看linux系统进程内存使用排行榜前10名

ps aux | sort -k4,4nr | head -n 10

 

 

 

1、ss命令

 

ss -tulp

 

#查看某个端口客户端连接情况:客户端连接的ip和端口
ss  -nat  | grep port

 

 

 

 

2、ps命令

 

ps -ef|grep mysqld

 

 

3、根据进程id获得进程所用程序的绝对位置

 

ls -l  /proc/进程号/exe

 

4、查看进程使用的共享内存,包括使用的库,所在堆栈空间等。

 

[work@xxx scripts]$ ssh root@yyy
Last login: Wed Dec  9 16:15:39 2020 from xxx[root@yyy ~]# ps aux|grep less
root     144161  0.0  0.0 110248   996 pts/1    S+   17:07   0:00 less my.sh
root     144392  0.0  0.0 112644   964 pts/0    S+   17:07   0:00 grep --color=auto less
[root@yyy ~]# pmap -d 144161
144161:   less my.sh
Address           Kbytes Mode  Offset           Device    Mapping
0000000000400000     132 r-x-- 0000000000000000 0fd:00000 less
0000000000620000       4 r---- 0000000000020000 0fd:00000 less
0000000000621000      16 rw--- 0000000000021000 0fd:00000 less
0000000000625000      20 rw--- 0000000000000000 000:00000   [ anon ]
0000000001bcb000     132 rw--- 0000000000000000 000:00000   [ anon ]
00007fc69dee4000  103588 r---- 0000000000000000 0fd:00000 locale-archive
00007fc6a440d000    1752 r-x-- 0000000000000000 0fd:00000 libc-2.17.so
00007fc6a45c3000    2048 ----- 00000000001b6000 0fd:00000 libc-2.17.so
00007fc6a47c3000      16 r---- 00000000001b6000 0fd:00000 libc-2.17.so
00007fc6a47c7000       8 rw--- 00000000001ba000 0fd:00000 libc-2.17.so
00007fc6a47c9000      20 rw--- 0000000000000000 000:00000   [ anon ]
00007fc6a47ce000     148 r-x-- 0000000000000000 0fd:00000 libtinfo.so.5.9
00007fc6a47f3000    2048 ----- 0000000000025000 0fd:00000 libtinfo.so.5.9
00007fc6a49f3000      16 r---- 0000000000025000 0fd:00000 libtinfo.so.5.9
00007fc6a49f7000       4 rw--- 0000000000029000 0fd:00000 libtinfo.so.5.9
00007fc6a49f8000     128 r-x-- 0000000000000000 0fd:00000 ld-2.17.so
00007fc6a4c07000      12 rw--- 0000000000000000 000:00000   [ anon ]
00007fc6a4c16000       4 rw--- 0000000000000000 000:00000   [ anon ]
00007fc6a4c17000       4 r---- 000000000001f000 0fd:00000 ld-2.17.so
00007fc6a4c18000       4 rw--- 0000000000020000 0fd:00000 ld-2.17.so
00007fc6a4c19000       4 rw--- 0000000000000000 000:00000   [ anon ]
00007fffca963000     132 rw--- 0000000000000000 000:00000   [ stack ]
00007fffca9c5000       8 r-x-- 0000000000000000 000:00000   [ anon ]
ffffffffff600000       4 r-x-- 0000000000000000 000:00000   [ anon ]
mapped: 110252K    writeable/private: 356K    shared: 0K

 

 

 

 

 

 

 

#############################

posted @ 2019-10-17 14:38  igoodful  阅读(181)  评论(0编辑  收藏  举报