27 lines
852 B
Diff
27 lines
852 B
Diff
|
|
From 9e7d6b2796f669a5e41f5e4fb5ea349a39d8795b Mon Sep 17 00:00:00 2001
|
||
|
|
From: caodongxia <315816521@qq.com>
|
||
|
|
Date: Thu, 14 Jul 2022 15:16:42 +0800
|
||
|
|
Subject: [PATCH] fix out of range
|
||
|
|
|
||
|
|
---
|
||
|
|
src/pcp/mpstat/pcp-mpstat.py | 3 +++
|
||
|
|
1 file changed, 3 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py
|
||
|
|
index fefb6aa..17da944 100755
|
||
|
|
--- a/src/pcp/mpstat/pcp-mpstat.py
|
||
|
|
+++ b/src/pcp/mpstat/pcp-mpstat.py
|
||
|
|
@@ -602,6 +602,9 @@ class MpstatReport(pmcc.MetricGroupPrinter):
|
||
|
|
# need two fetches to report rate converted counter metrics
|
||
|
|
return
|
||
|
|
|
||
|
|
+ if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues:
|
||
|
|
+ return
|
||
|
|
+
|
||
|
|
if self.Machine_info_count == 0:
|
||
|
|
self.print_machine_info(group, manager)
|
||
|
|
self.Machine_info_count = 1
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|