Hello,
I'm looking for a task that displays the server uptime.
But I have so far not found any script that displays the uptime in format with the following:
DD-HH-MM
Can anyone help me in this cause?
Thank you and best regards
Server Uptime
What exactly server do you want to check? If server supports WMI or SNMP protocol, I don't think you need any script.
You may use SNMP Get or WMI test method and "Tune up Reply value" option.
E.g.
WMI test
Query: Select SystemUpTime from Win32_PerfFormattedData_PerfOS_System
Tune up Reply value: Reply = [%SuggestedReply% div 86400]-[(%SuggestedReply% mod 86400) div 3600]-[(%SuggestedReply% mod 3600) div 60]
SNMP test
OID: 1.3.6.1.2.1.1.3.0
Tune up Reply value: Reply = [(%SuggestedReply% div 100) div 86400]-[((%SuggestedReply% div 100) mod 86400) div 3600]-[((%SuggestedReply% div 100) mod 3600) div 60]
Regards
Alex
You may use SNMP Get or WMI test method and "Tune up Reply value" option.
E.g.
WMI test
Query: Select SystemUpTime from Win32_PerfFormattedData_PerfOS_System
Tune up Reply value: Reply = [%SuggestedReply% div 86400]-[(%SuggestedReply% mod 86400) div 3600]-[(%SuggestedReply% mod 3600) div 60]
SNMP test
OID: 1.3.6.1.2.1.1.3.0
Tune up Reply value: Reply = [(%SuggestedReply% div 100) div 86400]-[((%SuggestedReply% div 100) mod 86400) div 3600]-[((%SuggestedReply% div 100) mod 3600) div 60]
Regards
Alex
Hi,
I have some problems with the test.
If I use WMI, shows me the server 1 hour 56 minutes
If I use snmp on the same server shows me the test 8 days
In the network card will also appear on 8 days.
Why does WMI not the correct time.
Do I read a different value in WMI?
Because, unfortunately, not all servers, the SNMP query works, I would like to take the test on WMI.
I have some problems with the test.
If I use WMI, shows me the server 1 hour 56 minutes
If I use snmp on the same server shows me the test 8 days
In the network card will also appear on 8 days.
Why does WMI not the correct time.
Do I read a different value in WMI?
Because, unfortunately, not all servers, the SNMP query works, I would like to take the test on WMI.
Good question to Microsoft.Why does WMI not the correct time
What Windows do you use? Service Pack?
As we know SNMP agent provides sysUptime that actually shows time since SNMP service restart (service, not entire system) so if you restart SNMP agent, this counter will be resetted.
May be there is some similar issue with WMI but we did not find such informaion. I think it always show correct system uptime...
Are you using correct query for this test?
What test settings do you use (query, tune-up reply expression)?
Regards
Alex
I am also trying to configure an WMI report for SystemUptime. I did the following:
Add>>WMI
Clicked on WMI Explorer
Located Win32_PerfRawData_PerfOS_System and saw SystemUpTime as a variable. I ended up saving it as: select SystemUpTime from Win32_PerfRawData_PerfOS_System
After tests excutes, I am unable to see result in DD-HH-MM-SS format. Where do I enter the "Tune Up Reply" value referenced in this thread?
Add>>WMI
Clicked on WMI Explorer
Located Win32_PerfRawData_PerfOS_System and saw SystemUpTime as a variable. I ended up saving it as: select SystemUpTime from Win32_PerfRawData_PerfOS_System
After tests excutes, I am unable to see result in DD-HH-MM-SS format. Where do I enter the "Tune Up Reply" value referenced in this thread?