File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 8888 {
8989 "plugin": "custom",
9090 "pluginConfig": {
91- "invoke_interval": "30s ",
92- "timeout": "15s ",
91+ "invoke_interval": "300s ",
92+ "timeout": "120s ",
9393 "max_output_length": 80,
9494 "concurrency": 3,
9595 "enable_message_change_based_condition_update": false
@@ -120,14 +120,15 @@ data:
120120 NONOK=1
121121 UNKNOWN=2
122122
123- which lsof > /dev/null
124- if [ $? -ne 0 ]; then
125- echo "lsof is not support"
126- exit $UNKNOWN
127- fi
123+ 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
128129
129- count=$(lsof | wc -l )
130- max=$(cat /proc/sys/fs/file-max)
130+ count=$(sum )
131+ max=$(cat /host/ proc/sys/fs/file-max)
131132
132133 echo "current fd is $count and max is $max"
133134 if [[ $count -gt $((max*8/10)) ]]; then
Original file line number Diff line number Diff line change 5353 - name : config
5454 mountPath : /config
5555 readOnly : true
56+ - mountPath : /host/proc
57+ name : proc
58+ readOnly : true
5659 volumes :
5760 - name : log
5861 # Config `log` to your system log directory
6467 - name : localtime
6568 hostPath :
6669 path : /etc/localtime
70+ - name : proc
71+ hostPath :
72+ path : /proc
6773 - name : config
6874 configMap :
6975 name : node-problem-detector-config
You can’t perform that action at this time.
0 commit comments