[SERVER-9492] Report host uptime/start-time Created: 28/Apr/13  Updated: 18/Apr/17  Resolved: 26/Jul/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 3.2.13, 3.3.11

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: uptime
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 18 (08/05/16)
Participants:

 Description   

It would be very useful to be able to collect the system uptime in the hostinfo/serverstatus/etc command. Many times is important to know if the mongod instance started with host, or has been restarted, or if the host was restarted recently.



 Comments   
Comment by Mark Benvenuto [ 26/Jul/16 ]

The system boot or uptime is reported on:
Linux: via btime in /proc/stat - https://github.com/mongodb/mongo/blob/master/src/mongo/db/ftdc/ftdc_system_stats_linux.cpp#L49
Windows: via "\\System\System Up Time" in performance counters - https://github.com/mongodb/mongo/blob/master/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp#L61

Both are logged into FTDC.

Comment by Andrew Morrow (Inactive) [ 26/Jul/16 ]

Per discussion, this is already resolved, but please include the details of where this information is surfaced in the FTDC system metrics when you finish out the ticket.

Comment by Scott Hernandez (Inactive) [ 15/Jun/16 ]

Passing to Mark as I believe the changes to the FTDC should cover this.

Generated at Thu Feb 08 03:20:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.