Hi Carol,

My comments on some items:

33) about sensor i2c target and lun adresses
Let me know if you need I re-send my patch proposal.


36) current mishandling of sensors or FRUs with the same Ids string:
I have not currently a complete patch for this issue.
My problem is how to add the optional argument (owner_id) to
an already variable list of arguments of an ipmitool command.
May be I could use the "-t target_address" already in use, but
I am not sure that it is a good idea.


35) timestamp issue
The timestamps that are concerned are:
- the Most recent Addition and Most recent Erase infos
  displayed by the "ipmitool sdr info" command
- the Last SEL addition info displayed by the "ipmitool
  pef status" command
- the Timestamps of SEL entries

If our interpretation of the IPMI spec is correct, and then
considering that all IPMI timestamps should be internally in
localtime, my patch proposal is as follows: 

diff -Naur ipmitool-1.8.9/lib/ipmi_pef.c
ipmitool_189_patch_timestamp/lib/ipmi_pef.c
--- ipmitool-1.8.9/lib/ipmi_pef.c       2007-02-22 09:38:56.000000000 +0100
+++ ipmitool_189_patch_timestamp/lib/ipmi_pef.c 2008-06-27
17:18:57.000000000 +0200
@@ -748,7 +748,7 @@
 #endif
        ts = (time_t)timei;
 
-       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&ts));
+       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", gmtime(&ts));
 
        ipmi_pef_print_str("Last SEL addition", tbuf);
        ipmi_pef_print_2xd("Last SEL record ID", rsp->data[5],
rsp->data[4]);
diff -Naur ipmitool-1.8.9/lib/ipmi_sdr.c
ipmitool_189_patch_timestamp/lib/ipmi_sdr.c
--- ipmitool-1.8.9/lib/ipmi_sdr.c       2007-03-06 23:15:37.000000000 +0100
+++ ipmitool_189_patch_timestamp/lib/ipmi_sdr.c 2008-06-30
14:11:02.000000000 +0200
@@ -3797,7 +3797,7 @@
        memset(tbuf, 0, 40);
        if (stamp)
                strftime(tbuf, sizeof (tbuf), "%m/%d/%Y %H:%M:%S",
-                        localtime(&s));
+                        gmtime(&s));
        return tbuf;
 }
 
diff -Naur ipmitool-1.8.9/lib/ipmi_sel.c
ipmitool_189_patch_timestamp/lib/ipmi_sel.c
--- ipmitool-1.8.9/lib/ipmi_sel.c       2007-03-06 23:15:37.000000000 +0100
+++ ipmitool_189_patch_timestamp/lib/ipmi_sel.c 2008-06-30
14:19:09.000000000 +0200
@@ -221,7 +221,7 @@
        static char tbuf[40];
        time_t s = (time_t)stamp;
        memset(tbuf, 0, 40);
-       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&s));
+       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", gmtime(&s));
        return tbuf;
 }
 
@@ -230,7 +230,7 @@
 {
        static char tbuf[11];
        time_t s = (time_t)stamp;
-       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y", localtime(&s));
+       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y", gmtime(&s));
        return tbuf;
 }
 
@@ -239,7 +239,7 @@
 {
        static char tbuf[9];
        time_t s = (time_t)stamp;
-       strftime(tbuf, sizeof(tbuf), "%H:%M:%S", localtime(&s));
+       strftime(tbuf, sizeof(tbuf), "%H:%M:%S", gmtime(&s));
        return tbuf;
 }
 
@@ -1640,7 +1640,7 @@
        time = (time_t)timei;
 #endif
 
-       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&time));
+       strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", gmtime(&time));
        printf("%s\n", tbuf);
 
        return 0;
@@ -1685,6 +1685,28 @@
                }
        }
 
+       {
+               //modify UTC time to local time expressed in number of
seconds from 1/1/70 0:0:0 1970 GMT
+               struct tm         *  tm_tmp;
+               int     gt_year,gt_yday,gt_hour,lt_year,lt_yday,lt_hour;
+               int     delta_hour;
+               tm_tmp=gmtime(&t);
+               gt_year=tm_tmp->tm_year;
+               gt_yday=tm_tmp->tm_yday;
+               gt_hour=tm_tmp->tm_hour;
+               tm_tmp=localtime(&t);
+               lt_year=tm_tmp->tm_year;
+               lt_yday=tm_tmp->tm_yday;
+               lt_hour=tm_tmp->tm_hour;
+               delta_hour=lt_hour - gt_hour;
+               if ( (lt_year > gt_year) || ((lt_year == gt_year) &&
(lt_yday > gt_yday)) )
+                       delta_hour += 24;
+               if ( (lt_year < gt_year) || ((lt_year == gt_year) &&
(lt_yday < gt_yday)) )
+                       delta_hour -= 24;
+
+               t += (delta_hour * 60 * 60);
+       }
+
        timei = (uint32_t)t;
        req.msg.data = (uint8_t *)&timei;
        req.msg.data_len = 4; 


Bernard Manjou


> -----Message d'origine-----
> De : Carol Hebert [mailto:[EMAIL PROTECTED] 
> Envoyé : 20 June 2008 01:59
> À : ipmitool-devel@lists.sourceforge.net
> Cc : [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Objet : ipmitool 1.8.10 - Fifth/final patch batch
> 
> 
> Hi,
> 
> Here's the fifth and final batch of outstanding 
> patches/issues.  Unless someone objects, review comments and 
> feedback should be sent within 2 weeks.
> 
> Thank you very much for your help,  :-)
> 
> Carol
> 
> ----------------------------------
> 
> 
> 
> 32)  On 5/28/08 Bernard Manjou sent in a third patch to fix 
> an issue with the printing of discrete sensor states:
> 
> http://sourceforge.net/mailarchive/forum.php?forum_name=ipmito
> ol-devel&max_rows=25&style=nested&viewmonth=200805&viewday=28
> 
> My comments:  It looks to me like the current code in
> ipmi_sdr_print_discrete_state_mini() and 
> ipmi_sdr_print_discrete_state() is wrong and that Bernard's 
> patch will allow these print routines to address state bits 8-14.
> 
> 
> 33)  On June 10th (last week), Bernard Manjou sent a patch to 
> modify sensor, sel, and sdr routines to include sensor i2c 
> target and lun addresses. 
> 
> <sorry, I can't get web pointers at the moment>
> 
> My Comments:  Will follow up with comments soon.
> 
> 
> 34) On 6/11/08, Lukasz Michalski sent in a pointer to a patch 
> he'd like to have included:
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=19905
> 60&group_id=95200&atid=610552
> 
> 
> My Comments:  Will follow up with comments soon.
> 
> 
> 35) On 6/12/08, Bernard Manjou brings up the timestamp issue 
> discussed by he and several other folks over the past year 
> (see #25 in my 6/16/08 third patch batch email).
> 
> My Comments:  Bernard, I agree with your interpretation of 
> the spec and think you could be pointing to the cause of the 
> timestamp issues.  Would you mind posting a patch for this so 
> the folks who have been seeing timestamp issues can see if it 
> fixes things for them?  Thanks for all your patches and help. :-) 
> 
> 
> 36)  On 6/17/08, Bernard Manjou discussed needing to add an 
> optional argument to ipmitool and a matching parameter to
> ipmi_sdr_find_sdr_byid() to match the i2c slave address as 
> well as the sensor ID string and resolve an issue with 
> current mishandling of sensors with the same sensor IDs.
> 
> My comments:  Bernard, I think what you're proposing sounds 
> like a good idea.  Would you have some time to put a patch 
> together and send it in to us?  Thanks again. :-)
> 
> 
> 37.)  On 6/19/08, Steffen Grunewald sent in a patch to the 
> debian/rules
> file.   We'll also need to update the debian/changelog to bump the
> version after committing the patch.
> 
> My comments:  Sounds good to me!
> 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to