FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-27-2011, 02:36 PM
yudi v
 
Default Is there a way to tell when a system was first booted?

Is there a way to tell when a system was first booted?
--
Kind regards,
Yudi
 
Old 08-27-2011, 03:43 PM
"John A. Sullivan III"
 
Default Is there a way to tell when a system was first booted?

On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:
> Is there a way to tell when a system was first booted?

Does "uptime" do what you want or do you mean booted for the truly very
first time (not counting reboots)? - John



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1314459829.1357.108.camel@denise.theartistscloset. com">http://lists.debian.org/1314459829.1357.108.camel@denise.theartistscloset. com
 
Old 08-27-2011, 05:07 PM
Miles Fidelman
 
Default Is there a way to tell when a system was first booted?

John A. Sullivan III wrote:

On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:

Is there a way to tell when a system was first booted?

Does "uptime" do what you want or do you mean booted for the truly very
first time (not counting reboots)? - John


well uptime will tell most recent boot,

not exactly what you asked, but the log files in /var/log/installer can
tell you when the current o/s was installed


if you mean when the hardware was first booted, there might be something
in /sys or maybe somewhere in BIOS PRAM, but that's almost certainly
motherboard-specific.


Miles Fidelman

--
In theory, there is no difference between theory and practice.
In<fnord> practice, there is. .... Yogi Berra



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E592454.3080601@meetinghouse.net">http://lists.debian.org/4E592454.3080601@meetinghouse.net
 
Old 08-27-2011, 05:08 PM
shawn wilson
 
Default Is there a way to tell when a system was first booted?

On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III
<jsullivan@opensourcedevel.com> wrote:
> On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:
>> Is there a way to tell when a system was first booted?
>
> Does "uptime" do what you want or do you mean booted for the truly very
> first time (not counting reboots)? - John
>

cat /proc/uptime


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAH_OBicie9ynLdjX6JpTUPZQ+qbydZOvHH3zjcYsHJjveav+k A@mail.gmail.com">http://lists.debian.org/CAH_OBicie9ynLdjX6JpTUPZQ+qbydZOvHH3zjcYsHJjveav+k A@mail.gmail.com
 
Old 08-27-2011, 05:25 PM
Ivan Shmakov
 
Default Is there a way to tell when a system was first booted?

>>>>> shawn wilson <ag4ve.us@gmail.com> writes:
>>>>> On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III wrote:
>>>>> On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:

>>> Is there a way to tell when a system was first booted?

>> Does "uptime" do what you want or do you mean booted for the truly
>> very first time (not counting reboots)?

> cat /proc/uptime

How's that more legible than the output of the uptime(1)
command?

$ cat < /proc/uptime
44547837.32 177282465.98
$ uptime
17:24:43 up 515 days, 14:24, 3 users, load average: 0.00, 0.00, 0.00
$

--
FSF associate member #7257 Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 86mxeuix6f.fsf@gray.siamics.net">http://lists.debian.org/86mxeuix6f.fsf@gray.siamics.net
 
Old 08-27-2011, 05:59 PM
shawn wilson
 
Default Is there a way to tell when a system was first booted?

On Aug 27, 2011 1:26 PM, "Ivan Shmakov" <ivan@gray.siamics.net> wrote:

>

> >>>>> shawn wilson <ag4ve.us@gmail.com> writes:

> >>>>> On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III wrote:

> >>>>> On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:

>

> *>>> Is there a way to tell when a system was first booted?

>

> *>> Does "uptime" do what you want or do you mean booted for the truly

> *>> very first time (not counting reboots)?

>

> *> cat /proc/uptime

>

> * * * *How's that more legible than the output of the uptime(1)

> * * * *command?

>

> $ cat < /proc/uptime

> 44547837.32*177282465.98

> $ uptime

> *17:24:43 up 515 days, 14:24, *3 users, *load average: 0.00, 0.00, 0.00

> $


Nothing. Iirc uptime parses that file. For a history of boots, other than a BIOS log, you might look at the acct package, specifically what gets stored in wtmp. This would not give you anything prior to wtmp being created but might give you what you want.
 
Old 08-27-2011, 06:14 PM
Ivan Shmakov
 
Default Is there a way to tell when a system was first booted?

>>>>> shawn wilson <ag4ve.us@gmail.com> writes:
>>>>> On Aug 27, 2011 1:26 PM, "Ivan Shmakov" <ivan@gray.siamics.net> wrote:
>>>>> shawn wilson <ag4ve.us@gmail.com> writes:
>>>>> On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III wrote:

[…]

>>>> Does "uptime" do what you want or do you mean booted for the truly
>>>> very first time (not counting reboots)?

>>> cat /proc/uptime

>> How's that more legible than the output of the uptime(1)
>> command?

[…]

> Nothing. Iirc uptime parses that file.

That's correct.

$ strace uptime 2>&1 | grep -F /proc/
open("/proc/version", O_RDONLY) = 4
open("/proc/stat", O_RDONLY|O_CLOEXEC) = 4
open("/proc/uptime", O_RDONLY) = 4
open("/proc/loadavg", O_RDONLY) = 5
$

> For a history of boots, other than a BIOS log, you might look at the
> acct package, specifically what gets stored in wtmp.

I don't see how such a wtmp(5) maintenance is tied to the acct
package. Consider, e. g.:

$ dpkg -l acct
No packages found matching acct.
$ last reboot
reboot system boot 2.6.XXXXXXXXXXXX Tue Mar 30 03:11 - 18:06 (515+14:55)
reboot system boot 2.6.XXXXXXXXXXXX Tue Mar 30 03:10 - 03:11 (00:01)
reboot system boot 2.6.XXXXXXXXXXXX Tue Mar 30 02:55 - 03:09 (00:13)

wtmp begins Tue Mar 30 02:55:59 2010
$

It was my guess that the reboot records are made by init(8).

> This would not give you anything prior to wtmp being created but
> might give you what you want.

Unfortunately, this file is logrotate(8)'d every month, and only
one backup survives as per the default configuration.

--cut: /etc/logrotate.conf --
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
--cut: /etc/logrotate.conf --

--
FSF associate member #7257 Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 86ippiiux8.fsf@gray.siamics.net">http://lists.debian.org/86ippiiux8.fsf@gray.siamics.net
 
Old 08-28-2011, 01:02 AM
Scott Ferguson
 
Default Is there a way to tell when a system was first booted?

On 28/08/11 00:36, yudi v wrote:

Is there a way to tell when a system was first booted?

--
Kind regards,
Yudi



Maybe...(I'm guessing)

/var/log/installer/hardware-summary
look at the first line

also look at the modify time for /etc/issue

Cheers

--
"You ever noticed how people who believe in Creationism look really
unevolved? You ever noticed that? Eyes real close together, eyebrow
ridges, big furry hands and feet. "I believe God created me in one day"
Yeah, looks liked He rushed it."

— Bill Hicks


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4E5993B4.70904@gmail.com">http://lists.debian.org/4E5993B4.70904@gmail.com
 
Old 08-28-2011, 01:18 AM
yudi v
 
Default Is there a way to tell when a system was first booted?

Just to clarify my original post. I want to find out when I installed and booted Debian for the very first time.
--
Kind regards,
Yudi
 
Old 08-28-2011, 01:26 AM
Greg Farough
 
Default Is there a way to tell when a system was first booted?

From: Scott Ferguson <prettyfly.productions@gmail.com>
Subject: Re: Is there a way to tell when a system was first booted?
Date: Sun, 28 Aug 2011 11:02:44 +1000

> On 28/08/11 00:36, yudi v wrote:
>> Is there a way to tell when a system was first booted?
>>
>> --
>> Kind regards,
>> Yudi
>>
>
> Maybe...(I'm guessing)
>
> /var/log/installer/hardware-summary
> look at the first line
>
> also look at the modify time for /etc/issue
>
> Cheers
>

The modify time for /var/log/installer/hardware-summary looks correct to me. Do a ls -l on it for the date.
 

Thread Tools




All times are GMT. The time now is 10:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org