linux删除指定端口的进程
2013-03-11 18:54
204 查看
用该命令可以找出使用端口的进程。可写脚本监控,停止端口及进程~
例如:fuser -n tcp 3306 | ps aux | grep 24594 | grep -v "grep"
若要将使用该端口的进程kill
例如:fuser -k -n tcp 3306
usage: fuser [ -a | -s ] [ -n space ] [ -signal ] [ -kimuv ] name ...
[ - ] [ -n space ] [ -signal ] [ -kimuv ] name ...
fuser -l
fuser -V
-a display unused files too
-k kill processes accessing that file
-i ask before killing (ignored without -k)
-l list signal names
-m mounted FS
-n space search in the specified name space (file, udp, or tcp)
-s silent operation
-signal send signal instead of SIGKILL
-u display user ids
-v verbose output
-V display version information
-4 search IPv4 sockets only
-6 search IPv6 sockets only
- reset options
udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]
例如:fuser -n tcp 3306 | ps aux | grep 24594 | grep -v "grep"
若要将使用该端口的进程kill
例如:fuser -k -n tcp 3306
usage: fuser [ -a | -s ] [ -n space ] [ -signal ] [ -kimuv ] name ...
[ - ] [ -n space ] [ -signal ] [ -kimuv ] name ...
fuser -l
fuser -V
-a display unused files too
-k kill processes accessing that file
-i ask before killing (ignored without -k)
-l list signal names
-m mounted FS
-n space search in the specified name space (file, udp, or tcp)
-s silent operation
-signal send signal instead of SIGKILL
-u display user ids
-v verbose output
-V display version information
-4 search IPv4 sockets only
-6 search IPv6 sockets only
- reset options
udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]
相关文章推荐
- linux 下查看指定端口的进程,删除进程
- windows和linux杀死指定端口占用进程
- [linux] 查看占用指定端口进程ID
- window下删除指定端口的进程
- linux 系统批量删除一个月之前的指定的iperf进程
- linux: 获取监听指定端口的进程PID
- Linux获取监听指定端口的进程PID
- Linux 一条命令删除某端口被占用的进程
- 菜鸟学Linux命令:lsof命令 查找指定用户、进程、端口打开的文件
- linux 一条语句删除指定进程
- Linux下用 lsof 命令查找指定端口被哪个进程占用
- Linux下tomcat作为守护进程运行(开机启动、以指定的用户运行、解决非root身份不能绑定1024以下端口的问题)的配置方法
- 查找指定端口被哪个进程占用&&恢复删除的文件
- Linux 下如何查找指定端口被哪个进程占用 lsof
- linux 系统删除 3天以前的 指定的进程
- Linux下用 lsof 命令查找指定端口被哪个进程占用
- 如何在Window或Linux/Unix中查找并干掉占用指定端口的进程
- Linux 下如何查找指定端口被哪个进程占用 lsof
- linux查询端口,删除进程
- C#实现检查指定端口被哪个进程占用