Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Ed Schouten
* Garrett Cooper , 20111017 21:38: > time_t maps to int32_t on i386 and int64_t on amd64 (at least), so > you should be able to use "%zd" in the format string as the type is > variable width depending on the architecture. Yuck. Why not cast it to intmax_t and print it using %jd? -- Ed Schou

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Alexander Best
On Mon Oct 17 11, Arnaud Lacombe wrote: > Hi, > > On Mon, Oct 17, 2011 at 3:44 PM, Alexander Best wrote: > > On Mon Oct 17 11, Arnaud Lacombe wrote: > >> Hi, > >> > >> On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best > >> wrote: > >> > On Fri Oct 14 11, Arnaud Lacombe wrote: > >> >> Hi, > >> >>

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Arnaud Lacombe
Hi, On Mon, Oct 17, 2011 at 3:38 PM, Garrett Cooper wrote: > On Mon, Oct 17, 2011 at 12:27 PM, Arnaud Lacombe wrote: >> Hi, >> >> On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best wrote: >>> On Fri Oct 14 11, Arnaud Lacombe wrote: >>> [...] >>> >>> cc -c -O -pipe -march=core2 -std=c99 -g -Wall -W

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Arnaud Lacombe
Hi, On Mon, Oct 17, 2011 at 3:44 PM, Alexander Best wrote: > On Mon Oct 17 11, Arnaud Lacombe wrote: >> Hi, >> >> On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best wrote: >> > On Fri Oct 14 11, Arnaud Lacombe wrote: >> >> Hi, >> >> >> >> On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: >> >> > A

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Alexander Best
On Mon Oct 17 11, Arnaud Lacombe wrote: > Hi, > > On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best wrote: > > On Fri Oct 14 11, Arnaud Lacombe wrote: > >> Hi, > >> > >> On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: > >> > Alexander Best writes: > >> > > >> >>> On Fri Oct 14 11, Poul-Henning

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Garrett Cooper
On Mon, Oct 17, 2011 at 12:27 PM, Arnaud Lacombe wrote: > Hi, > > On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best wrote: >> On Fri Oct 14 11, Arnaud Lacombe wrote: >>> Hi, >>> >>> On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: >>> > Alexander Best writes: >>> > >>> >>> On Fri Oct 14 11, Poul

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Arnaud Lacombe
Hi, On Mon, Oct 17, 2011 at 2:01 PM, Alexander Best wrote: > On Fri Oct 14 11, Arnaud Lacombe wrote: >> Hi, >> >> On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: >> > Alexander Best writes: >> > >> >>> On Fri Oct 14 11, Poul-Henning Kamp wrote: >> >>> > In message <20111014085609.ga3...@freeb

Re: [RFC] Prepend timestamp in msgbuf

2011-10-17 Thread Alexander Best
On Fri Oct 14 11, Arnaud Lacombe wrote: > Hi, > > On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: > > Alexander Best writes: > > > >>> On Fri Oct 14 11, Poul-Henning Kamp wrote: > >>> > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: > >>> > > >>> > >1) would it be possi

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Arnaud Lacombe
Hi, On Fri, Oct 14, 2011 at 8:52 AM, Nali Toja wrote: > Alexander Best writes: > >>> On Fri Oct 14 11, Poul-Henning Kamp wrote: >>> > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: >>> > >>> > >1) would it be possible to prepend those timestamps to the actual console >>>

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Nali Toja
Alexander Best writes: >> On Fri Oct 14 11, Poul-Henning Kamp wrote: >> > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: >> > >> > >1) would it be possible to prepend those timestamps to the actual console >> > >output and not only to the output of demsg? maybe via a sysc

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Alexander Best
On Fri Oct 14 11, Alexander Best wrote: > On Fri Oct 14 11, Poul-Henning Kamp wrote: > > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: > > > > >1) would it be possible to prepend those timestamps to the actual console > > >output and not only to the output of demsg? maybe

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Alexander Best
On Fri Oct 14 11, Alexander Best wrote: > On Fri Oct 14 11, Poul-Henning Kamp wrote: > > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: > > > > >1) would it be possible to prepend those timestamps to the actual console > > >output and not only to the output of demsg? maybe

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Alexander Best
On Fri Oct 14 11, Poul-Henning Kamp wrote: > In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: > > >1) would it be possible to prepend those timestamps to the actual console > >output and not only to the output of demsg? maybe via a sysctl toggle? > > The kernel does not know

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Poul-Henning Kamp
In message <20111014085609.ga3...@freebsd.org>, Alexander Best writes: >1) would it be possible to prepend those timestamps to the actual console >output and not only to the output of demsg? maybe via a sysctl toggle? The kernel does not know enough about timezones to emit anything but UTC timest

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Alexander Best
On Fri Oct 14 11, Nikolay Denev wrote: > > On Oct 13, 2011, at 9:40 PM, Arnaud Lacombe wrote: > > > Hi, > > > > On Thu, Oct 13, 2011 at 2:00 PM, wrote: > >> From: Arnaud Lacombe > >> > >> Hi folks, > >> > >> There is many case recently when I really wished timestamp were present in > >> th

Re: [RFC] Prepend timestamp in msgbuf

2011-10-14 Thread Nikolay Denev
On Oct 13, 2011, at 9:40 PM, Arnaud Lacombe wrote: > Hi, > > On Thu, Oct 13, 2011 at 2:00 PM, wrote: >> From: Arnaud Lacombe >> >> Hi folks, >> >> There is many case recently when I really wished timestamp were present in >> the >> post-mortem msgbuf. Such situation could be when userland

Re: [RFC] Prepend timestamp in msgbuf

2011-10-13 Thread Adrian Chadd
On 14 October 2011 02:40, Arnaud Lacombe wrote: > Hi, > > On Thu, Oct 13, 2011 at 2:00 PM,   wrote: >> From: Arnaud Lacombe >> >> Hi folks, >> >> There is many case recently when I really wished timestamp were present in >> the >> post-mortem msgbuf. Such situation could be when userland applica

Re: [RFC] Prepend timestamp in msgbuf

2011-10-13 Thread Arnaud Lacombe
Hi, On Thu, Oct 13, 2011 at 2:00 PM, wrote: > From: Arnaud Lacombe > > Hi folks, > > There is many case recently when I really wished timestamp were present in the > post-mortem msgbuf. Such situation could be when userland application segfault > potentially triggering a panic/crash, or have in

[RFC] Prepend timestamp in msgbuf

2011-10-13 Thread lacombar
From: Arnaud Lacombe Hi folks, There is many case recently when I really wished timestamp were present in the post-mortem msgbuf. Such situation could be when userland application segfault potentially triggering a panic/crash, or have information about the time-wise location of a given message (