Total Uptime in INFO gets reseted all the time

So if you let OSMC run for an hour, note down the total system uptime, reboot, then check the total system uptime again it is less than before you rebooted ?

What happens if you run the following command via SSH and let it sit for a while ?

watch -n 1 grep systemtotaluptime /home/osmc/.kodi/userdata/guisettings.xml

This will monitor the systemtotaluptime value saved in guisettings.xml, which I believe is in minutes.

Does the number change if you use quit/exit ?

On systems with multiple cores, the uptime is actually multiplied by the number of cores on the system, with exception for active (non idle) (the second number in /proc/cmdline). This is why we calculate uptime as total divided by sysconf(_SC_NPROCESSORS_ONLN) (number of online processors)

Is the total uptime per chance a quarter of what you would expect it to be from the uptime command?

Sam

Same problem here on my Rpi2
Just made a fresh install just to test this.
After osmc had installed, the total uptime was 2 minutes, but was reset to 0 minutes after reboot. Tried several times, always reset to 0.
The <systemtotaluptime>0</systemtotaluptime> in guisettings.xml is not updated after a reboot.
Log is here :smile:
Edit. forgot to enable debug, new log uploaded, and link edited.

What are the permissions on guisettings.xml? Did you restore it from a backup or redo the system settings after the fresh install? Will other system settings that you change survive a reboot?

-rw-r–r-- 1 osmc osmc 28850 Dec 4 17:44 guisettings.xml

Clean install, no restore or other things. Changing skin survives reboot.

In the meantime we were able to reproduce the issue and we will investigate it and may have a fix in one of the next updates!

2 Likes

All settings survive a reboot.
The problem starts right after install.
I never backup and restore I always like clean installs.
Only setting that usually reverts is automatic addon updates. I have to disable them up to 6 times until they finally stay disabled after reboot.

I still need a week to get back home and upload logs from any one of my installations.

Thank you in advance.

OH I forgot. Some times the total uptime does get up for a couple of minutes. One of my installations is at 12 days total uptime if I remember even tho that it is up since August.

I have been running the unsupported alpha up until I posted in this forum, on the same Pi. I did not have this issue at that time, total uptime captured correctly.

Yes that’s correct, total uptime resets after a reboot.
I will do some testing to see if it makes a difference how I restart it (via command line Sudo reboot vs the GUI). I’ll also run the command above and I will report back.

Mine does not revert to a set number i don’t think. It just starts the clock back from zero.

Ok so I had a 6 day uptime (uninterrupted boot). I restarted the Pi using the OSMC gui interface and the total uptime arbitrarily reset to 30 minutes

Running
watch -n 1 grep systemtotaluptime /home/osmc/.kodi/userdata/guisettings.xml

Nothing happens. Counter is stuck at 30 even after several minutes

Command not found

That’s not a command, it is the permissions for the guisetting.xml file :wink:

This issue will be fixed in the next OSMC Update

Sam

1 Like

Thank you Sam for your diligence.

Here’s what I noticed today. If I restart via console using Sudo reboot total uptime does not reset. It only resets when I use the Power Off or Reboot options in OSMC GUI. I am using the Confluence skin.

Issuing sigterm will result in our patched sighandler in Kodi initiating teardown and systemd giving it sufficient grace to save things. This is expected.

Sam

I believe this is resolved in our Kodi Jarvis rebase:

But this won’t be landing in OSMC’s December update, which is still on Isengard for now.

Sam

The system uptime is always = to total uptime
if i shutdown the rpi2 or reboot. the total uptime gets reset So on my main rpi2 system uptime is stucked at 0 minutes.
run osmc 17.6 debian stretch rpi2

The last post is over two years old.

Can you start a forum post with logs and a proper description of your symptoms?