0 vote
Can you please add an "uptime" function in the Dashboard ? This would be a real timesaver.
I can provide more detail via email.
Thanks
Hello,
How RDM is supposed to get the uptime?
Regards
David Hervieux
Hi David. I left you a PM.
Hello,
Sorry I missed the notification. Thank you. I will add this to our todo list. Maybe some dynamic information. I have to figure how I could support uptime.exe directly in the application.
Regards
David Hervieux
Not sure I'm following the part about supporting uptime.exe. That's a command line utility that Microsoft stopped maintaining years ago and is a little buggy when used against newer Windows operating systems but the functionality is great and the response is quick. It uses event log entries, etc to determine system uptime and key events.
Hello,
We can't package uptime.exe in RDM. We have no right to do that. We need to find a way to do the same thing without the executable.
Regards
David Hervieux
Powershell can get the uptime of system, querying WMI. Here's a sample script of how to do it:
<#
.SYNOPSIS
Demonstrates uptime using WMI
.DESCRIPTION
This script used Win32_ComputerSystem to determine how long your system
has been running. This is a rewrite/improvement of sample 3 at
http://msdn.microsoft.com/en-us/library/aa394591(VS.85).aspx.
.NOTES
File Name : Get-UpTime.ps1
Author : Thomas Lee - tfl@psp.co.uk
Requires : PowerShell V2 CTP3
.LINK
Script Posted to:
http://www.pshscripts.blogspot.com
Original sample posted at:
http://msdn.microsoft.com/en-us/library/aa394591(VS.85).aspx
.EXAMPLE
PS c:\foo> .\Get-UpTime.Ps1
System Up for: 1 days, 8 hours, 40.781 minutes
#>
##
# Start of script
##
# Helper Function - convert WMI date to TimeDate object
function WMIDateStringToDate($Bootup) {
[System.Management.ManagementDateTimeconverter]::ToDateTime($Bootup)
}
# Main script
$Computer = "." # adjust as needed
$computers = Get-WMIObject -class Win32_OperatingSystem -computer $computer
foreach ($system in $computers) {
$Bootup = $system.LastBootUpTime
$LastBootUpTime = WMIDateStringToDate($Bootup)
$now = Get-Date
$Uptime = $now - $lastBootUpTime
$d = $Uptime.Days
$h = $Uptime.Hours
$m = $uptime.Minutes
$ms= $uptime.Milliseconds
"System Up for: {0} days, {1} hours, {2}.{3} minutes" -f $d,$h,$m,$ms
}
# End script
Great. That's what I mean by a dynamic information.
Regards
David Hervieux
Any update on adding an uptime function to RDM ?
Thanks
Not yet.
Regards
David Hervieux
Still no uptime function after requesting it over a year ago ? :-(
Seems like it would be very easy to add here .......