From 98409ab771d9152f6e6d779f67bc8c399cda1377 Mon Sep 17 00:00:00 2001 From: "Eric, a DBA" Date: Mon, 25 Dec 2023 09:24:48 +0800 Subject: [PATCH 1/2] Update Net.java update network adapter name identifier prefix --- .../src/main/java/com/sohu/cache/server/data/Net.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java b/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java index 7a779dd4..e6a210ba 100644 --- a/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java +++ b/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java @@ -30,7 +30,7 @@ public void parse(String line, String timeKey) throws Exception{ String[] items = line.split(","); if(items[1].startsWith("Network")) { for(int i = 0; i < items.length; ++i) { - if(items[i].startsWith("eth")) { + if(items[i].startsWith("eth") || items[i].startsWith("ens") items[i].startsWith("enp")) { NetworkInterfaceCard nic = new NetworkInterfaceCard(); nic.setName(items[i]); nic.setIdx(i); From 526da39985252ddc93b2606d602acd26cb5c94a8 Mon Sep 17 00:00:00 2001 From: "Eric, a DBA" Date: Mon, 17 Jun 2024 10:37:02 +0800 Subject: [PATCH 2/2] Update Net.java --- .../src/main/java/com/sohu/cache/server/data/Net.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java b/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java index e6a210ba..ddfbd86f 100644 --- a/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java +++ b/cachecloud-web/src/main/java/com/sohu/cache/server/data/Net.java @@ -30,7 +30,7 @@ public void parse(String line, String timeKey) throws Exception{ String[] items = line.split(","); if(items[1].startsWith("Network")) { for(int i = 0; i < items.length; ++i) { - if(items[i].startsWith("eth") || items[i].startsWith("ens") items[i].startsWith("enp")) { + if(items[i].startsWith("eth") || items[i].startsWith("en")) { NetworkInterfaceCard nic = new NetworkInterfaceCard(); nic.setName(items[i]); nic.setIdx(i);