mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
Output format changes
This commit is contained in:
parent
81ae330e9b
commit
45a0fa0324
@ -337,7 +337,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf * intf,
|
|||||||
memset(sval, 0, sizeof(sval));
|
memset(sval, 0, sizeof(sval));
|
||||||
if (validread) {
|
if (validread) {
|
||||||
i += snprintf(sval, sizeof(sval), "%.*f %s",
|
i += snprintf(sval, sizeof(sval), "%.*f %s",
|
||||||
(val==(int)val) ? 0 : 3, val,
|
(val==(int)val) ? 0 : 2, val,
|
||||||
do_unit ? unitstr : "");
|
do_unit ? unitstr : "");
|
||||||
} else {
|
} else {
|
||||||
i += snprintf(sval, sizeof(sval), "no reading ");
|
i += snprintf(sval, sizeof(sval), "no reading ");
|
||||||
@ -549,6 +549,17 @@ ipmi_sdr_print_sensor_compact(struct ipmi_intf * intf,
|
|||||||
else
|
else
|
||||||
state = csv_output ? "Not Present" : "Not Present ";
|
state = csv_output ? "Not Present" : "Not Present ";
|
||||||
break;
|
break;
|
||||||
|
case 0x10: /* event logging disabled */
|
||||||
|
if (rsp->data[2] & 0x10)
|
||||||
|
state = csv_output ? "Log Full" : "Log Full ";
|
||||||
|
else if (rsp->data[2] & 0x04)
|
||||||
|
state = csv_output ? "Log Clear" : "Log Clear ";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(temp, "0x%02x", rsp->data[2]);
|
||||||
|
state = temp;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0x21: /* slot/connector */
|
case 0x21: /* slot/connector */
|
||||||
if (rsp->data[2] & 0x04)
|
if (rsp->data[2] & 0x04)
|
||||||
state = csv_output ? "Installed" : "Installed ";
|
state = csv_output ? "Installed" : "Installed ";
|
||||||
@ -611,7 +622,7 @@ ipmi_sdr_print_sensor_eventonly(struct ipmi_intf * intf,
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char * state = "Not Readable ";
|
char * state = "Event-Only ";
|
||||||
if (csv_output)
|
if (csv_output)
|
||||||
printf("%s,%s,ns", sensor->id_code ? desc : NULL, state);
|
printf("%s,%s,ns", sensor->id_code ? desc : NULL, state);
|
||||||
else
|
else
|
||||||
@ -709,7 +720,7 @@ ipmi_sdr_print_fru_locator(struct ipmi_intf * intf,
|
|||||||
else
|
else
|
||||||
printf("%-16s | ", fru->id_code ? desc : NULL);
|
printf("%-16s | ", fru->id_code ? desc : NULL);
|
||||||
|
|
||||||
printf("%s FRU @%02Xh %x.%x",
|
printf("%s FRU @%02Xh %02x.%x",
|
||||||
(fru->logical) ? "Log" : "Phy",
|
(fru->logical) ? "Log" : "Phy",
|
||||||
fru->device_id,
|
fru->device_id,
|
||||||
fru->entity.id, fru->entity.instance);
|
fru->entity.id, fru->entity.instance);
|
||||||
|
@ -202,7 +202,7 @@ ipmi_sel_get_std_entry(struct ipmi_intf * intf, unsigned short * next_id)
|
|||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode) {
|
if (!rsp || rsp->ccode) {
|
||||||
printf("Error%x in Get SEL Entry %x Command\n",
|
printf("Error %x in Get SEL Entry %x Command\n",
|
||||||
rsp ? rsp->ccode : 0, *next_id);
|
rsp ? rsp->ccode : 0, *next_id);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -250,9 +250,9 @@ ipmi_sel_print_std_entry(struct sel_event_record * evt)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (csv_output)
|
if (csv_output)
|
||||||
printf("%d,", evt->record_id);
|
printf("%x,", evt->record_id);
|
||||||
else
|
else
|
||||||
printf("%4d | ", evt->record_id);
|
printf("%4x | ", evt->record_id);
|
||||||
|
|
||||||
if (evt->timestamp < 0x20000000) {
|
if (evt->timestamp < 0x20000000) {
|
||||||
printf("Pre-Init Time-stamp");
|
printf("Pre-Init Time-stamp");
|
||||||
@ -330,7 +330,7 @@ ipmi_sel_list_entries(struct ipmi_intf * intf)
|
|||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode) {
|
if (!rsp || rsp->ccode) {
|
||||||
printf("Error%x in Get SEL Info command\n",
|
printf("Error: %x from Get SEL Info command\n",
|
||||||
rsp ? rsp->ccode : 0);
|
rsp ? rsp->ccode : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -348,7 +348,7 @@ ipmi_sel_list_entries(struct ipmi_intf * intf)
|
|||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode) {
|
if (!rsp || rsp->ccode) {
|
||||||
printf("Error:%x unable to reserve SEL\n",
|
printf("Error: %x from Reserve SEL command\n",
|
||||||
rsp ? rsp->ccode : 0);
|
rsp ? rsp->ccode : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -462,7 +462,8 @@ ipmi_sel_delete(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode)
|
if (!rsp || rsp->ccode)
|
||||||
{
|
{
|
||||||
printf("Error:%x unable to delete entry %d\n", rsp ? rsp->ccode : 0, id);
|
if (!rsp) printf("No response\n");
|
||||||
|
printf("Error %x unable to delete entry %d\n", rsp ? rsp->ccode : 0, id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@ ipmi_send_platform_event(struct ipmi_intf * intf, int num)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("event to BMC\n");
|
printf(" event to BMC\n");
|
||||||
|
|
||||||
req.msg.netfn = IPMI_NETFN_SE;
|
req.msg.netfn = IPMI_NETFN_SE;
|
||||||
req.msg.cmd = 0x02;
|
req.msg.cmd = 0x02;
|
||||||
@ -317,7 +317,7 @@ int main(int argc, char ** argv)
|
|||||||
intf->pedantic = pedantic;
|
intf->pedantic = pedantic;
|
||||||
|
|
||||||
if (!strncmp(argv[optind], "help", 4)) {
|
if (!strncmp(argv[optind], "help", 4)) {
|
||||||
printf("Commands: chassis, fru, lan, sdr, sel\n");
|
printf("Commands: bmc, chaninfo, chassis, event, fru, lan, raw, sdr, sel, sensor, sol, userinfo\n");
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
else if (!strncmp(argv[optind], "event", 5)) {
|
else if (!strncmp(argv[optind], "event", 5)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user