@echo off
e:
cd raid
for /f "usebackq" %%i in (`"@MegaCli64.exe -PDList -a0|find /C "Online""`) do set num=%%i
echo zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名" -k pdnum -o %num% >> zabbix_sender.log
zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名" -k pdnum -o %num% >> zabbix_sender.log
for /f "usebackq" %%j in (`"@MegaCli64.exe -LDInfo -Lall -aALL|find /C "Optimal""`) do set state=%%j
echo zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名" -k vdstatus -o %state% >> zabbix_sender.log
zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名" -k vdstatus -o %state% >> zabbix_sender.log
date /T >> zabbix_sender.log
time /T >> zabbix_sender.log
echo done
exit
更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/OS/server/
时间: 2024-10-28 06:54:22