Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: antiRepublicrat

What is the unix command to determine how long your server has been up (or the last time it was rebooted)?

I confess to never having used a Windows Server product, but creating my BSD file server was so easy (and free, except for a hard drive and network card; got the other hardware from someone getting rid of their older machine) to install and set up and its been running without problems for around 2 months. I don't have a thousand users hitting it every minute (more like 2 a day), but even with the pains I had to go through to learn some unix, installing a Windows server couldn't have been any easier. And it wouldn't have worked on the hardware I'm using.


18 posted on 06/07/2006 7:59:09 AM PDT by 1L
[ Post Reply | Private Reply | To 16 | View Replies ]


To: 1L
What is the unix command to determine how long your server has been up (or the last time it was rebooted)?

uptime

20 posted on 06/07/2006 8:02:57 AM PDT by N3WBI3 ("I can kill you with my brain" - River Tam)
[ Post Reply | Private Reply | To 18 | View Replies ]

To: 1L
In addition to the 'uptime' command, you can also use 'last'.

 bash-2.05# uptime
 10:14am  up 236 day(s), 17:02,  1 user,  load average: 0.28, 0.17, 0.19
bash-2.05# last reboot
reboot    system boot                   Thu Oct 13 17:12
reboot    system boot                   Thu Oct 13 17:04
reboot    system boot                   Tue Feb 15 21:15
reboot    system boot                   Tue Feb 15 21:04
reboot    system boot                   Sun Nov 14 19:50
reboot    system boot                   Mon Oct 18 10:16
reboot    system boot                   Sat Oct 16 03:55

wtmp begins Sat Oct 16 03:55
bash-2.05#

Unfortunately, the 'last' command is of not much use if you measure uptime in years...

$ uptime
 10:16am  up 1349 day(s), 17:16,  1 user,  load average: 0.01, 0.01, 0.01
fada1w3p11: pugha :) last reboot
reboot    system boot                   Thu Sep 26 17:00
reboot    system boot                   Sun Aug 11 16:34
reboot    system boot                   Sun Aug  4 15:33
reboot    system boot                   Sun Aug  4 15:30
reboot    system boot                   Sun Aug  4 15:27
reboot    system boot                   Fri Aug  2 15:35
reboot    system boot                   Fri Aug  2 15:27
reboot    system boot                   Fri Jul 26 08:01
reboot    system boot                   Thu Jul 25 17:05

wtmp begins Thu Jul 25 17:05
$

So, the system was rebooted sept 26. But it doesn't tell you that was Sept 6., 2003!

23 posted on 06/07/2006 8:17:51 AM PDT by zeugma (I reject your reality and substitute my own in its place.)
[ Post Reply | Private Reply | To 18 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson