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 01-30-2010, 01:14 AM
Mike Iowa
 
Default How To determine the date the system & packages were installed.

I have done extensive searches and have found no answers for finding out the following information from Debian systems.

1. I would like to be able to tell when a package was installed.
2. I would also like to be able to look at (any) Debian or Debian-based system and tell when the operating system was originally installed.



If this is not possible (as I have been told thus far) that is fine. However, if there is a way it needs to work on most every Debian system and to not require special packages to have been installed.
In addition I have found that there are some systems that have log files such as /var/log/base-config.log.1 (Deb 3.1) that were created when the system was installed and even have captures of the installation

screens, but this is not uniform across Debian versions (none of my Deb 4.0 have it).

Preferably it would work with the base installation of any Debian system. I would like it to be more concrete than a file or directory listing. Given that can change for any


number of reasons.

Thanks,

Mike
 
Old 01-30-2010, 02:36 AM
Stephen Powell
 
Default How To determine the date the system & packages were installed.

On Fri, 29 Jan 2010 21:14:30 -0500 (EST), Mike Iowa wrote:
> I have done extensive searches and have found no answers for finding out the
> following information from Debian systems.
>
> 1. I would like to be able to tell when a package was installed.
> 2. I would also like to be able to look at (any) Debian or Debian-based
> system and tell when the operating system was originally installed.
>
> If this is not possible (as I have been told thus far) that is fine.
> However, if there is a way it needs to work on most every Debian system and
> to not require special packages to have been installed.
> In addition I have found that there are some systems that have log files
> such as /var/log/base-config.log.1 (Deb 3.1) that were created when the
> system was installed and even have captures of the installation
> screens, but this is not uniform across Debian versions (none of my Deb 4.0
> have it).
>
> Preferably it would work with the base installation of any Debian system. I
> would like it to be more concrete than a file or directory listing. Given
> that can change for any
> number of reasons.

Well, I'm far from an expert on this, Mike, but just in poking around in the
files on my system for the last half hour, this is what I've come up with.
There are files on the system of the form /var/log/dpkg.*
The newest one is called dpkg.log, the one before that is called dpkg.log.1,
and the ones before that are called dpkg.log.2.gz, dpkg.log.3.gz, etc.
If they are all still there, the oldest one would tell you when the system
was installed. However, I believe that a cron job somewhere is programmed
to keep only so many of these files. Eventually, the oldest one will be
deleted. If you still have the oldest one, it will say

startup archives install
install base-files <none> 5.0.0

(or something along those lines) in the first two records. There are date
and time stamps for every state transition of every package along the way.
They are in chronological order, except that you may see the effects of
a time zone change after locales is installed. For example, I have my
system clock set to GMT. The entries prior to locales are in GMT.
After locales is installed, they revert to local time. All package
installation methods (synaptic, aptitude, apt, etc., eventually filter
down to a dpkg command; so this would appear to capture it all.

Hope this helps.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-30-2010, 11:52 AM
Camaleón
 
Default How To determine the date the system & packages were installed.

On Fri, 29 Jan 2010 20:14:30 -0600, Mike Iowa wrote:

> I have done extensive searches and have found no answers for finding out
> the following information from Debian systems.
>
> 1. I would like to be able to tell when a package was installed.

Far from perfect, but you can get some info under "/var/lib/dpkg/info/
*.list".

Quick example: I installed "mail-notification", but when?

sm01@stt008:~$ ls /var/lib/dpkg/info/*.list -lh | grep mail-notification
-rw-r--r-- 1 root root 4,4K nov 15 17:23 /var/lib/dpkg/info/mail-
notification.list

That shows November 15th at 17:23.

> 2. I would also like to be able to look at (any) Debian or Debian-based
> system and tell when the operating system was originally installed.

The bootloader creation filestamp can help.

sm01@stt008:/boot/grub$ ls -l /boot/grub/menu.lst
-rw-r--r-- 1 root root 4888 nov 14 20:21 /boot/grub/menu.lst

(...)

> Preferably it would work with the base installation of any Debian
> system. I would like it to be more concrete than a file or directory
> listing. Given that can change for any
> number of reasons.

Yep, looking up files timestamps it's not "bullet-proof" but in some
scenarios can be a bit useful :-)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-30-2010, 04:15 PM
Jochen Schulz
 
Default How To determine the date the system & packages were installed.

Mike Iowa:
>
> 2. I would also like to be able to look at (any) Debian or Debian-based
> system and tell when the operating system was originally installed.

A good hint might be the creation date of your root filesystem:

$ sudo tune2fs -l /dev/sda1 | grep created
Filesystem created: Mon Jul 6 09:01:20 2009

(Hm, did I really install this system on a Monday at 9 o'clock in the
morning? Must have been on vacation.)

J.
--
When I am doing sex I wonder if my emotions can be detected by alien
civilisations.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 01-31-2010, 11:31 AM
Jeffrey Cao
 
Default How To determine the date the system & packages were installed.

On 2010-01-30, Jochen Schulz <ml@well-adjusted.de> wrote:
>
> --YzdYn+D7cUqe+VA3
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Mike Iowa:
>>=20
>> 2. I would also like to be able to look at (any) Debian or Debian-based
>> system and tell when the operating system was originally installed.
>
> A good hint might be the creation date of your root filesystem:
>
> $ sudo tune2fs -l /dev/sda1 | grep created
> Filesystem created: Mon Jul 6 09:01:20 2009
>
> (Hm, did I really install this system on a Monday at 9 o'clock in the
> morning? Must have been on vacation.)
>
It sounds good, but when I run this command on my notebook, it says:
Filesystem created: Thu Feb 19 05:38:52 2009
I can't believe it's 5:38 in the morning when I installed my system.

Jeffrey


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-31-2010, 01:55 PM
Jochen Schulz
 
Default How To determine the date the system & packages were installed.

Jeffrey Cao:
> On 2010-01-30, Jochen Schulz <ml@well-adjusted.de> wrote:
>
>> A good hint might be the creation date of your root filesystem:
>>
>> $ sudo tune2fs -l /dev/sda1 | grep created
>> Filesystem created: Mon Jul 6 09:01:20 2009
>>
>> (Hm, did I really install this system on a Monday at 9 o'clock in the
>> morning? Must have been on vacation.)
>>
> It sounds good, but when I run this command on my notebook, it says:
> Filesystem created: Thu Feb 19 05:38:52 2009
> I can't believe it's 5:38 in the morning when I installed my system.

I guess the time is in UTC. (Only 1 hour off in my case, I don't know
about yours.

J.
--
My drug of choice is self-pity.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 01-31-2010, 02:39 PM
Stephen Powell
 
Default How To determine the date the system & packages were installed.

On Sun, 31 Jan 2010 09:55:30 -0500 (EST), Jochen Schulz wrote:
> I guess the time is in UTC. (Only 1 hour off in my case, I don't know
> about yours.

Maybe it's not an hour off. Have you taken Daylight Saving Time into
account? For example, the US Eastern Time zone is five hours behind
GMT in the winter, but only four hours behind GMT in the summer.
What time of year was it at that time? What time zone offset was
in effect then?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-31-2010, 05:37 PM
Jochen Schulz
 
Default How To determine the date the system & packages were installed.

Stephen Powell:
> On Sun, 31 Jan 2010 09:55:30 -0500 (EST), Jochen Schulz wrote:
>>
>> I guess the time is in UTC. (Only 1 hour off in my case, I don't know
>> about yours.
>
> Maybe it's not an hour off.

Sorry, english is not my first language. What I meant was that when my
root partition was formatted, my local time only differed from UTC by
one hour.

J.
--
If you do not move for long enough, you might see a rat.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 01-31-2010, 07:31 PM
Stephen Powell
 
Default How To determine the date the system & packages were installed.

On Sun, 31 Jan 2010 13:37:14 -0500 (EST), Jochen Schulz wrote:
> Sorry, english is not my first language. What I meant was that when my
> root partition was formatted, my local time only differed from UTC by
> one hour.

Oh. What I thought you meant was "If I assume that the time value
reported on the screen is UTC, and I convert it to my local time,
it only differs from the time I actually did my install by one hour."
Now perhaps you understand the reference to Daylight Saving Time,
and how that might account for the difference.

Actually your English is quite good compared to some of the posts I've
seen. Some of them are so bad I literally cannot figure out what
they are trying to say. This, on the other hand, is a simple
misunderstanding.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-01-2010, 12:37 PM
Jeffrey Cao
 
Default How To determine the date the system & packages were installed.

On 2010-01-31, Jochen Schulz <ml@well-adjusted.de> wrote:
>
> --3gk1bTGVZuaU9V5/
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Jeffrey Cao:
>> On 2010-01-30, Jochen Schulz <ml@well-adjusted.de> wrote:
>>=20
>>> A good hint might be the creation date of your root filesystem:
>>>=20
>>> $ sudo tune2fs -l /dev/sda1 | grep created
>>> Filesystem created: Mon Jul 6 09:01:20 2009
>>>=20
>>> (Hm, did I really install this system on a Monday at 9 o'clock in the
>>> morning? Must have been on vacation.)
>>>=20
>> It sounds good, but when I run this command on my notebook, it says:
>> Filesystem created: Thu Feb 19 05:38:52 2009
>> I can't believe it's 5:38 in the morning when I installed my system.
>
> I guess the time is in UTC. (Only 1 hour off in my case, I don't know
> about yours.
>

That makes sense. My time zone is +8, so it's 13:38. That's right.

Jeffrey


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

Thread Tools




All times are GMT. The time now is 05:20 AM.

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