sudo netstat -antup
kill -s 9 50713
netstat -n | grep 61616
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

linux 端口号、进程id、杀进程、查询tcp的连接(各种状态的)的更多相关文章

  1. linux端口号与PID的互相查询

    最近用linux在玩Tomcat,启动的时候总是会报错(8080/8009/8005) 于是整理了一下网上零乱的查看PID和端口的命令,以备记录. 1.由端口号查询PID号 首先myeclipse报错 ...

  2. centos shell 编程-通过端口号kill对应的进程

    centos shell 编程-通过端口号kill对应的进程 方式一.端口固定 ------------------killportprocess.sh fSum() {    pid=$(lsof ...

  3. win7命令行 端口占用 查询进程号 杀进程

    打开CMD窗口 win+R–>cmd 根据端口号查找进程号 netstat -nao|grep 端口号 根据进程号得到进程名 tasklist |findstr 进程号 杀进程 taskkill ...

  4. 进程的基本属性:进程ID、父进程ID、进程组ID、会话和控制终端

    摘要:本文主要介绍进程的基本属性,基本属性包含:进程ID.父进程ID.进程组ID.会话和控制终端. 进程基本属性 1.进程ID(PID) 函数定义:      #include <sys/typ ...

  5. 获取进程ID,父进程ID,进程完整路径

    准备写一个进程管理的功能模块,今天下午先写了扫描获取本机各个进程路径,获取各个进程映像名称,进程完整路径. 要获取进程信息,第一步想到的就是提权,提权代码用过多次了,今天也小结了一下(http://w ...

  6. 通过进程id找到进程对应的容器并统计每个进程的内存占用写到excel里

    # coding=utf-8 import re import os import commands import json import psutil from pyExcelerator impo ...

  7. linux如何查进程、杀进程

    本文系转载,转载原文地址:http://blog.sina.com.cn/s/blog_637112040100vl53.html 1.查进程   ps命令查找与进程相关的PID号:   ps a 显 ...

  8. linux下输出查看进程及杀进程

    1.查找有关tomcat的进程 ps -ef | grep tomcat 2.查看某端口占用情况 netstat -tulpn | grep 9009 3.杀进程 普通:kill 进程id 强制:ki ...

  9. 【Linux】使用awk批量杀进程

    pkill 杀一个用户的所有进程 pkill -u bingo 批量杀进程 使用ps -ef|grep aaa 查出相关进程 使用grep -v grep 过滤掉grep本身产生的进程 使用awk 打 ...

  10. Win7 查看端口占用的进程,并根据进程id杀死进程。

    搞开发的经常会有一堆的工具要使用,而很多工具都需要开启特定的端口,难免会出现端口冲突的场景,那在Win7 环境下如何排除端口被哪个进程占用了呢? 首先,通过 netstat -ano | findst ...

随机推荐

  1. CentOs安装Mysql和配置初始密码

    mysql官网yum安装教程,地址:https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/#repo-qg-yum-fresh-install ...

  2. 【Java】关于Spring框架的总结 (一)

    本文总结一些关于Spring框架的理解,注意点及基础操作.如果有不对的地方,欢迎批评和建议.大家一起努力吧! Spring 框架简介 Spring 是一个开源框架,是为了解决企业应用程序开发复杂性而创 ...

  3. python2.7入门---SMTP发送邮件

        SMTP(Simple Mail Transfer Protocol)即简单邮件传输协议,它是一组用于由源地址到目的地址传送邮件的规则,由它来控制信件的中转方式.python的smtplib提 ...

  4. **leetcode笔记--4 Sum of Two Integers

    question: Calculate the sum of two integers a and b, but you are not allowed to use the operator + a ...

  5. Unity3d创建物体,寻找物体,加载物体,添加脚本

    GetCreateObject: using UnityEngine; public class GetCreateObject : MonoBehaviour { GameObject emptyG ...

  6. 「暑期训练」「Brute Force」 Optimal Point on a Line (Educational Codeforces Round 16, B)

    题意 You are given n points on a line with their coordinates $x_i$. Find the point x so the sum of dis ...

  7. 「日常训练」 神、上帝以及老天爷 (HDU 2048)

    题意 数论中的错排问题.记错排为Dn" role="presentation">DnDn,求Dnn!" role="presentation&q ...

  8. 在Kotlin编写RecyclerView适配器(KAD 16)

    作者:Antonio Leiva 时间:Mar 14, 2017 原文链接:https://antonioleiva.com/recyclerview-adapter-kotlin/ 通过创建Recy ...

  9. QC的使用学习(一)

    今天学习的时间很少,就利用睡前的一点时间来学习一下刚安装好的QC. 1.后台站点管理.主要是对八大选项的了解: site project:顾名思义,就站点项目管理,管理域和项目. site user: ...

  10. 官方文档 恢复备份指南七 Using Flashback Database and Restore Points

    本章内容: Understanding Flashback Database, Restore Points and Guaranteed Restore Points Logging for Fla ...