This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 7951e1da0 [bigfix]Fix Debian system Top10 monitoring bug (#1846)
7951e1da0 is described below
commit 7951e1da0f7e6810f94c14738404c9a58637ec1c
Author: Jast <[email protected]>
AuthorDate: Thu Apr 25 22:58:55 2024 +0800
[bigfix]Fix Debian system Top10 monitoring bug (#1846)
Co-authored-by: zhangshenghang <[email protected]>
Co-authored-by: tomsun28 <[email protected]>
---
manager/src/main/resources/define/app-debian.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/manager/src/main/resources/define/app-debian.yml
b/manager/src/main/resources/define/app-debian.yml
index 3a5dfdb64..e2e7c198d 100644
--- a/manager/src/main/resources/define/app-debian.yml
+++ b/manager/src/main/resources/define/app-debian.yml
@@ -513,7 +513,7 @@ metrics:
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
- script: ps -aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage
mem_usage command" } {print $2, $3, $4, $11}'| head -n 10
+ script: ps --no-headers -eo pid,%cpu,%mem,comm | sort -k2nr | head -n 10
| awk 'BEGIN {print "pid cpu_usage mem_usage command"} {print $1, $2, $3, $4}'
parseType: multiRow
- name: top_mem_process
@@ -554,5 +554,5 @@ metrics:
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
- script: ps -aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage
mem_usage command" } {print $2, $3, $4, $11}'| head -n 10
+ script: ps --no-headers -eo pid,%cpu,%mem,comm | sort -k3nr | head -n 10
| awk 'BEGIN {print "pid cpu_usage mem_usage command"} {print $1, $2, $3, $4}'
parseType: multiRow
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]