It is currently April 18th, 2024, 3:22 am

Monitoring remote services

Get help with installing and using Rainmeter.
LordThalion
Posts: 1
Joined: January 25th, 2017, 11:04 am

Monitoring remote services

Post by LordThalion »

Hi Guys, I am a rainmeter noob
and I am trying to set up rainmeter to monitor services running on local and
remote servers. Monitoring the local service is easy, but I am unable to get the
meter to run and display for the remote services.

Running on: Windows 2012 Server, I am running rainmeter 'as administrator'
(I am aware I can monitor via Sever Manager, but I want to create an overview of
service, disk use and processor usage)

I have tried 3 options:
1) using tasklist, this was way too slow
2) use wmic commands in rainmeter
3) use wmic commands as batch file

So for option [2] I created a 2 step approach with a RunCommand, which I hope to trigger:

Code: Select all

[measureRemoteServices]
Measure=Plugin
Plugin=RunCommand
Parameter=wmic /node:RemoteServerName service where(Name='RemoveServiceName') get State
IfMatch=(?=Running)
IfMatchAction=[!SetOption MeterProcess Text "running."][!UpdateMeter MeterProcess][!Redraw]
IfNotMatchAction=[!SetOption MeterProcess Text "not running."][!UpdateMeter MeterProcess][!Redraw]

[measureRMtrigger]
UpdateDivider=20
OnUpdateAction=[!CommandMeasure measureRemoteServices "Run"]

[MeterProcess]
Meter=string
MeterStyle=styleRightText
X=200
Y=0r
W=190
H=14
The Meter then always displays 'Not Running', (even if the service is running remotely) so it's doing something,
but I can't figure out what the wmic command returns (if anything).
If I use wmic /output:textfileout.txt
I do not find any text file.

In a dos box, the wmic commands work fine.

For option 3, I put the wmic with the /output: ... command in a batch file.
Command line, it works fine.
If I try to run the batch file with:

Code: Select all

[measureRemoteServerService]
UpdateDivider=20
OnUpdateAction=["TestServerService.bat"]
nothing happens.

I also tried:

Code: Select all

[measureRemoteServerService]
Measure=Plugin
Plugin=RunCommand
Parameter=TestServerService.bat

[measureRMtrigger]
UpdateDivider=20
OnUpdateAction=[!CommandMeasure measureRemoteServerService "Run"]
But again... no joy.

Based on what I read the help and the fora, either of these options should work.
What Am I doing wrong? :???: :headbang: