当前位置:网站首页>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
边栏推荐
- PHP mnemonic code full text 400 words to extract the first letter of each Chinese character
- file_ put_ contents
- TP5 order multi condition sort
- [concurrent programming] collaboration between threads
- DOM 渲染系统(render mount patch)响应式系统
- 【Rust 笔记】13-迭代器(上)
- [concurrent programming] explicit lock and AQS
- [set theory] order relation (total order relation | total order set | total order relation example | quasi order relation | quasi order relation theorem | bifurcation | quasi linear order relation | q
- Message pack in C deserializes array objects
- Talking about: is the HashSet set ordered or disordered /hashset set unique, why can we store elements with the same content
猜你喜欢
![[MySQL] MySQL Performance Optimization Practice: introduction of database lock and index search principle](/img/b7/7bf2a4a9ab51364352aa5e0a196b6d.jpg)
[MySQL] MySQL Performance Optimization Practice: introduction of database lock and index search principle

20220630学习打卡

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

PHP uses foreach to get a value in a two-dimensional associative array (with instances)
![[concurrent programming] consistency hash](/img/5e/3d0a52caa8ca489a6e6267274bbb39.jpg)
[concurrent programming] consistency hash

Graphics_ Learnopongl learning notes

Es8 async and await learning notes

数据库原理期末复习

Concurrent programming (III) detailed explanation of synchronized keyword

Six dimensional space (C language)
随机推荐
Unity Editor Extension - Outline
Unity editor expansion - draw lines
如何应对数仓资源不足导致的核心任务延迟
too many open files解决方案
Unity editor expansion - the design idea of imgui
Apache startup failed phpstudy Apache startup failed
Parameters of convolutional neural network
Divide candy (circular queue)
[concurrent programming] Table hopping and blocking queue
Unity Editor Extension - event handling
Debug debugging - Visual Studio 2022
Unity multi open script
22-05-26 Xi'an interview question (01) preparation
How to deal with the core task delay caused by insufficient data warehouse resources
Redux - learning notes
Binary tree sorting (C language, char type)
file_ put_ contents
Escape from heaven and forget what he suffered. In ancient times, it was called the punishment of escape from heaven. Article collection
[rust notes] 05 error handling
[rust notes] 11 practical features