mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 13:11:30 +00:00
Merge pull request #11291 from ahmetalpbalkan/info/system-date
Add system time to /info
This commit is contained in:
@@ -579,6 +579,14 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||
if remoteInfo.Exists("NGoroutines") {
|
||||
fmt.Fprintf(cli.out, "Goroutines: %d\n", remoteInfo.GetInt("NGoroutines"))
|
||||
}
|
||||
if remoteInfo.Exists("SystemTime") {
|
||||
t, err := remoteInfo.GetTime("SystemTime")
|
||||
if err != nil {
|
||||
log.Errorf("Error reading system time: %v", err)
|
||||
} else {
|
||||
fmt.Fprintf(cli.out, "System Time: %s\n", t.Format(time.UnixDate))
|
||||
}
|
||||
}
|
||||
if remoteInfo.Exists("NEventsListener") {
|
||||
fmt.Fprintf(cli.out, "EventsListeners: %d\n", remoteInfo.GetInt("NEventsListener"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user