天天看點

linux的strace指令(詳解).txt,Linux strace指令詳解

Linux抓取TCP的指令: tcpdump

ps -ef 參數指令詳解:

linux的strace指令(詳解).txt,Linux strace指令詳解

Linux下一切皆檔案,我們打開一個socket,實際上也是打開了一個檔案

我們打開一個網卡,實際上也是調用Linux系統的網卡接口

Linux下有一個檔案清單,用來監控目前的程序

[[email protected] ~]# strace –help

linux的strace指令(詳解).txt,Linux strace指令詳解

機器A: 192.168.25.110   root登入   --> ssh [email protected]登入機器B

機器B: 192.168.25.133   omc登入    -->執行strace,追蹤機器A的ssh

機器B【192.168.25.110】:

linux的strace指令(詳解).txt,Linux strace指令詳解

機器A【192.168.25.133】:

[email protected]:~$ ps -ef|grep sshd [登陸前檢視目前程序]

[email protected]:~$ ps -ef|grep sshd [登陸後檢視新的程序]

[email protected]:~$ sudo strace -f -p 2087 -ttt -o /home/omc/ssh.log

linux的strace指令(詳解).txt,Linux strace指令詳解

[email protected]:~$ cat /home/omc/ssh.log |grep "write(9"

linux的strace指令(詳解).txt,Linux strace指令詳解