Issue #5086 has been updated by Andrew Heichelbech.
looking at the *uptime_seconds* and it is falling through and using *who -b*. *who -b* down not report year. [/opt/csw/bin] # who -b . system boot Mar 12 23:53 it seems one could convert the fact to use the system *uptime* command [/opt/csw/bin] # uptime 10:17am up 589 day(s), 10:24, 6 users, load average: 0.05, 0.06, 0.05 or one could get the time the system was last booted from the kernel. (time_t format) Then get the local time and do the math from there. [/opt/csw/bin] # kstat -p unix:::boot_time unix:0:system_misc:boot_time 1236919980 The advantage of this on the Solaris side is one could add the fact for date last booted very easily later. If I can be of further service please let me know. ---------------------------------------- Bug #5086: Uptime reporting incorrectly for server where uptime is over on year https://projects.puppetlabs.com/issues/5086 Author: Andrew Heichelbech Status: Investigating Priority: Normal Assignee: Jacob Helwig Category: Target version: Keywords: Branch: The uptime is facter is reporting incorrecly. [/opt/csw/bin] # uptime 7:04pm up 588 day(s), 19:12, 4 users, load average: 0.05, 0.05, 0.05 [/opt/csw/bin] # facter uptime 223 days It does not seem the facter module for uptime takes into account years. If we subtract the 223 from the actual 588 it leaves 365, so somewhere in the processing I the time for 1 year has been lost. Environment information: OS version: Solaris 10 Update 6 Kernel version: Generic_138889-03 Puppet version: 0.25.5 Facter version: 1.5.8 Hardware: Sun Microsystems Sun Fire X4200 M2 -- 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.
