This is an automated email from the ASF dual-hosted git repository.

gongchao 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 5fdc6557d [bugfix] fix debian monitoring template issue about process 
monitoring (#1868)
5fdc6557d is described below

commit 5fdc6557d6206c62e9467cc8f743afd48eb6dfc1
Author: llp2333 <[email protected]>
AuthorDate: Sun Apr 28 09:03:29 2024 +0800

    [bugfix] fix debian monitoring template issue about process monitoring 
(#1868)
    
    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 c89c57e29..b6de91ce0 100644
--- a/manager/src/main/resources/define/app-debian.yml
+++ b/manager/src/main/resources/define/app-debian.yml
@@ -466,7 +466,7 @@ metrics:
       privateKey: ^_^privateKey^_^
       timeout: ^_^timeout^_^
       reuseConnection: ^_^reuseConnection^_^
-      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}'
+      script: ps --no-headers -eo pid,%cpu,%mem,cmd --sort=-%cpu | head -n 10 
| awk 'BEGIN {print "pid cpu_usage mem_usage command"} {print $1, $2, $3, $4}'
       parseType: multiRow
 
   - name: top_mem_process
@@ -507,5 +507,5 @@ metrics:
       privateKey: ^_^privateKey^_^
       timeout: ^_^timeout^_^
       reuseConnection: ^_^reuseConnection^_^
-      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}'
+      script: ps --no-headers -eo pid,%cpu,%mem,cmd --sort=-%mem | 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]

Reply via email to