| Server IP : 213.136.93.164 / Your IP : 216.73.216.20 Web Server : Apache System : Linux m14200.contabo.net 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64 User : ki692510 ( 1047) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/zabbix/agentscripts/ |
Upload File : |
#!/bin/bash
echo "\"NAME\",\"VALUE\""
for pid_inotifywait in $(pgrep inotifywait); do
pid_parent=$(grep '^PPid:' /proc/${pid_inotifywait}/status | awk '{print $2}')
name_parent=$(cat /proc/${pid_parent}/cmdline | tr '\0' ' ')
count_inotifyhandles=$(grep -r 'inotify' /proc/${pid_inotifywait}/fdinfo/ | wc -l)
echo "\"${name_parent}\",\"${count_inotifyhandles}\""
done