From 6e5318d07d918a9e5f6b233c491b4db885809ee2 Mon Sep 17 00:00:00 2001 From: zhangshenghang Date: Fri, 28 Jun 2024 08:46:42 +0800 Subject: [PATCH] [improve]Optimize delimiters --- manager/src/main/resources/define/app-almalinux.yml | 4 ++-- manager/src/main/resources/define/app-centos.yml | 4 ++-- manager/src/main/resources/define/app-coreos.yml | 4 ++-- manager/src/main/resources/define/app-euleros.yml | 4 ++-- manager/src/main/resources/define/app-freebsd.yml | 4 ++-- manager/src/main/resources/define/app-linux.yml | 4 ++-- manager/src/main/resources/define/app-opensuse.yml | 4 ++-- manager/src/main/resources/define/app-redhat.yml | 4 ++-- manager/src/main/resources/define/app-rockylinux.yml | 4 ++-- manager/src/main/resources/define/app-ubuntu.yml | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/manager/src/main/resources/define/app-almalinux.yml b/manager/src/main/resources/define/app-almalinux.yml index f97d9d71d7b..2452a389d5c 100644 --- a/manager/src/main/resources/define/app-almalinux.yml +++ b/manager/src/main/resources/define/app-almalinux.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-centos.yml b/manager/src/main/resources/define/app-centos.yml index 3b673942268..4b5a579037a 100644 --- a/manager/src/main/resources/define/app-centos.yml +++ b/manager/src/main/resources/define/app-centos.yml @@ -467,7 +467,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -508,5 +508,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-coreos.yml b/manager/src/main/resources/define/app-coreos.yml index 04c64b3c7a7..e074c2c9ede 100644 --- a/manager/src/main/resources/define/app-coreos.yml +++ b/manager/src/main/resources/define/app-coreos.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-euleros.yml b/manager/src/main/resources/define/app-euleros.yml index f677d037f86..761830403dc 100644 --- a/manager/src/main/resources/define/app-euleros.yml +++ b/manager/src/main/resources/define/app-euleros.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-freebsd.yml b/manager/src/main/resources/define/app-freebsd.yml index 270d76be2af..80aaefe0f4b 100644 --- a/manager/src/main/resources/define/app-freebsd.yml +++ b/manager/src/main/resources/define/app-freebsd.yml @@ -381,7 +381,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -422,5 +422,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-linux.yml b/manager/src/main/resources/define/app-linux.yml index 68a89d7c411..698f43b0b2d 100644 --- a/manager/src/main/resources/define/app-linux.yml +++ b/manager/src/main/resources/define/app-linux.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-opensuse.yml b/manager/src/main/resources/define/app-opensuse.yml index cc3a7432ed0..75546e737d5 100644 --- a/manager/src/main/resources/define/app-opensuse.yml +++ b/manager/src/main/resources/define/app-opensuse.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-redhat.yml b/manager/src/main/resources/define/app-redhat.yml index f51ab1a6a3b..d9f47b8e091 100644 --- a/manager/src/main/resources/define/app-redhat.yml +++ b/manager/src/main/resources/define/app-redhat.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-rockylinux.yml b/manager/src/main/resources/define/app-rockylinux.yml index 7987b3db4fa..e608572e60e 100644 --- a/manager/src/main/resources/define/app-rockylinux.yml +++ b/manager/src/main/resources/define/app-rockylinux.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow diff --git a/manager/src/main/resources/define/app-ubuntu.yml b/manager/src/main/resources/define/app-ubuntu.yml index 43284a31012..3a5d3e0fbd7 100644 --- a/manager/src/main/resources/define/app-ubuntu.yml +++ b/manager/src/main/resources/define/app-ubuntu.yml @@ -466,7 +466,7 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow - name: top_mem_process @@ -507,5 +507,5 @@ metrics: privateKey: ^_^privateKey^_^ timeout: ^_^timeout^_^ reuseConnection: ^_^reuseConnection^_^ - script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf "&"; } print ""}' | head -n 11 + script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11 parseType: multiRow