1 |
John J. Foster wrote: |
2 |
> On Thu, May 13, 2010 at 05:18:08PM -0600, John J. Foster wrote: |
3 |
> |
4 |
>> On Fri, May 14, 2010 at 01:02:01AM +0200, Alex Schuster wrote: |
5 |
>> |
6 |
>>> John J. Foster writes: |
7 |
>>> |
8 |
>>> |
9 |
>>>> I lost utility power for 2 hours today while at work (on my home |
10 |
>>>> machine). UPS probably help for 20 minutes, or so. Just out of |
11 |
>>>> curiousity, is there a way to determine previous system uptime. I know |
12 |
>>>> I was getting close to 11 months, which would be a record for me. |
13 |
>>>> |
14 |
>>> The system logs boot and login dates in /var/log/wtmp, the last command |
15 |
>>> shows the content of this binary file. |
16 |
>>> |
17 |
>>> last | grep "system boot" | head |
18 |
>>> |
19 |
>>> Hope you broke the record, |
20 |
>>> Wonko |
21 |
>>> |
22 |
>>> |
23 |
>> festus@localhost ~ $ last | grep "system boot" |
24 |
>> reboot system boot 2.6.28-gentoo-r5 Thu May 13 16:39 - 17:30 (00:51) |
25 |
>> |
26 |
>> OK, so after looking at "man last", I tried |
27 |
>> |
28 |
>> festus@localhost ~ $ last reboot |
29 |
>> reboot system boot 2.6.28-gentoo-r5 Thu May 13 16:39 - 17:30 (00:51) |
30 |
>> |
31 |
>> wtmp begins Sat May 1 08:23:36 2010 |
32 |
>> |
33 |
>> which doesn't really help much. |
34 |
>> |
35 |
>> Any other ideas, |
36 |
>> festus |
37 |
>> |
38 |
> Damn - log-rotate cleans wtmp monthly |
39 |
> |
40 |
> |
41 |
>> -- |
42 |
>> It is not unusual for those at the wrong end of the club to have a |
43 |
>> clearer picture of reality than those who wield it. |
44 |
>> Noam Chomsky |
45 |
>> |
46 |
|
47 |
This is mine: |
48 |
|
49 |
root@smoker ~ # last | grep boot |
50 |
reboot system boot 2.6.30-gentoo-r8 Sun May 9 20:51 - 20:56 (4+00:05) |
51 |
reboot system boot 2.6.30-gentoo-r8 Sun May 9 03:49 - 19:21 (15:31) |
52 |
reboot system boot 2.6.30-gentoo-r8 Mon May 3 17:29 - 14:48 (4+21:18) |
53 |
root@smoker ~ # |
54 |
|
55 |
Isn't the last part of the line the uptime? I haven't done the math to |
56 |
say that it is, just curious. Also, I have logrotate set to rotate |
57 |
mine. I delete them after a while or when I need disk space. They do |
58 |
consume space after a while. |
59 |
|
60 |
Dale |
61 |
|
62 |
:-) :-) |