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 https://lists.sourceforge.net/lists/listinfo/ipmitool-devel
------------------------------------------------------------------------------ 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