With the command “uptime” you can see how long your raspberry pi is up.
If you pull the power, or reboot your pi, all the records will be lost.
The program “uptimed” will log all the uptimes and can show the longest uptime and other time stats.
How to install?
sudo apt-get update [enter] sudo apt-get install uptimed [enter]
See your uptime statistics with command: