当前位置:网站首页>Shell script kills the process according to the port number
Shell script kills the process according to the port number
2022-07-03 08:53:00 【Xiaoping is extraordinary】
port=8030
# According to the port number to query the corresponding PID
pid = $(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{print $1}');
# Kill the corresponding process If PID non-existent , That is, the port is not turned on , Do not perform
if [ -n "$pid" ]; then
kill -9 $pid;
fi
边栏推荐
- 22-05-26 西安 面试题(01)准备
- Graphics_ Learnopongl learning notes
- Find the combination number acwing 886 Find the combination number II
- Markdown learning
- [RPC] RPC remote procedure call
- Alibaba canaladmin deployment and canal cluster Ha Construction
- cres
- Gif remove blank frame frame number adjustment
- MySQL index types B-tree and hash
- 【Rust笔记】06-包和模块
猜你喜欢
![[concurrent programming] explicit lock and AQS](/img/5f/a80751a68726f53d11133810f454a3.jpg)
[concurrent programming] explicit lock and AQS

Life cycle of Servlet
![[concurrent programming] working mechanism and type of thread pool](/img/51/d21428a7c95c0a5177e8198742e78c.jpg)
[concurrent programming] working mechanism and type of thread pool

Sending and receiving of request parameters

记忆化搜索 AcWing 901. 滑雪
![[concurrent programming] thread foundation and sharing between threads](/img/26/60fbfe65b186867a3b1cb58d481226.jpg)
[concurrent programming] thread foundation and sharing between threads

高斯消元 AcWing 883. 高斯消元解线性方程组

树形DP AcWing 285. 没有上司的舞会

分配异常的servlet

XPath实现XML文档的查询
随机推荐
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
PHP mnemonic code full text 400 words to extract the first letter of each Chinese character
How to deal with the core task delay caused by insufficient data warehouse resources
JS non Boolean operation - learning notes
记忆化搜索 AcWing 901. 滑雪
Unity Editor Extension - drag and drop
[rust notes] 13 iterator (Part 1)
MySQL index types B-tree and hash
ES6 promise learning notes
Divide candy (circular queue)
【Rust 笔记】09-特型与泛型
UE4 source code reading_ Bone model and animation system_ Animation process
[concurrent programming] explicit lock and AQS
Unity Editor Extension - Outline
Mortgage Calculator
【Rust 笔记】07-结构体
Dom4j traverses and updates XML
Unity multi open script
Memory search acwing 901 skiing
20220630 learning clock in