File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 8888 {
8989 "plugin": "custom",
9090 "pluginConfig": {
91- "invoke_interval": "300s ",
92- "timeout": "120s ",
91+ "invoke_interval": "30s ",
92+ "timeout": "15s ",
9393 "max_output_length": 80,
9494 "concurrency": 3,
9595 "enable_message_change_based_condition_update": false
@@ -121,18 +121,13 @@ data:
121121 UNKNOWN=2
122122
123123 cd /host/proc
124- sum=0
125- for pid in [0-9]*
126- do
127- sum=$(($sum+$(ls /host/proc/$pid/fd/ | wc -l)))
128- done
129124
130- count=$(sum )
125+ count=$(find -maxdepth 1 -type d -name '[0-9]*' | xargs -I {} ls {}/fd | wc -l )
131126 max=$(cat /host/proc/sys/fs/file-max)
132127
133128 echo "current fd is $count and max is $max"
134129 if [[ $count -gt $((max*8/10)) ]]; then
135- echo "more than 80% fd has been used($count:$max)"
130+ echo "more than 80% fd has been used($count:$max)"
136131 exit $NONOK
137132 fi
138133 echo "fd is ok"
You can’t perform that action at this time.
0 commit comments