dtrace walltimestamp

Ashley Williams ashley.wil at gmail.com
Sun Aug 21 22:49:20 UTC 2011


On Sun, Aug 21, 2011 at 7:05 AM, Fabian Keil
<freebsd-listen at fabiankeil.de> wrote:
>
> Ashley Williams <ashley.wil at gmail.com> wrote:
>
> > walltimestamp and timestamp don't appear to be right in BETA-1:
> >
> >
> > # dtrace -qn 'syscall::exec*:return { printf("%Y
> > %s\n",walltimestamp,curpsinfo->pr_psargs); }'
> > 1970 Jan  1 10:00:00 date
> > 1970 Jan  1 10:00:00 ping
> > 1970 Jan  1 10:00:00 ls
>
> I can reproduce this on amd64 with a recent HEAD, walltimestamp
> is always 0, which together with the dmesg warnings seems to indicate
> that it's not supported (yet).

Bug report has been filed - thanks for testing. PR - 159612 for those
interested.


>
> > # dtrace -qn 'syscall::exec*:return { printf("%Y
> > %s\n",timestamp,curpsinfo->pr_psargs); }'
> > 1970 Jan  6 12:02:27 ping
> > 1970 Jan  6 12:02:29 ls
> > 1970 Jan  6 12:02:31 dtrace
>
> Note that the timestamp value is relative to the time
> the system is booted (I think), and not to midnight,
> January 1, 1970.
>
> Assuming your system has been running for a few days
> and the offsets are right as well, the output seems fine.

Thanks for that - I did some testing on Solaris 11 and it's evident I
have misunderstood the usage of the timestamp function. The output
above, as you said, is definitely correct.


More information about the freebsd-current mailing list