Introducing : Remote Sensor Monitor - A RESTful Web Server

I've been using it on 15 systems here for many years. Win7, Win10, various Win Server editions. In my home office, various family computers, servers, etc. I'm using it for hardware monitoring in PRTG.

The program requires a bit of baby-sitting to get it working, but once you have it set up, it works fine.

It does however stop working if any sensors suddenly are added to the list in HWiNFO. For example, on my systems that have an RTX 2080, there will be a sensor named "GPU USB-C 1 Input Power" that suddenly appears anywhere from 5 to 30 minutes after the systems have been booted and logged into the first time. This causes RSM to stop working altogether (the web server dies), and RSM simply needs to be restarted. The solution is to disable+hide all sensors in HWiNFO that act this way. Once you have figured out things like this, RSM will work ok.

Another quirk is that if you're running RivaTuner Statistic Server (RTSS) on the same system, it seems like you need to start/restart HWiNFO/RSM/RTSS in a particular order to avoid issues with RSM. Also, RTSS will sometimes add an FPS sensor in HWiNFO, and it can cause issues. Disable+hide this one as well. I don't understand why there is no option to fully disable HWiNFO and RTSS integration, as this would fix what I'd want to do there. I don't care about RTSS and HWiNFO exchanging information at all.

However... a permanent fix to all the things I mentioned above, would be for the developer of HWiNFO to add a REST(ful) webserver or even WMI to HWiNFO, allowing us to monitor the sensors with an external program - without needing stuff like RSM in the first place. I really hope the developer would consider something like this in the future.

Below is the bat script I'm using in my shell:startup folder to solve the abovementioned issue with starting/restarting HWiNFO/RSM/RTSS. Name it anything you want. You can also use it to restarts RSM when it stops working. It requires an external tool named hstart.exe (Hidden Start) which allows starting console programs without showing the shell window. If you can find an old version of hstart (v4.1), the license it has allows using it for free.


Code:
@ECHO off

SET /A count = 0
:loopRtss
ECHO Waiting for process RTSS.exe...
TASKLIST /FI "IMAGENAME eq RTSS.exe" 2>NUL | FIND /I /N "RTSS.exe">NUL
IF %ERRORLEVEL% EQU 0 (
    ECHO Process RTSS.exe found.
    GOTO :okRtss
) ELSE (
    IF %count% EQU 7 ( GOTO :okRtss )
    ECHO Launching RTSS.exe...
    START "" /D "C:\Program Files (x86)\RivaTuner Statistics Server\" /B rtss.exe
    TIMEOUT /T 10 /NOBREAK
    SET /A count = count + 1
    GOTO :loopRtss
)
ECHO RTSS.exe started.

:okRtss
TIMEOUT /T 10 /NOBREAK


SET "launchedHWiNFO="
SET /A count = 0
:loopHwinfo64
ECHO Waiting for process HWiNFO64.exe...
TASKLIST /FI "IMAGENAME eq HWiNFO64.exe" 2>NUL | FIND /I /N "HWiNFO64.exe">NUL
IF %ERRORLEVEL% EQU 0 (
    ECHO Process HWiNFO64.exe found.
    GOTO :okHwinfo
) ELSE (
    IF %count% EQU 7 ( GOTO :Error )
    SET "launchedHWiNFO=1"
    ECHO Launching HWiNFO64.exe...
    START "" /D "D:\Portables\HWiNFO64" /MIN /B HWiNFO64.exe
    TIMEOUT /T 10 /NOBREAK
    SET /A count = count + 1
    GOTO :loopHwinfo64
)
ECHO HWiNFO64.exe started.

:okHwinfo
TIMEOUT /T 10 /NOBREAK

REM Note: Using hstart.exe to ensure the shell window closes after starting Remote.Sensor.Monitor
IF DEFINED launchedHWiNFO ( TIMEOUT /T 10 /NOBREAK )
ECHO Checking to see if RSM process is already running...
TASKLIST /FI "IMAGENAME eq Remote Sensor Monitor.exe" 2>NUL | FIND /I /N "Remote Sensor Monitor.exe">NUL
IF %ERRORLEVEL% EQU 0 (
    ECHO Terminating process...
    WMIC PROCESS Where Name='Remote Sensor Monitor.exe' Delete
) ELSE (
    ECHO Launching process...
    "D:\exebat\hstart.exe" /NOCONSOLE /SHELL /D="D:\Portables\HWiNFO64\Remote.Sensor.Monitor" ""D:\Portables\HWiNFO64\Remote.Sensor.Monitor\Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0"
    REM START "" /D "D:\Portables\HWiNFO64\Remote.Sensor.Monitor" /B "Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0
    REM "D:\Portables\HWiNFO64\Remote.Sensor.Monitor\Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0
    GOTO :done
)


TIMEOUT /T 10 /NOBREAK
TASKLIST /FI "IMAGENAME eq Remote Sensor Monitor.exe" 2>NUL | FIND /I /N "Remote Sensor Monitor.exe">NUL
IF %ERRORLEVEL% EQU 0 (
    ECHO Terminating process...
    WMIC PROCESS Where Name='Remote Sensor Monitor.exe' Delete
) ELSE (
    ECHO Launching process...
    "D:\exebat\hstart.exe" /NOCONSOLE /SHELL /D="D:\Portables\HWiNFO64\Remote.Sensor.Monitor" ""D:\Portables\HWiNFO64\Remote.Sensor.Monitor\Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0"
    REM START "" /D "D:\Portables\HWiNFO64\Remote.Sensor.Monitor" /B "Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0
    REM "D:\Portables\HWiNFO64\Remote.Sensor.Monitor\Remote Sensor Monitor.exe" --hwinfo=1 --gpuz=0 --aida64=0 --ohm=0
)


:done
REM TIMEOUT 10
GOTO :END


:Error
ECHO.
ECHO.
ECHO ---------------------------------------------------------
ECHO ---- ERROR: timeout. Process HWiNFO64.exe NOT found. ----
ECHO ---------------------------------------------------------
TIMEOUT 10

:END
 
Last edited:

micim

New Member
Thanks for this very useful addon!

I have one question: For me,
Code:
SensorUpdateTime
does not expose a UNIX timestamp (which I was expectiing) but rather the seconds since I started RemoteSensorMonitor. Is that expected?
 
Top