Script to test sensors

JoseJose
edited March 2009 in InfraSensing Sensors
Just a quick & dirty script we use to test our temperature/humidity sensors whenever we need to. I thought I'd share this with others as it could be useful. Cut-and-paste the following into a .bat file, and modify as needed. Admin, if you feel it's inappropriate to share this here, please feel free to remove this post.



echo off

c:

cd "Program FilesServersCheck_Monitoringagents"

:START

cls

echo ServersCheck Sensor Tests

echo.

echo 1. Test Sensor #1 - xxx.xxx.xxx.xxx

echo.

echo 2. Test Sensor #2 - xxx.xxx.xxx.xxx

echo.

echo 3. Test Sensor #3 - xxx.xxx.xxx.xxx

echo.

echo.

echo 0. Exit

echo.

echo.

set /P inputvar="Action: "

if "%inputvar%" == "0" goto END

if "%inputvar%" == "1" goto SENSOR1

if "%inputvar%" == "2" goto SENSOR2

if "%inputvar%" == "3" goto SENSOR3

goto START



:SENSOR1

cls

echo Testing Sensor #1 - xxx.xxx.xxx.xxx

sensor_check -L test.log -C TCP xxx.xxx.xxx.xxx:3001

echo.

pause

goto START



:SENSOR2

cls

echo Testing Sensor #2 - xxx.xxx.xxx.xxx

sensor_check -L test.log -C TCP xxx.xxx.xxx.xxx:3001

echo.

pause

goto START



:SENSOR3

cls

echo Testing Sensor #3 - xxx.xxx.xxx.xxx

sensor_check -L test.log -C TCP xxx.xxx.xxx.xxx:3001

echo.

pause

goto START



:END
This discussion has been closed.