linux 查看占用端口并kill掉
2024-08-27 21:14:03
主要可以使用ps 命令 或 netstat 命令
weihong@data1:~/jd_parser/jd_parser$ ps aux | head
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 0.0 0.0 ? Ss 1月18 : /sbin/init
root 0.0 0.0 ? S 1月18 : [kthreadd]
root 0.0 0.0 ? S 1月18 : [ksoftirqd/] weihong@data1:~/jd_parser/jd_parser$ netstat -tlnp | head
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0.0.0.0: 0.0.0.0:* LISTEN -
tcp 127.0.0.1: 0.0.0.0:* LISTEN -
tcp 127.0.0.1: 0.0.0.0:* LISTEN -
weihong@data1:~/jd_parser/jd_parser$ netstat -tlnp | grep
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0.0.0.0: 0.0.0.0:* LISTEN /python
tcp6 ::: :::* LISTEN /python
weihong@data1:~/jd_parser/jd_parser$ kill -
最新文章
- js Date 函数方法 和 移动端数字键盘调用
- 转(Delphi 新窑洞):使用delphi 开发多层应用(十七)使用RTC web 服务器返回JSON
- Fiddler捕捉ASP.NET WebSite调用WebService、WCF服务
- 自定义View_1_关于View,ViewGroup的测量和绘制流程
- Git.Framework 框架随手记-- 分享一个";比较垃圾";的项目
- LeetCode Lowest Common Ancestor of a Binary Serach Tree
- vue.js插件使用(01) vue-resource
- COJ 0260 HDNOIP201204四个国王
- DataTable转json字符串,jQuery.parseJSON()把json字符串转为标准的json对象格式
- linq中的cast<;T>;()及OfType<;T>;()
- pkgmgmt: Comparison between different Linux Systems..
- Asp.Net Core API网关Ocelot
- 关于基线baseline及与inline-block、vertical-aline等属性的关系(完善中.......)
- 解决Windows10运行VMware Workstation出现与Device Guard不兼容导致无法运行与创建虚拟机问题
- Gparted Live分区调整
- shell脚本--cut命令与awk简单使用
- 工作中bug笔记
- java 中的闭包
- Haproxy的三种保持客户端会话保持方式
- 8.ajax与django后台json数据的交互