linux查询程序端口

学习链接

本地测试:

liusenubuntu@dataminingmaster:~$ netstat -ap| grep 9000
(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 *:9000                  *:*                     LISTEN      34891/python2.7 
tcp      502      0 192.168.106.129:9000    192.168.106.1:58969     CLOSE_WAIT  123886/python2.7
liusenubuntu@dataminingmaster:~$ netstat -ap| grep python
(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 *:9000                  *:*                     LISTEN      34891/python2.7 
tcp      502      0 192.168.106.129:9000    192.168.106.1:58969     CLOSE_WAIT  123886/python2.7
tcp        1      0 192.168.106.129:56546   10.5.129.59:6379        CLOSE_WAIT  123886/python2.7
tcp        1      0 192.168.106.129:40801   10.5.129.58:6379        CLOSE_WAIT  123886/python2.7
unix  3      [ ]         STREAM     CONNECTED     19573    2599/python         
unix  3      [ ]         STREAM     CONNECTED     19572    2599/python         
unix  3      [ ]         STREAM     CONNECTED     18772    2599/python         
liusenubuntu@dataminingmaster:~$ kill -9 502
bash: kill: (502) - No such process
liusenubuntu@dataminingmaster:~$ kill -9  123886
liusenubuntu@dataminingmaster:~$ netstat -ap| grep python
(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 *:9000                  *:*                     LISTEN      34891/python2.7 
unix  3      [ ]         STREAM     CONNECTED     19573    2599/python         
unix  3      [ ]         STREAM     CONNECTED     19572    2599/python         
unix  3      [ ]         STREAM     CONNECTED     18772    2599/python         
liusenubuntu@dataminingmaster:~$ kill -9 34891
liusenubuntu@dataminingmaster:~$ ls
anaconda3                  get-pip.py                   PycharmProjects
ctrip_work                 java_error_in_PYCHARM.hprof  Templates
Desktop                    local                        Videos
dialogsystemdev            Music                        yum-3.2.28
DialogSystemMasterProject  nltk_data                    yum-3.2.28.tar.gz
Documents                  Pictures                     备份文件
Downloads                  program
file                       Public
liusenubuntu@dataminingmaster:~$ netstat -ap| grep python
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
unix  3      [ ]         STREAM     CONNECTED     19573    2599/python         
unix  3      [ ]         STREAM     CONNECTED     19572    2599/python         
unix  3      [ ]         STREAM     CONNECTED     18772    2599/python         
liusenubuntu@dataminingmaster:~$ 

 

已标记关键词 清除标记
相关推荐
<p> <b><span style="background-color:#FFE500;">【超实用课程内容】</span></b> </p> <p> <br /> </p> <p> <br /> </p> <p> 本课程内容包含讲解<span>解读Nginx的基础知识,</span><span>解读Nginx的核心知识、带领学员进行</span>高并发环境下的Nginx性能优化实战,让学生能够快速将所学融合到企业应用中。 </p> <p> <br /> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><br /> </b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b><span style="background-color:#FFE500;">【课程如何观看?】</span></b> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> PC端:<a href="https://edu.csdn.net/course/detail/26277"><span id="__kindeditor_bookmark_start_21__"></span></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a> </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 移动端:CSDN 学院APP(注意不是CSDN APP哦) </p> <p style="font-family:Helvetica;color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 本课程为录播课,课程永久有效观看时长,大家可以抓紧时间学习后一起讨论哦~ </p> <p style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <br /> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <strong><span style="background-color:#FFE500;">【学员专享增值服务】</span></strong> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> <b>源码开放</b> </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 </p> <p class="ql-long-24357476" style="font-family:"color:#3A4151;font-size:14px;background-color:#FFFFFF;"> 下载方式:电脑登录<a href="https://edu.csdn.net/course/detail/26277"></a><a href="https://edu.csdn.net/course/detail/27216">https://edu.csdn.net/course/detail/27216</a>,播放页面右侧点击课件进行资料打包下载 </p> <p> <br /> </p> <p> <br /> </p> <p> <br /> </p>
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页