[olug] Uptime to boot date

Quinn Coldiron qcoldir at nmhs.org
Tue Oct 29 20:09:16 UTC 2002


OK,

now, this is odd.  I have a RH 6.x server still running (no time to
upgrade it yet) and it's /proc shows it's boot date time but the
/proc/sys is different.  What's up?

Quinn


On Tue, 2002-10-29 at 14:03, Quinn Coldiron wrote:
> Sorry about all the posts...
> 
> /proc/sys shows the correct boot time:
> dr-xr-xr-x   10 root     root            0 Oct 29 07:48 sys
> 
> Quinn
> 
> 
> On Tue, 2002-10-29 at 13:58, Quinn Coldiron wrote:
> > Are you sure?  I booted my laptop at about 7:45 this morning.  Here's my
> > listing:
> > 
> > dr-xr-xr-x  116 root     root            0 Oct 29 01:47 proc
> > 
> > The stuff in proc is all different.
> > 
> > RH 7.3
> > 
> > Quinn
> > 
> > 
> > 
> > On Tue, 2002-10-29 at 13:41, David Walker wrote:
> > > Also, the creation date of the /proc directory will be the reboot date of your 
> > > machine.
> > > 
> > > On Tuesday 29 October 2002 01:26 pm, (Via wrote:
> > > > Here is a tcl script
> > > >
> > > >
> > > > #!/usr/bin/tclsh
> > > >
> > > > set proc_uptime [exec cat /proc/uptime]
> > > > set uptime [string range $proc_uptime 0 [string first {.} $proc_uptime]]
> > > >
> > > > set boot_date [expr int([clock seconds] - $uptime)]
> > > >
> > > > puts [clock format $boot_date]
> > > >
> > > > On Tuesday 29 October 2002 11:27 am, (Via wrote:
> > > > > Anyone know a quick way how I can turn the uptime output into an actual
> > > > > date/time of the last boot?  Would it be the date command?
> > > > >
> > > > > [~]$ uptime
> > > > >  11:25am  up 493 days,  2:41
> > > > >
> > > > > Jon L.
> > > >
> > > > _______________________________________________
> > > > OLUG mailing list
> > > > OLUG at olug.org
> > > > http://lists.olug.org/mailman/listinfo/olug
> > > 
> > > _______________________________________________
> > > OLUG mailing list
> > > OLUG at olug.org
> > > http://lists.olug.org/mailman/listinfo/olug
> > -- 
> > 
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > http://lists.olug.org/mailman/listinfo/olug
> -- 
> 
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
-- 




More information about the OLUG mailing list