Bug 1527727

Summary: [RFE] Subscription-manager should report uptime or last booted time as a system fact
Product: Red Hat Enterprise Linux 7 Reporter: Rich Jerrido <rjerrido>
Component: subscription-managerAssignee: Chris Snyder <csnyder>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 7.7CC: bcourt, csnyder, jsefler, khowell, redakkan, skallesh
Target Milestone: rcKeywords: EasyFix, FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.21.4-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:36:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1544891    
Attachments:
Description Flags
boot time system fact on GUI none

Description Rich Jerrido 2017-12-20 00:58:36 UTC
Description of problem:

Subscription-manager should report uptime or last booted time as a system fact. As a user of subscription-manager, having the uptime or last booted time as a system fact allows me to identify (along with the last check-in time) how long as system has been online. 

ideally, this would be set via rhsmcertd on daemon startup.

Comment 3 Kevin Howell 2018-02-22 15:35:26 UTC
Dev: in order to reduce fact change, we can just report "last booted time" a la `uptime -s`.

Comment 8 Shwetha Kallesh 2018-06-25 14:27:43 UTC
Created attachment 1454377 [details]
boot time system fact on GUI

Verification:

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.5.4-1
subscription management rules: 5.26
subscription-manager: 1.21.5-4.el7

[root@localhost ~]# cat /proc/stat | grep btime
btime 1529331676

[root@localhost ~]# subscription-manager facts --list | grep btime
proc_stat.btime: 1529331676

Comment 10 errata-xmlrpc 2018-10-30 10:36:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3153