I need to log PC uptime. How I can do this?
I use uptime for this and I will when ubuntu is shutdown write this command output in a file.
I would like to write a script to run uptime at shutdown.
I want to know how long my battery lasts.
I have a text file of the uptimes used so far.
I found this but do not understand much of it.
I understand #1 and #2, but not #3.
Can someone help me ?
I am trying a linux command for uptime in a php file on a server as below
<p> The uptime for this system is <?php $up_time=shell_exec('uptime');
echo $uptime; ?</p>
But when I open my webpage it just shows :
The uptime for this system is
PHP doesn't appear to be running the command.
If I go to command prompt and run uptime, I do see the results.
I am doing ssh into a Linux we