Uptime¶
Combiner for uptime information. It uses the results of the Uptime
parser and the Facter
parser to get the uptime information. Uptime
is
the preferred source of data.
Examples
>>> ut = shared[uptime]
>>> ut.updays
21
>>> ht.uptime
03:45
-
class
insights.combiners.uptime.
Uptime
(currtime, updays, uphhmm, users, loadavg, uptime)¶ Bases:
tuple
namedtuple: Type for storing the uptime information.
-
property
currtime
¶
-
property
loadavg
¶
-
property
updays
¶
-
property
uphhmm
¶
-
property
uptime
¶
-
property
users
¶
-
property
-
insights.combiners.uptime.
uptime
(ut, facter)[source]¶ Check uptime and facts to get the uptime information.
Prefer uptime to facts.
- Returns
A named tuple with currtime, updays, uphhmm, users, loadavg and uptime components.
- Return type
- Raises
Exception -- If no data is available from both of the parsers.