Issue #4569 has been updated by Paul Nasrat.
Rein: I'm pretty sure you guys should have MSDN from the puppet windows stuff, also http://aws.amazon.com/windows/ for simple quick windows testing. It's probably worth taking a leaf out of sysutils' sys-uptime here and using LastBootupTime http://rubyforge.org/docman/view.php/610/1559/sys_uptime.html http://github.com/djberg96/sys-uptime/blob/master/lib/sys/windows.rb http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/02/how-can-i-determine-the-uptime-for-a-server.aspx I've read some things in passing about this being unreliable though an alternative would be to use the performance counter on those platforms which support it. http://groups.google.co.uk/group/microsoft.public.scripting.vbscript/msg/c5010130e03e7617 In python http://coreygoldberg.blogspot.com/2008/12/python-monitor-windows-remotely-with.html ---------------------------------------- Bug #4569: Windows Uptime Fact is incorrect on Windows http://projects.puppetlabs.com/issues/4569 Author: William Van Hevelingen Status: Available In Testing Branch Priority: Normal Assigned to: Category: Target version: 1.6.0 Keywords: Branch: uptime on windows is incorrect. psinfo from pstools reports uptime as 0 days, 5 hours, 22 minutes, 11 seconds facter reports: uptime => 14839 days uptime_hours => 356136 uptime_seconds => 1282092950 The problem appears to be that getTickCount.call() is being treated as an epoch time value, which it is not. The return is the number of clock cycles since the machine started; not the time the machine started. This being the case, it is folly to try and perform epoch time operations using it. On a side note, it doesn't seem quite right to hard-code 1000 as the clock tick and trust that for an accurate measurement for how long the system has been up. That said, doing so will at least get you a marginally sane result on most modern systems. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
