Uptime command last

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
dougbrag
Posts: 4
Joined: 2013/11/21 13:43:42

Uptime command last

Post by dougbrag » 2013/11/21 13:51:04

Good morning!

I need information of "uptime" of a server and would like to redeem them locally, ie on the server itself.
I used the command "last", but unable to interpret the last column which shows the time "uptime".
I would like your help to understand the command "last" or even to indicate a better tool and you can get the information of "uptime" locally on the server.

Thanks for your attention!

User avatar
TrevorH
Forum Moderator
Posts: 29120
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Uptime command last

Post by TrevorH » 2013/11/21 14:08:20

The command you are looking for is.... `uptime` ;)
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

dougbrag
Posts: 4
Joined: 2013/11/21 13:43:42

Re: Uptime command last

Post by dougbrag » 2013/11/21 14:13:31

Hi TrevorH! Thanks for your attention!

TrevorH, please correct me if I'm wrong. But the uptime command does not return intervals of uptime, I would like to see the ranges.

example:

January - 28 days and 2 hours active

Something like this ...
I do not know if there is.

Thank you!

dougbrag
Posts: 4
Joined: 2013/11/21 13:43:42

Re: Uptime command last

Post by dougbrag » 2013/11/21 23:13:03

I solve my problem if I could arrange the result of the command "last" by year.

I could not organize.

Thanks for any help.

User avatar
TrevorH
Forum Moderator
Posts: 29120
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Uptime command last

Post by TrevorH » 2013/11/21 23:16:35

I don't understand, the output from last is already in chronological order, most recent first.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

dougbrag
Posts: 4
Joined: 2013/11/21 13:43:42

Re: Uptime command last

Post by dougbrag » 2013/11/22 11:25:39

Good morning TrevorH !

Sorry for so many questions .

I was left with questions about the chronology of the LSAT because I do not understand the last column .

[root@localhost ~]# last reboot
reboot system boot 2.6.18-194.3.1.e Fri Oct 4 08:22 (48+23:51)
reboot system boot 2.6.18-194.3.1.e Mon Aug 19 08:26 (45+09:44)
reboot system boot 2.6.18-194.3.1.e Fri Jun 7 10:18 (118+07:52)
reboot system boot 2.6.18-194.3.1.e Mon Aug 20 08:44 (291+01:32)
reboot system boot 2.6.18-194.3.1.e Mon Jul 2 09:03 (340+01:13)
reboot system boot 2.6.18-194.3.1.e Tue May 29 09:19 (374+00:57)
reboot system boot 2.6.18-194.3.1.e Wed May 9 09:34 (394+00:42)
reboot system boot 2.6.18-194.3.1.e Fri Apr 13 09:33 (420+00:43)
reboot system boot 2.6.18-194.3.1.e Sat Mar 17 18:16 (26+15:15)
reboot system boot 2.6.18-194.3.1.e Mon Mar 12 10:16 (31+23:15)
reboot system boot 2.6.18-194.3.1.e Sat Jan 28 12:03 (75+22:28)
reboot system boot 2.6.18-194.3.1.e Sat Jan 28 11:46 (00:15)
reboot system boot 2.6.18-194.3.1.e Sat Jan 28 11:25 (00:08)
reboot system boot 2.6.18-194.3.1.e Sat Jan 28 10:47 (00:35)
reboot system boot 2.6.18-194.3.1.e Sat Jan 28 10:14 (00:32)

wtmp begins Sat Jan 28 10:14:04 2012

Many thanks for your help and patience .

User avatar
TrevorH
Forum Moderator
Posts: 29120
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Uptime command last

Post by TrevorH » 2013/11/22 11:46:23

I've got no idea what the last column is. It's meant to be the duration of the entry but it doesn't always appear to add up to me. On CentOS 6 you get slightly different output and it lists start and end times and then the duration.

What I can see is that your system is seriously in need of a yum update. The kernel you are running is prehistoric and riddled with security vulnerabilities.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 5 - Server Support”