ipmitool / test

0 stars 0 forks source link

field delimitors within fields in SEL output #84

Open AlexanderAmelkin opened 7 years ago

AlexanderAmelkin commented 7 years ago

Reported by: Jon Wilson Original Ticket: ipmitool/bugs/489

Output from "ipmitool sel list" or "ipmitool sel elist" uses pipes or commas for field separation.

Data in the output may contain pipes. For instance:

3b | 05/25/2017 | 16:57:51 | Memory #0x02 | Uncorrectable ECC (UnCorrectable ECC | DIMMB4) | Asserted

or

10 | 05/01/2017 | 16:39:09 | Processor #0x09 | IERR (CPU 2 | APIC ID 35 ) | Asserted

Anything that parses this data by spltting on "|" will miscount the number of fields.

A workaround for the above data is to use CSV format. But this is fragile. Commas can also occur within fields.

Perhaps CSV output should surround field data with quotes, if the field contains a comma?

AlexanderAmelkin commented 7 years ago

Additional workaround: Use the "-v" verbose output format

Original comment by: Jon Wilson