I noticed for the PDHmeter there's a greyed out box for the system you're connecting to which is automatically set to your local system. Is there a way yet to enable this entry box to access the PDH on a remote system (someotherserveronyournetwork with optional username/password stuck in there somewhere), or is this slated for a future release? It would be great to be able to display PDH stats (cpu load, memory usage, etc) for remote servers you have to monitor.
PDH meter for remote systems?
How do I set that information? Do I put it under the meter I'm trying to change? For example, I have this section for one of my cpu meters:
[meter-3]
Counters-0=Processor(_Total)% Processor Time
Counters-Count=1
Name=CPUused
Scale=1
TimerInterval=5
Type=PDHMeter Class
I don't know what variables to use to set the remote system name/username/password. Adding new variables Username=someuser and Password=someuserspassword in this section seems to be invalid, as they just get erased when I start up the config.
I found that Counters-0=somehostsomewhereProcessor(_Total)% Processor Time does not work, having the somehostsomewhere in the line causes the counter to clear out the line. So you must have to define the host in some other way or I have the syntax wrong.
As for the username/password question, I did find a page (http://www.alexfedotov.com/articles/enumproc.asp) that has some sample code for working with PDH meters, along with this little section:
--
Important note: Remote process enumeration in the form as it presented in this article will work only if the current user of the local machine has administrative privileges on the remote machine. The samples provided above do not allow to change credentials with which a connection to the remote machine is made. To specify alternative credentials in PDH method, you should call NetUseAdd or WNetAddConnection2 to establish a connection with IPC$ resource on the remote machine prior to calling the enumeration function. In WMI method, you should use standard COM methods for supplying alternative credentials.
--
So if you have an account on the remote machine you'd probably be ok connecting to it (if we can figure out the syntax needed to get the counter looking remotely) but if you do not then establishing the connection first using the Net calls probably isn't being done.
Any updates on if there's a format that will work to set a counter to look at a remote host?
Aqua-Soft Forums