Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1497

system_uptime fact only updates every minute on AIX

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • FACT 3.4.1
    • FACT 3.11.4
    • None
    • Hide

      Calling facter system_uptime.seconds repeatedly 5 seconds apart should show an increase in the uptime.

      Show
      Calling facter system_uptime.seconds repeatedly 5 seconds apart should show an increase in the uptime.
    • Platform OS
    • Platform OS Kanban
    • Bug Fix
    • The POSIX uptime resolver now obtains the system uptime information by querying the utmpx file directly instead of relying on the uptime command.

    Description

      The system_uptime fact does not update as expected on Solaris and AIX. Once a value is retrieved for the fact, it remains cached without updating the second value.

      Steps to recreate

      1. Install puppet-agent 1.6.1
      2. Run facter system_uptime.seconds to load initial value
      3. Rerun facter system_uptime.seconds repeatedly to see that the same value is repeatedly returned without incrementing.
      4. Wait 30 seconds
      5. Rerun facter system_uptime.seconds to see updated value

      Sample session on Solaris 10

      Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
      -bash-3.2# cat /opt/puppetlabs/
      bin/         facter/      mcollective/ puppet/      pxp-agent/
      -bash-3.2# cat /opt/puppetlabs/puppet/VERSION
      1.6.1
      -bash-3.2# facter --version
      3.4.1 (commit d0f32490f41ca12722c13e4c48d4572ae4f9bfdc)
      -bash-3.2# facter system_uptime.seconds; sleep 2; facter system_uptime.seconds
      150120
      150120
      -bash-3.2# facter system_uptime.seconds; sleep 2; facter system_uptime.seconds
      150120
      150120
      -bash-3.2# facter system_uptime.seconds; sleep 30; facter system_uptime.seconds
      150120
      150180
      -bash-3.2# facter system_uptime.seconds; sleep 29; facter system_uptime.seconds
      150180
      150180
      

      Attachments

        Issue Links

          Activity

            People

              enis.inan Enis Inan
              john.duarte John Duarte
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support