常用命令备忘
2010-07-25 10:58
323 查看
路由跟踪命令
tracert(windows)
traceroute(linux)
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each reply.
网络状态
netstat –ntp
-t 仅显示TCP连接
-l 显示正在监听的端口
-p 显示程序或PID
-n 以数字形式显示
结合grep,查看正在80端口监听的进程
netstat –anp | grep LISTEN | grep 80
查看连接数量
netstat -tlnp | grep 80 | wc -l
杀死进程
kill -9 pid
killall pname
tracert(windows)
traceroute(linux)
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each reply.
网络状态
netstat –ntp
-t 仅显示TCP连接
-l 显示正在监听的端口
-p 显示程序或PID
-n 以数字形式显示
结合grep,查看正在80端口监听的进程
netstat –anp | grep LISTEN | grep 80
查看连接数量
netstat -tlnp | grep 80 | wc -l
杀死进程
kill -9 pid
killall pname