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

facter uptime shows host uptime inside docker container

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Sub-team:
    • Story Points:
      2
    • Sprint:
      ghost-19
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      When getting the uptime inside a docker container, the kernel will report the host uptime. In order to get the container uptime, we should get the uptime of PID 1, that is the process that starts when the container is starting.

      To get the running time of pid 1 inside the container, we use

      ps -o etime= -p "1"
      Show
      When getting the uptime inside a docker container, the kernel will report the host uptime. In order to get the container uptime, we should get the uptime of PID 1, that is the process that starts when the container is starting. To get the running time of pid 1 inside the container, we use ps -o etime= -p "1"
    • QA Risk Assessment:
      Needs Assessment

      Description

      When getting the uptime inside a docker container, the kernel will report the host uptime. In order to get the container uptime, we should get the uptime of PID 1, that is the process that starts when the container is starting.

      To get the running time of pid 1 inside the container, we useĀ 

      ps -o etime= -p "1"
      

        Attachments

          Activity

            People

            Assignee:
            bogdan.irimie Bogdan Irimie
            Reporter:
            florin.dragos Florin Dragos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support