rfmoz / tuptime

Report historical and statistical real time of the system, keeping it between restarts. Like uptime command but with more interesting output.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Reset Tuptime?

P4n1kH0u53 opened this issue · comments

My team is creating a distribution that will include the tuptime package. We found that when we install our distribution image, tuptime reports the amount of time that our distribution image has been live (we occasionally install the image and modify it while it is running, then recreate it).

I want our images to start with tuptime at 0 each time they get installed. What is the correct way to reset tuptime back to 0?

Hi P4n1kH0u53,

Simply delete the database file "/var/lib/tuptime/tuptime.db". Tuptime will create it if it doesn't exist in the first execution.

But, take into account that if you shutdown properly the distribution while its recreated, shutdown script will execute tuptime. For that reason, delete the file after that execution or delete it at first installation. If the distribution use systemd, maybe systemd-firstboot it's a good place for it.

Thanks,