Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Difference between system uptime and last boot time. Post 302521391 by pinga123 on Wednesday 11th of May 2011 06:19:14 AM
Old 05-11-2011
Quote:
Originally Posted by sagoiz
Hi, it is also strange that the time shown by the uptime is actually in the past as per the date command.
Below an output from one of our Linux testing machines:

Code:
[jira@frodo ~]$ date; last reboot; uptime
Wed May 11 12:11:57 EEST 2011
reboot   system boot  2.6.18-194.3.1.e Mon May  9 00:00         (2+12:11)   

wtmp begins Sun May  8 03:05:01 2011
 12:11:57 up 2 days, 12:12,  6 users,  load average: 13.40, 13.99, 13.48

As seen also, the output from your "system reboot" says that it was done 19:46 hours ago.
Could you please post the result of the commands as per my example?

Thank you.
Please find the output as requested.
Code:
# date; last reboot; uptime
Wed May 11 15:47:52 IST 2011
reboot   system boot  2.6.18-194.el5   Tue May 10 17:35          (22:12)
reboot   system boot  2.6.18-194.el5   Wed May  4 17:21         (6+22:26)
reboot   system boot  2.6.18-194.el5   Tue May  3 07:42         (2+04:20)
reboot   system boot  2.6.18-194.el5   Wed Apr 27 22:12         (5+09:18)
reboot   system boot  2.6.18-194.el5   Wed Apr 27 13:57         (5+17:34)
reboot   system boot  2.6.18-194.el5   Tue Apr 26 12:06          (20:17)
reboot   system boot  2.6.18-194.el5   Wed Apr 20 18:48         (6+12:07)
reboot   system boot  2.6.18-194.el5   Wed Apr 20 18:09          (00:38)
reboot   system boot  2.6.18-194.el5   Thu Apr  7 10:45         (13+07:17)
reboot   system boot  2.6.18-194.el5   Tue Apr  5 23:55         (1+10:47)
reboot   system boot  2.6.18-194.el5   Wed Apr  6 04:50          (-5:-1)
reboot   system boot  2.6.18-194.el5   Tue Apr  5 04:01          (19:12)
reboot   system boot  2.6.18-194.el5   Mon Mar 28 18:58         (8+02:37)
reboot   system boot  2.6.18-194.el5   Sun Mar 27 18:15          (19:09)
reboot   system boot  2.6.18-194.el5   Sat Mar 12 18:19         (15+18:02)
reboot   system boot  2.6.18-194.el5   Mon Feb 28 15:54         (27+20:27)
reboot   system boot  2.6.18-194.el5   Sat Feb 26 12:43         (2+03:00)
reboot   system boot  2.6.18-194.el5   Sat Feb 26 11:56          (00:38)
reboot   system boot  2.6.18-194.el5   Thu Feb 24 14:43         (1+21:09)
reboot   system boot  2.6.18-194.el5   Thu Feb 24 14:07          (00:30)
reboot   system boot  2.6.18-194.el5   Mon Feb 21 17:08         (2+20:55)
reboot   system boot  2.6.18-194.el5   Sun Feb 13 18:57         (7+21:58)
reboot   system boot  2.6.18-194.el5   Thu Feb 10 19:42         (2+17:41)
reboot   system boot  2.6.18-194.el5   Wed Feb  2 09:41         (9+03:32)
reboot   system boot  2.6.18-194.el5   Mon Jan 31 20:41         (1+17:21)
reboot   system boot  2.6.18-194.el5   Mon Jan 31 14:05          (23:32)
reboot   system boot  2.6.18-194.el5   Mon Jan 31 06:01          (02:32)
reboot   system boot  2.6.18-194.el5   Tue Jan 25 03:46         (6+04:47)
reboot   system boot  2.6.18-194.el5   Mon Jan 24 21:36          (00:37)
reboot   system boot  2.6.18-194.el5   Thu Jan 20 03:23          (01:43)
reboot   system boot  2.6.18-194.el5   Thu Jan 20 03:10          (00:11)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 08:58          (00:02)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 08:48          (00:07)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 07:24          (01:12)
reboot   system boot  2.6.18-194.el5   Fri Nov 12 22:35          (00:06)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 03:59          (-5:-24)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 03:49          (00:09)
reboot   system boot  2.6.18-194.el5   Sat Nov 13 03:43          (00:04)
reboot   system boot  2.6.18-194.el5   Fri Nov 12 16:43          (05:28)

wtmp begins Fri Nov 12 16:43:22 2010
 15:47:52 up  3:12,  3 users,  load average: 2.08, 2.10, 2.18

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

get only the up time from uptime command

Hi all,:o i am new to shell scripting and i have aproblem like i just want to extractthe uptime of the system from an uptime command which gives the output as the Current time , how long the system has been running,how many users are surrently logged on and the system load averages for past 1,5,... (5 Replies)
Discussion started by: tulip
5 Replies

2. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

3. Shell Programming and Scripting

Extract the uptime from the output of the uptime command

Hi! I want to extract the uptime from the output of the uptime command. The output: 11:53 up 3:02, 2 users, load averages: 0,32 0,34 0,43 I just need the "3:02" part. How can I do this? Dirk (6 Replies)
Discussion started by: Dirk Einecke
6 Replies

4. Solaris

uptime command not showing how long the system has been up

Hello folks, uptime command not shows how long the system has been up. I know it come from a corruption of /var/adm/utmpx file. I've done : cat /dev/null > /var/adm/utmpx Now who and last commands work fine. But uptime still give me back an answer without the "up time". In which... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

5. Shell Programming and Scripting

Time difference between two time stamps

Hi Friends, I have 2 varaibles which contain START=`date '+ %m/%d/%y %H:%M:%S'` END=`date '+ %m/%d/%y %H:%M:%S'` i want the time difference between the two variables in Seconds. Plz help. (2 Replies)
Discussion started by: i150371485
2 Replies

6. Solaris

Finding system uptime without login

Hi, Am writing a script where I want to find uptime of certain servers. Is there any command where we can find uptime without login to the server, since the server list is big logging to the server will time consuming. Thanks in advance (7 Replies)
Discussion started by: rogerben
7 Replies

7. Shell Programming and Scripting

Solaris, Perl, and precise system uptime??

OK folks, my first post here.. hope the community can come up with a clever solution. Cross posting this in the Solaris and Shell scripting forums, as problem is scripting problem specifically on Solaris platform. I am trying to detect a host's uptime with greater precision than is offered up... (1 Reply)
Discussion started by: Yeaboem
1 Replies

8. Solaris

Precise system uptime??

OK folks, my first post here.. hope the community can come up with a clever solution. Cross posting this in the Solaris and Shell scripting forums, as problem is scripting problem specifically on Solaris platform. I am trying to detect a host's uptime with greater precision than is offered up... (1 Reply)
Discussion started by: Yeaboem
1 Replies

9. Red Hat

Difference between uptime and who -b

Hi Folks, I have been checking on a redhat server for patching, when I tried the output for uptime and who -b both are not matching. I do not know the reason what happened and why it seems like this. Please assist someone and explain in detail. I would appreciate if I get the right... (5 Replies)
Discussion started by: seenuvasan1985
5 Replies

10. AIX

Managed system's uptime

How to find Physical server uptime from HMC/ ASMI. Server was in standby mode. We have started the Lpar manually. Server rebooted automatically but no information updated in Lpars's errpt, alog.console or HMC prior to the reboot. (1 Reply)
Discussion started by: sunnybee
1 Replies
All times are GMT -4. The time now is 02:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy