差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

下次修改
前次修改
tech:networktips [2010/10/14 09:38] – 建立 jonathantech:networktips [2016/11/01 17:38] (目前版本) jonathan
行 1: 行 1:
 +====== Linux 網路相關整理 ======
 +===== 看到 Liston Port 要確認是哪個程式在執行? =====
 +假設看到主機有程式在 Liston 732
 +<code sh>
 +lsof -i :732
 +</code>++++結果|<file>
 +[root@x206-web bin]# lsof -i :732
 +COMMAND    PID    USER   FD   TYPE DEVICE SIZE NODE NAME
 +rpc.statd 2246 rpcuser    7u  IPv4   7749       TCP *:732 (LISTEN)
 +</file>++++
 +或是
 +<code sh>
 +netstat -anp | grep ':732'
 +</code>++++結果|<file>
 +[root@x206-web bin]# netstat -anp | grep ':732'
 +tcp        0      0 0.0.0.0:732                 0.0.0.0:                  LISTEN      2246/rpc.statd
 +</file>++++
 +
 +===== 確認現在網卡的連線速度 =====
 +因為無法遠端看到網卡燈號是綠燈或橘燈.
 +<code sh>
 +ethtool eth0 | grep Speed
 +</code>++++結果|<file>
 +[root@HP-ML10G9 ~]# ethtool eth0 | grep Speed
 +        Speed: 1000Mb/s
 +</file>++++
 +也可以使用以下語法<code sh>
 +cat /sys/class/net/eth0/speed
 +</code>++++結果|<file>
 +[root@asus-ts100e7 ~]# cat /sys/class/net/eth0/speed
 +1000
 +</file>++++
 +
 +===== 參考資料 =====
 +  * http://forum.soft32.com/linux/Port-732-ftopict348880.html
 +  * http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/
 +
 +
 +{{tag>network tips}}