Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.development > #8372

Re: System log and format of log entries

From "James Harris" <james.harris.1@gmail.com>
Newsgroups alt.os.development
Subject Re: System log and format of log entries
Date 2015-07-14 11:59 +0100
Organization A noiseless patient Spider
Message-ID <mo2q0m$o4g$1@dont-email.me> (permalink)
References <mo2p03$kme$1@dont-email.me>

Show all headers | View raw


"James Harris" <james.harris.1@gmail.com> wrote in message 
news:mo2p03$kme$1@dont-email.me...

...

> So basically, each log entry is to have
>
>  1. the timestamp
>  2. the datetime
>  3. the text of the log entry

While the above looks simple there are issues to deal with surrounding 
availability and reliability of the two types of time.

There may not be a suitable source for a timestamp on some machines. 
Even machines which have a suitable upcounter may not make it available 
until the machine has gone some way into its boot process. So there 
needs to be a way to indicate whether the timestamp is present or valid 
etc.

Similarly, a datetime (i.e. yyyy-mm-dd hh:mm:ss etc) may not be 
available but it also has other issues. There may be such a value 
available but it might not be correct or it might not be possible to 
identify how close it is to the real time.

For the datetime I think I need to encode two things: where the value 
came from and how long it has been since it was last corrected. So I 
have come up with a two-hex-digit code to indicate the source and the 
age of last verification:

datetime source:
  0 completely unknown
  2 believed to be fake
  4 unverified local hardware (e.g. CMOS/RTC)
  6 set by a person
  8 derived from external time source hardware
  a derived from apparently public NTP

nominal age of last datetime verification:
  0 longer than a year
  2 less than a year
  4 less than four weeks
  6 less than a day
  8 less than an hour

For example, a two-digit code 68 would mean that the datetime was set by 
a person within the last hour.

The idea is that when a person looks at the log or when a program parses 
the log he or it will be able to see what to make of the datetime value.

I'll stop there and post separately about how to represent the above.

Any thoughts on the approach so far?

James

Back to alt.os.development | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-14 11:42 +0100
  Re: System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-14 11:59 +0100
  Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 03:23 -0400
    Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 22:46 -0400
  Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 03:33 -0400
    Re: System log and format of log entries Peter Cheung <mcheung63@gmail.com> - 2015-07-15 00:47 -0700
    Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 22:42 -0400
      Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-16 12:18 -0700
        Re: System log and format of log entries "Mike Gonta" <mikegonta@gmail.com> - 2015-07-16 15:50 -0400
          Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-16 13:24 -0700
            Re: System log and format of log entries "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-17 06:39 -0400
              Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-17 10:27 -0700
                Re: System log and format of log entries "Benjamin David Lunt" <zfysz@fysnet.net> - 2015-07-21 16:38 -0700
  Re: System log and format of log entries "James Harris" <james.harris.1@gmail.com> - 2015-07-15 15:15 +0100

csiph-web