2

I need an application that monitor how much time the computer is turned on. For example if I start the system at 12:03 AM and shut it down it at 3:16 PM and then in the same day I turn it on at 4:54 PM and shut it down at 7:47 PM, it would save this data so it could be reviewed later.

Do you know any application that perform such task?

Zignd
  • 10,812

2 Answers2

4

You can use uptimed which does exactly that. It's a daemon to record uptime records.

Install it by running following command in your terminal:

sudo apt-get install uptimed

Once installed you can use uprecords command to check your uptime records.

Basharat Sialvi
  • 24,046
  • 8
  • 62
  • 82
3

You can use uptime, and put a simple script like uptime >> /home/user_name/.uptime into /etc/init.d/ and then make a symbolic link to it on /etc/rc0.d/, note that the script need to start with K99.

For more information on how to execute scripts before the system shut down see How to execute script on shutdown?.

Doka
  • 320