Path : /proc/2/cwd/proc/2/cwd/proc/2/cwd/proc/2/task/2/cwd/var/lib/zabbix/ |
Current File : //proc/2/cwd/proc/2/cwd/proc/2/cwd/proc/2/task/2/cwd/var/lib/zabbix/ps_discovery.sh |
#!/bin/bash first=1 pscmdvars=`systemctl | awk '{print $1}' | sort | uniq` pscmdwrds=`echo $pscmdvars | wc -w` #echo -ne "{\n"; echo -ne "{ \"data\" : [\n"; for x in $pscmdvars { psname=`echo $x| sed 's/.service//g'` if [ $first == 0 ]; then echo -ne ",\n"; fi first=0 echo -ne "{" echo -ne " \"{#PSNAME}\":\"$psname\""; echo -ne " }"; } echo -ne " ]"; echo -ne " }\n";