taylorthurlow/panda-motd

wrong uptime displayed

Closed this issue · 6 comments

Bug description

The uptime displayed by panda-motd isn't the good one.

Reproduction steps

Uncomment the "uptime" paragraph in ~/.config/panda-motd

Expected behavior

Have the right uptime displayed

Screenshots

If applicable, add screenshots to help explain your problem.
See the red ractangles
issue

OS Information

  • OS: Debian 9.7 64 bits

Configuration File

uptime:
enabled: true
prefix: up

Okay this one might be harder to figure out. I use sysinfo to grab system uptime. On unix-based systems, the gem should be executing the command who -b to determine the time the system booted. What's your output when you run who -b?

Hello,
I have that when I run who -b :

démarrage système 2008-01-01 01:00

It's in french it means "system startup".

Well that's your problem. Not sure why it's saying you last booted in 2008, though. What is the result of the command date?

date displays the right date :
Wednesday 20th February 2019, 20:27:31 (UTC+0100)

Edit : I've just restarted my server, and the uptime has returned to zero, maybe it was an issue on my side but I don't know how.

Gotcha. I'll close this for now, it seems like this is really an issue with however who -b gets it's information. Keep an eye on it and let me know if the issue comes back.

Got it, thanks!