>> Maybe the
headers could instead be enabled with some new option instead of by
default? 

>> Anyone have an opinion to add?

I'd say they should not be included when '-c' is specified, in which case the 
output is most likely used by external scripts of some kind.


François Isabelle | Software Designer | Kontron Canada | T 450 437 5682 |F 450 
437 8053 | E francois.isabe...@ca.kontron.com
 


-----Message d'origine-----
De : Carol Hebert [mailto:c...@us.ibm.com] 
Envoyé : 6 mai 2009 03:11
À : Jan Safranek
Cc : ipmitool-devel@lists.sourceforge.net
Objet : Re: [Ipmitool-devel] [PATCH 1/3] Add header to 'sensor list' output.

Hi Jan,

This is a great idea.  :-)  However, like you, I too have some concerns
that adding headers by default could break existing scripts.  Maybe the
headers could instead be enabled with some new option instead of by
default? 

Anyone have an opinion to add?

My $.02, :-)

Carol

On Tue, 2009-03-31 at 13:01 +0200, Jan Safranek wrote:
> Output of 'sensor list' provides raw output without no explanation what the
> values mean. This patch adds header to the output, which gives at least a
> clue, what each column mean.
> 
> There is no way, how to disable the header output, which can confuse existing
> scripts - should there be an option to disable the header?
> ---
> 
>  lib/ipmi_sensor.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/ipmi_sensor.c b/lib/ipmi_sensor.c
> index 7e7615a..9d11f5a 100644
> --- a/lib/ipmi_sensor.c
> +++ b/lib/ipmi_sensor.c
> @@ -569,6 +569,7 @@ ipmi_sensor_list(struct ipmi_intf *intf)
>       struct sdr_get_rs *header;
>       struct ipmi_sdr_iterator *itr;
>       int rc = 0;
> +     int row = 0;
> 
>       lprintf(LOG_DEBUG, "Querying SDR for sensor list");
> 
> @@ -588,6 +589,13 @@ ipmi_sensor_list(struct ipmi_intf *intf)
>                       continue;
>               }
> 
> +             if (!verbose && row == 0) {
> +                     printf("SENSOR           | VALUE      | UNITS      "
> +                             "| STATE | LO NOREC  | LO CRIT   | LO NOCRIT "
> +                             "| UP NOCRIT | UP CRIT   | UP NOREC\n");
> +             }
> +             row++;
> +
>               switch (header->type) {
>               case SDR_RECORD_TYPE_FULL_SENSOR:
>                       r = ipmi_sensor_print_full(intf,
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Ipmitool-devel mailing list
> Ipmitool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ipmitool-devel


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to