I agree with Andy's suggestion, not all BIOS's time are correct. In fact, in 
many industrial applications, CMOS batteries are banned and BIOS time is never 
set.

________________________________
From: Andy Cress [mailto:andy.cr...@us.kontron.com]
Sent: Wednesday, March 02, 2011 11:39 AM
To: Jon Bamber; Jarrod B Johnson
Cc: ipmitool-devel@lists.sourceforge.net
Subject: Re: [Ipmitool-devel] Setting SEL Time using a string

Jon,

Thanks, I didn't notice the now option.
Using the RTC as the source seems messier to me.  And BIOS would not know about 
NTP anyway.
If you just added these two lines to either the ntp daemon config or to some 
init script, like rc.local, this should do it, regardless of what BIOS does.
   # ipmitool sel time set now
   # hwclock --systohc

Andy

From: Jon Bamber [mailto:jon_bam...@xyratex.com]
Sent: Wednesday, March 02, 2011 11:21 AM
To: Andy Cress; Jarrod B Johnson
Cc: ipmitool-devel@lists.sourceforge.net
Subject: RE: [Ipmitool-devel] Setting SEL Time using a string

Andy
  There is currently a feature that if you make the time string "now" it will 
take the system time which  I guess is what you refer to a sync function.
  You should also set the config of the ntp time daemon to update the hwclock 
as well.

  In our implementation the BIOS sets the SEL on start-up from the hardware RTC 
which maybe at UTC or local time depending on OS setup and so would want it 
consistent with the hardware clock time which does not hold a time zone offset. 
 So if UTC is used for the real clock time base then the "now" will then move 
the SEL time to the localtime.  Perhaps we should have a "utc" option?

  A further complication is that the command may be called from across the LAN 
or even across time-zones but it in this case it would be up to the user to 
make the choice in how what value is required in this case.

Cheers
Jon


From: Andy Cress [mailto:andy.cr...@us.kontron.com]
Sent: 02 March 2011 14:58
To: Jarrod B Johnson; Jon Bamber
Cc: ipmitool-devel@lists.sourceforge.net
Subject: RE: [Ipmitool-devel] Setting SEL Time using a string

Auto-correcting the SEL time in the app makes it look right, but masks the 
underlying issue if there is a time delta.
There are actually 3 times that need to be synchronized:

1)      OS System time - can be managed with NTP

2)      IPMI SEL time  - can be set with SetSELTime command

3)      HW RTC time  - can by sync'd with 'hwclock'
IMO, setting either 2 or 3 manually isn't the best approach, because it will 
almost always be off by a few seconds, or however long it takes to enter the 
next command.

I have created my own program to sync 2 and 3 with the OS System Time, which, 
if NTP is used, should keep it accurate.
However, setting the SEL time should be done sparingly, since IPMI firmware 
often doesn't react well to having its clock set backward, especially if some 
event or activity is in progress.   Once per day should be enough, IMO.

My recommendation for a general solution would be to add a 'sync' function, 
like:  'ipmitool sel time sync'.

Andy

From: Jarrod B Johnson [mailto:jbjoh...@us.ibm.com]
Sent: Tuesday, March 01, 2011 7:46 AM
To: Jon Bamber
Cc: ipmitool-devel@lists.sourceforge.net
Subject: Re: [Ipmitool-devel] Setting SEL Time using a string

Speaking of SEL time, ipmitool may want to consider an approach like I 
implemented in xCAT.

Frequently BMC time is wrong (either not set at all due to negligence or synced 
on POST to system hardware clock which might ambiguously be UTC or localtime 
depending on OS and config).  Therefore, when I go to read SEL and report time, 
I first query the current time and calculate the difference from client 
system's clock and BMC clock to apply as a corrective factor to all SEL 
timestamps.  I never notice an incorrect BMC clock after that.

-----"Jon Bamber" <jon_bam...@xyratex.com><mailto:jon_bam...@xyratex.com> 
wrote: -----
To: 
<ipmitool-devel@lists.sourceforge.net><mailto:ipmitool-devel@lists.sourceforge.net>
From: "Jon Bamber" <jon_bam...@xyratex.com><mailto:jon_bam...@xyratex.com>
Date: 03/01/2011 05:31AM
Subject: [Ipmitool-devel] Setting SEL Time using a string
Hi

There appears to be a bug in setting the BMC SEL time with a string in that it 
sets the time one hour before the string provided.
e.g.
ipmitool sel time set  "02/21/2011 10:12:34"
02/21/2011 9:12:34

I believe the cause is that struct tm is unitialised and so the daylight saving 
flag appears to be set so mktime reduces the time by one hour.
Placing on line 1889 before mktime() in  ipmi_sel_set_time of ipmi_sel.c
tm.tm_isdst = 0;

seems to cure this problem.
ipmitool sel time set  "02/21/2011 10:12:34"
02/21/2011 10:12:34


Cheers
Jon

______________________________________________________________________
This email may contain privileged or confidential information, which should 
only be used for the purpose for which it was sent by Xyratex. No further 
rights or licenses are granted to use such information. If you are not the 
intended recipient of this message, please notify the sender by return and 
delete it. You may not use, copy, disclose or rely on the information contained 
in it.

Internet email is susceptible to data corruption, interception and unauthorised 
amendment for which Xyratex does not accept liability. While we have taken 
reasonable precautions to ensure that this email is free of viruses, Xyratex 
does not accept liability for the presence of any computer viruses in this 
email, nor for any losses caused as a result of viruses.

Xyratex Technology Limited (03134912), Registered in England & Wales, 
Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.

The Xyratex group of companies also includes, Xyratex Ltd, registered in 
Bermuda, Xyratex International Inc, registered in California, Xyratex 
(Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd 
registered in The People's Republic of China and Xyratex Japan Limited 
registered in Japan.
______________________________________________________________________


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net<mailto:Ipmitool-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel


______________________________________________________________________

This email may contain privileged or confidential information, which should 
only be used for the purpose for which it was sent by Xyratex. No further 
rights or licenses are granted to use such information. If you are not the 
intended recipient of this message, please notify the sender by return and 
delete it. You may not use, copy, disclose or rely on the information contained 
in it.



Internet email is susceptible to data corruption, interception and unauthorised 
amendment for which Xyratex does not accept liability. While we have taken 
reasonable precautions to ensure that this email is free of viruses, Xyratex 
does not accept liability for the presence of any computer viruses in this 
email, nor for any losses caused as a result of viruses.



Xyratex Technology Limited (03134912), Registered in England & Wales, 
Registered Office, Langstone Road, Havant, Hampshire, PO9 1SA.



The Xyratex group of companies also includes, Xyratex Ltd, registered in 
Bermuda, Xyratex International Inc, registered in California, Xyratex 
(Malaysia) Sdn Bhd registered in Malaysia, Xyratex Technology (Wuxi) Co Ltd 
registered in The People's Republic of China and Xyratex Japan Limited 
registered in Japan.

______________________________________________________________________




------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to