From c67647cbd0c8f5a807001a9d1a845da757850089 Mon Sep 17 00:00:00 2001 From: mo-harlan Date: Fri, 19 Apr 2024 11:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3netstat=20-ano=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0pid=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ServiceMonitor/ServiceMonitor/CmdHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServiceMonitor/ServiceMonitor/CmdHelper.cs b/ServiceMonitor/ServiceMonitor/CmdHelper.cs index cde98378..175fa991 100644 --- a/ServiceMonitor/ServiceMonitor/CmdHelper.cs +++ b/ServiceMonitor/ServiceMonitor/CmdHelper.cs @@ -98,7 +98,7 @@ namespace ServiceMonitor if (strArr[1].EndsWith($":{port}")) { int result; - bool b = int.TryParse(strArr[4], out result); + bool b = int.TryParse(strArr[strArr.Length-1], out result); if (b && !list_pid.Contains(result)) list_pid.Add(result); } -- Gitee