WINDOWS下获得端口对应的进程名1

Windows开发必备:端口进程管理 这篇文章介绍了Windows开发中端口和进程管理的实用技巧。主要内容包括:使用netstat命令查找特定端口对应的进程PID,通过taskkill终止进程(支持按进程名或PID终止),以及用tasklist查看进程详情。文章还提供了三步走的问题解决流程和实用的BAT脚本,能够批量处理端口占用问题。最后提醒注意事项,如管理员权限要求、数据丢失风险等,并建议将常驻进程配置为系统服务。这些命令组合能有效解决开发中常见的端口冲突和进程管理问题。 阅读详情
 

#include "stdafx.h"
#include <stdio.h>
#include <windows.h>
#pragma comment(lib, "ws2_32.lib")
typedef struct _HandleInfo
{
USHORT wPid;
USHORT wCreatorBackTraceIndex;
BYTE   objType;
BYTE   handleAttibs;
USHORT handleOffset;
DWORD  dwKeObject;
ULONG  dwGrantedAccess;

}HANDLEINFO, *PHANDLEINFO;


int main(int argc, char* argv[])
{
WSADATA wd;
unsigned int ret = WSAStartup(0x0202, &wd);

typedef DWORD (WINAPI *PQuerySystemInformation)(DWORD, PBYTE, DWORD, PDWORD);

PQuerySystemInformation pQuerySystemInformation = (PQuerySystemInformation)GetProcAddress(GetModuleHandle("ntdll.dll"), "ZwQuerySystemInformation");
if(pQuerySystemInformation == NULL)
{
MessageBox(NULL, "Can't find NtQuerySystemInformation int Ntdll.dll!", "Failed", 0);
return 1;
}

BYTE *buf = new BYTE[20];
PHANDLEINFO phandleinfo = NULL;
DWORD dwRetSize = 0;
DWORD dwNum = 0;
unsigned int i;

ret = pQuerySystemInformation(16, buf,20,&dwRetSize);
if(0 != ret)
{
if(dwRetSize > 0)
{
//dwNum = dwRetSize/sizeof(HANDLEINFO);
delete [] buf;
buf = new BYTE[dwRetSize];
ret = pQuerySystemInformation(16, buf, dwRetSize, &dwRetSize);
if(0 != ret)
{
printf("Can't get any handles!/n");
goto end;
}
}
else
{
goto end;
}
}
dwNum = *(DWORD*)buf;
phandleinfo = (PHANDLEINFO)(buf+4);

for(i=0;i<dwNum;i++)
{
//static int iCount = 0;
//static WORD wPid = -1;
HANDLEINFO *pSeek = phandleinfo + i;
if((pSeek->objType==0x1a) && (pSeek->wPid))
{
//iCount++;
//wPid = pSeek->wPid;

HANDLE hSrcProcess;
hSrcProcess = OpenProcess(PROCESS_ALL_ACCESS,TRUE, pSeek->wPid);
if(hSrcProcess == NULL)
continue;

__try
{

 

SOCKET hSock;
ret = DuplicateHandle(hSrcProcess, (HANDLE)(pSeek->handleOffset), GetCurrentProcess(), (HANDLE *)&hSock, STANDARD_RIGHTS_REQUIRED,TRUE,0);

if(ret == 0)
{
int errcode = GetLastError();
continue;
}
sockaddr_in in = {0};
in.sin_family = AF_INET;
int dwSize = sizeof(in);
if(SOCKET_ERROR != getsockname(hSock, (sockaddr *)&in, &dwSize))
{
char name[0x100] = {0};

HMODULE hDll = LoadLibrary("psapi.dll");
typedef DWORD (WINAPI *PGETMODULEFILENAMEEX)(HANDLE, HMODULE, LPTSTR, DWORD);
//typedef BOOL (WINAPI *PENUMPROCESSMODULES)(HANDLE, HMODULE*, DWORD, LPDWORD);
PGETMODULEFILENAMEEX pfunc = (PGETMODULEFILENAMEEX)GetProcAddress(hDll, "GetModuleFileNameExA");
//PENUMPROCESSMODULES penum = (PENUMPROCESSMODULES)GetProcAddress(hDll, "EnumProcessModules");
//DWORD dwCb, dwRet;
//HMODULE module[1000];
//ret = penum(hSrcProcess

pfunc(hSrcProcess, NULL, name, 0x100);


FreeLibrary(hDll);

printf("socket:%4d  port:%4d  PID:%4d(%s)/n", pSeek->handleOffset, ntohs(in.sin_port), pSeek->wPid, name);

}
}
__finally
{
CloseHandle(hSrcProcess);
}
}

}

getchar();

end:
delete [] buf;
return 0;
}

vSphere环境证书更新/续订案例及注意事项 早期VMware的用户随后“十年之期”已到,陆陆续续出现各种登录问题,证书报错告警等,主要包含6.5到7.0的版本,VMware服务器虚拟化环境涉及的证书及类型较多,在实际更新中会出现各种奇怪的问题,有些坑耗费了大量的troubleshooting时间,极端情况下一天能看到十多遍如下报错😂本文整理了一个近期的更新案例,以及之前处理过的一些问题,仅作参考CA根证书颁发机构,用于签发其他组件的证书,其他证书的有效期不会超过根证书。 阅读详情

相关推荐

ADS AEL脚本进阶:参数化电感与变压器的自动化设计

本文深入探讨了如何利用ADS AEL脚本实现电感与变压器的参数化与自动化设计。通过构建可复用的函数库、封装高级设计流程、集成DRC检查与性能预估,将繁琐的手动绘制升级为高效的智能设计引擎,并最终通过创建GUI工具降低使用门槛,大幅提升射频/微波电路设计效率。

weixin_29309785的博客 208

“一切皆文件“ 视角下的网卡

dev/sda 可以通过任何一个程序以任意方式读写,定义一套任意的私有格式(或文件系统)即可,而 /dev/eth0 则必须和对端共同遵守一套格式和逻辑,这同一套格式和逻辑就是 TCP/IP,将 TCP/IP 汇聚于系统本身或共享库中最直接,这取消了直接读写网卡的需求,而调用系统或共享库中协议例程的接口就是 socket。创建像 /dev/sda 一样的设备文件 /dev/eth0 读写网卡不难,像 /dev/net/tun 注册物理网卡就行,但你读写它时要自己手工做协议的封装和解封装。

TCP/IP 1万+

ChatBI告别“NL2SQL依赖症”!从准确率50%到90%,3大技术路线+4个企业案例拆解核心玩法

摘要: ChatBI通过自然语言交互实现数据民主化,其核心是“语义理解+数据执行+知识沉淀”的全链路能力,而非单一的NL2SQL技术。行业采用三大技术路线提升准确率:专有知识库(提升30%)、指标标签语义层(准确率85%)、JSON中间层(多轮对话提升25%)。数据执行方案包括NL2SQL、NL2API等,需结合场景选择。企业落地需解决四大痛点:跨表查询准确率低(引入拓扑图)、模糊查询(用户干预机制)、响应慢(预计算缓存)、多轮对话(上下文池)。Spring AI Alibaba提供轻量级集成方案,助力企业

weixin_52610848的博客 1670

windows 命令查看端口、进程、进程名

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34395205的博客 2633

基于PLC的冲压件自动生产线电气系统设计【附数据】

考虑到生产线的高效运行和维护简便性,选择了三菱FX系列的可编程逻辑控制器(PLC)作为核心控制单元,该型号的PLC因其高可靠性和强大的功能集,在工业自动化领域有着广泛的应用。最后,在完成初步的软件开发后,进行了多轮次的模拟测试和现场调试,逐步修正了存在的问题,最终达到了预期的功能要求。例如,对于进料环节,选用了光电传感器以精确检测物料的位置;此外,为了适应不同尺寸的工件加工需求,还特别设计了一套可调节的夹具系统,不仅提高了生产线的灵活性,同时也降低了更换模具的成本。✅ 感恩科研路上每一位志同道合的伙伴!

lagougongzuoshi的博客 1300

k8s重装1.28.2+calico+踩坑收集+InPlacePodVerticalScaling

它提供了从镜像构建(通过 Dockerfile)、镜像管理(上传、下载、存储等)、容器创建、运行、网络配置(可以为容器分配自定义的网络,如 bridge 网络、host 网络等)到容器编排(通过 Docker Compose 可以简单地编排多个容器的启动和关联关系)等一整套完整的解决方案。它的核心功能是启动和管理容器的生命周期。sudo apt update这个可以经常用,是来更新软件包的,它不下载,所以没风险,但是经常会报错,别问,问就是某种强大的力量,所以用镜像或者代理或者巴拉巴拉。

SsjjsS2019的博客 2562

详细的查询进程和端口的 API 的方法

查询进程和端口的 API 介绍: 好,上面说的有点离题了,这篇博文的目的在应用层而不在内核层, 所以我们无须去体会 Windows 网络层的这种变化。 一般来说,要完成进程和端口的映射,我们使用的是由 IPHlpapi.dll 中导出的 API 来完成的, 在 Vista 之前的操作系统中,要查询进程和端口的信息,容易很多, 你可以通...

weixin_30709929的博客 611

Java与OSG的梦幻联动:深入编译OpenSceneGraph的Java JNI桥梁,开启3D视觉盛宴的奇幻之旅

🔥关注墨瑾轩,带你探索编程的奥秘!🚀🔥超萌技术攻略,轻松晋级编程高手🚀🔥技术宝库已备好,就等你来挖掘🚀🔥订阅墨瑾轩,智趣学习不孤单🚀🔥即刻启航,编程之旅更有趣🚀在编译OpenSceneGraph (OSG) 的Java版本时,首先需要了解OSG本身是一个主要用于3D图形和视觉仿真的开源库,它主要支持C++。然而,OSG 也支持通过JNI(Java Native Interface)与Java集成,这允许Java程序调用OSG的C++库。

java专栏 875

【windows】windows系统如何查看端口监听、进程和杀进程

Windows 上打开cmd的三种方式 1. Win + R 2. C:\Windows\System32\cmd.exe 2. 输入%comspec%也可以打开cmd 查看端口监听和对应的PID 语法: netstat –ano | findstr "<端口号>" netstat –ano | findstr "1080" 图中的地2列为端口本机端口监听,所对应的PID为最后一列 查看该PID对应的进程名称 语法: task...

michaelwoshi的博客 1万+

黑猫带你学eMMC协议第1篇:全网最全emmc协议中文详讲,这份学习框架图,你值得拥有!!!(持续更新中...)

黑猫带你学eMMC协议第7篇:全网最全emmc写保护详解(write protect) 黑猫带你学eMMC协议第8篇:emmc可靠写详解(Write Reliability) 黑猫带你学eMMC协议第9篇:emmc的分区配置(partitioning) 黑猫带你学eMMC协议第10篇:eMMC命令队列详解(CMDQ) 黑猫带你学eMMC协议第11篇:eMMC擦除详解(erase/trim/discard/sanitize/secure erase/secure trim…) 黑猫带你学eMMC协议第12篇:

黑猫奥利奥的博客 2万+

2023华为OD面试手撕真题【最长公共前缀】

2023华为OD面试手撕真题【最长公共前缀】

MISAYAONE的博客 5257

Windows查看指定端口被哪个进程占用

1.打开CMD命令行,输入 netstat -ano|findstr “端口号” 查看进程,不要漏掉双引号: netstat -ano|findstr "端口号" 以查找 8989 端口为例,通过 Netstat 可以找到是 PID 为 31684 的进程占用了 8989 端口: 2.使用Tasklist查看对于 PID 的进程名: tasklist|findstr "PID号" 可以看到是 java.exe 进程占用了该端口: 如果我们想结束该进程,可以在任务管理器(详细信息)内找到该进程,可直接

yzpbright的博客 2万+

全志 camera: 4路AHD摄像头转MIPI

TP2815 驱动模块主要实现将 4 路的 AHD/TVI/CVBS Camera 的数据转换为 MIPI 数据,从而实现在 T527 端来对数据进行处理和送显。

Linux驱动开发工程师,熟悉Linux/Android底层驱动、TP、显示、IIC、网络等通用外设调试适配,Linux上层应用开发。常用平台瑞芯微、全志、恩智浦等。 9134

使用Win32 API获得端口占用列表并关闭对应进程

获得端口占用可以用命令netstat -ab实现,结束进程可以用taskkill,但是用C++怎么实现呢? 答案是Windows已经提供了API实现功能。GetTcpTable可以得到当前占用的端口数量以及具体的ip和端口,但是得不到对应的进程。GetTcpTable2可以额外获得占用端口对应进程的pid,拿到pid,后面问题就好办了。 下面是效果图: 源码: #define _WINSOCK_DEPRECATED_NO_WARNINGS #include <iostream> #inclu

tomwillow的博客 2194

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

windows查看进程及对应端口的进程

windows查看进程及对应端口的进程 1、netstat netstat -ano|findstr "123" 123是进程号和端口号都可以,可以不用"号 netstat -aon|findstr 8080 端口号 netstat -aon|findstr 9464 进程号 a:显示所有地址和端口号 n:以数字形式显示 o:显示进程pid 注意,netstat不能杀死进程 2、tasklist tasklist|findstr "pid"可以是进程号和进程名称 例子 进程名称,输出包含

集电极 1万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

windows查找端口,杀死对应进程

在 Windows 系统中,你可以按以下步骤查找指定端口并杀死对应的进程。

滴水石穿 2230

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

如何在windows下查看端口被哪个进程占用及端口是否通畅(可访问)?

操作环境:windows 在进入本文前,先思考以下几个问题: 1. 如何查看端口使用情况? 2.如何查看指定端口使用情况? 3. 如何查看端口对应的进程ID(即PID)? 4. 如何根据PID查看是哪个程序占用了端口? 5. 如何查看某个ip地址的端口是否通畅(可访问)? Windows提供了netstat命令,能够显示当前的 TCP/IP 网络连接情况,注意:只有安装了TCP/I...

coolcoffee168的专栏 6976

Windows netstat 查看端口、进程占用

图中的端口号为1068,所对应的PID为3840。IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 和 UDPv6 的统计信息;IP、IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 或 UDPv6。目标:在Windows环境下,用netstat命令查看某个端口号是否占用,为哪个进程所占用.从 (c)图 可以看出,PID为3840所对应的进程名字为msnmsgr.exe。查看PID对应的进程名称。可以查看netstat的相关信息。在底部的 [] 中,顶部是其调用的组件,

kittyicd的博客 2707

[原创] WinXP下根据端口查询对应的进程

####################################################### QueryPortW.pl# 根据端口查询对应的进程(Windows XP 版本)# Author:  Rick Cheng# Date:    2005-10-30   # Version: 1.0############################################

SIA的专栏 1204

windows netstat 查看端口、进程占用

标:在Windows环境下,用netstat命令查看某个端口号是否占用,为哪个进程所占用. 操作:操作分为两步:(1)查看该端口被那个PID所占用;方法一:有针对性的查看端口,使用命令 Netstat –ano|findstr “<端口号>”,如图,最后一列为PID。图中的端口号为1068,所对应的PID为3840。 (a)图 方法二:查看所有的,然后找到对应的端口和PID。...

夫君子之行,静以修身,俭以养德,非淡泊无以明志,非宁静无以致远. 2007

如何看java进程端口_查看一个进程对应的端口号

一、liunx 下1.查找指定目标项目(atf web工程)进程的pidps -aux | grep atfroot 3582 0.1 11.2 382228 190588 ? Sl 09:31 0:19 java -Datf -jar start.jar etc/jetty.xmlroot 22121 0.0 0.0 1644 508 pts/1 R+ 12:12 0:00 grep atf2....

weixin_39864387的博客 7260

windows_查看端口被占用情况、结束进程

1、查看所有端口占用情况; 2、查看指定端口占用情况; 3、根据PID查看相应的进程或程序; 4、结束相应进程; 1、查看所有端口占用情况: win+R,调出cmd窗口: 回车: 查看所有端口占用情况: netstat -ano 2、查看指定端口占用情况(端口引号有没有都可以,此处以5040为例): netstat -aon|findstr 5040 or netstat -aon|findstr "5040" 记住最后一列数字PID,此处为5340。 3、根据PID查看相应的进.

pang787559613的博客 2432

Windows查看端口和进程

windows: 通过任务管理器查看进程信息 通过控制台查看进程信息 taskkill杀死进程 Linux: ps -ef //查看所有进程信息 kill 32029 //使用kill 进程id,杀死进程 top //查看所有进程信息,可以使用top命令 Java自带工具: jps查看进程ID jstack查看进程中的线程状态 ......

qq_44885775的博客 1万+

【转载】Windows netstat 查看端口、进程占用

在Windows环境下,用netstat命令查看某个端口号是否占用,为哪个进程所占用. 操作:操作分为两步: 1)查看该端口被那个PID所占用; 方法一:有针对性的查看端口,使用命令 netstat –ano|findstr “<端口号>”(个人测试,win7下DOS命令中,端口不能带“”),如图,最后一列为PID。图中的端口号为1068,所对应的PID为3840。 ...

tecoes的博客 1944

windows中查找端口占用并删除对应进程

以 8080 端口为例 1 查找 8080端口的占用情况 在powershell中输入 netstat -ano | findstr "8080" 找到对应的进程号PID 为8720 2 找到对应的PID所在的进程名称 tasklist | findstr "5768" 3 结束该进程 taskkill /f /t /im ApplicationWebServer.exe 4 相关参数描述 /f 强制终止进程 /t 终止指定的进程和它启动的子进程 /im 指定要

LeonSUST的博客 1282

Windows,Centos查看端口占用情况并结束对应的进程

Ctrl + Shift + Esc 打开任务管理器,输入对应的 PID 查看是那个程序。Ctrl + Shift + Esc 打开任务管理器,输入对应的 PID。此处占用 8080 端口的进程的 PID 为 4796。命令,回车,就可看到系统当前所有端口的占用情况。此处的 PID 为 8853 和 8859。### 2. 查看指定端口的占用情况。Win + R 打开命令窗。命令,结束端口占用的进程。

m0_73866100的博客 2372
上一篇: IDS五大发展趋势
下一篇: WINDOWS端口到进程的实现
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址