Skip to contentSkip to conversation

Enabling OpenBMC Debug

DISCUSSION Andrew Geissler 4 participants 8 messages Feb 11, 2020 – Feb 26, 2020

lore
Share & tools
lore
#0 lore raw

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Andrew

#1 lore raw
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 6 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Thank you for the information.  I keep learning all the time.

These settings factor into service scenarios and also deployment readiness.  For example:
- I want to turn off debug.  For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when testing firmware image release candidates.  For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to make them aware of OpenBMC debug support.  Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC.  For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil

The obmcutil tool is a shell script, so folks can take just the pieces they need.  That is, don't be more granular at this time.

In summary, it seems like a good idea.  It seems like we should ask our service architects to weight in.  I'll go ask mine....

- Joseph

Quoted 2 lines

Andrew

#2 lore raw
Quoted 28 lines · Joseph Reynolds
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/'  /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 6 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Quoted 8 lines

Thank you for the information.  I keep learning all the time.

These settings factor into service scenarios and also deployment readiness.  For example:
- I want to turn off debug.  For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when testing firmware image release candidates.  For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to make them aware of OpenBMC debug support.  Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC.  For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil

The obmcutil tool is a shell script, so folks can take just the pieces they need.  That is, don't be more granular at this time.

Could we consider some sort of debug hooks directory (Like /etc/obmc-debug-hooks.d/) where applications could drop in their relevant scripts? Or is this going too far?

- Wiktor

Quoted 8 lines

In summary, it seems like a good idea.  It seems like we should ask our service architects to weight in.  I'll go ask mine....

- Joseph

Quoted 2 lines

Andrew

#3 lore raw
Quoted 42 lines · Wiktor Gołgowski
Quoted 35 lines · Joseph Reynolds
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 6 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Thank you for the information. I keep learning all the time.

These settings factor into service scenarios and also deployment readiness. For example:
- I want to turn off debug. For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when testing firmware image release candidates. For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to make them aware of OpenBMC debug support. Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC. For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil

Quoted 4 lines
Quoted 1 line

The obmcutil tool is a shell script, so folks can take just the pieces they need. That is, don't be more granular at this time.

Could we consider some sort of debug hooks directory (Like /etc/obmc-debug-hooks.d/) where applications could drop in their relevant scripts? Or is this going too far?

You can never go too far with debug :) I’m trying to think of what this would look like though? Can you offer an example? For most applications they just have a global “if verbose trace, log this extra data” type thing.

Quoted 10 lines

- Wiktor

Quoted 7 lines

In summary, it seems like a good idea. It seems like we should ask our service architects to weight in. I'll go ask mine....

- Joseph

Quoted 2 lines

Andrew

#4 lore raw
In reply to Joseph Reynolds

This is a really good set of information! I must say I think the obmcutil command is a good idea, for development purposes.

Quoted 21 lines · Joseph Reynolds
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 4 lines
Quoted 4 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

What about a REST API command tied to this? It could help when dealing with external to BMC problems.

Quoted 2 lines
Quoted 2 lines

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Sometimes we have to recreate issues that occur on a system, a rather unfortunate situation in and of itself. I'll have to counter with a question of my own. Do you think this would be good to enable during a recreate, and we don't risk flooding the useful info?

Quoted 10 lines

Thank you for the information.  I keep learning all the time.

These settings factor into service scenarios and also deployment readiness.  For example:
- I want to turn off debug.  For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when
testing firmware image release candidates.  For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to
make them aware of OpenBMC debug support.  Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC.  For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil

Quoted 9 lines

The obmcutil tool is a shell script, so folks can take just the pieces they need.  That is, don't be more granular at this time.

In summary, it seems like a good idea.  It seems like we should ask our service architects to weight in.  I'll go ask mine....

- Joseph

Quoted 2 lines

Andrew

Thanks,
Justin

#5 lore raw
Quoted 28 lines · Justin Thaler

This is a really good set of information! I must say I think the obmcutil command is a good idea, for development purposes.

Quoted 21 lines · Joseph Reynolds
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

What about a REST API command tied to this? It could help when dealing with external to BMC problems.

No more generic REST API’s :) But in my response to Joseph I did ponder whether we could get something added to Redfish for this. Enabling extra debug on a system seems like a fairly normal use case.

Quoted 4 lines
Quoted 3 lines
Quoted 3 lines

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Sometimes we have to recreate issues that occur on a system, a rather unfortunate situation in and of itself. I'll have to counter with a question of my own. Do you think this would be good to enable during a recreate, and we don't risk flooding the useful info?

Yes, ideally we don’t need the recreate but when we do, having the ability to enable extra debug without a lot of work could be quite useful.

Quoted 14 lines
Quoted 12 lines

Thank you for the information. I keep learning all the time.
These settings factor into service scenarios and also deployment readiness. For example:
- I want to turn off debug. For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when testing firmware image release candidates. For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to make them aware of OpenBMC debug support. Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC. For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil
The obmcutil tool is a shell script, so folks can take just the pieces they need. That is, don't be more granular at this time.
In summary, it seems like a good idea. It seems like we should ask our service architects to weight in. I'll go ask mine....
- Joseph

Quoted 2 lines

Andrew

Thanks,
Justin

#6 lore raw
In reply to Joseph Reynolds
Quoted 32 lines · Joseph Reynolds
Quoted 20 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

Quoted 6 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Quoted 6 lines

Thank you for the information. I keep learning all the time.

These settings factor into service scenarios and also deployment readiness. For example:
- I want to turn off debug. For example, I want a debug-off command.
- I would want a way to validate (or at least show) these settings when testing firmware image release candidates. For example, another obmcutil command "debug-show" which uses "grep -H" instead of "sed".
- I would want some documentation added the BMC administrator's guide to make them aware of OpenBMC debug support. Draft: The obmcutil command can control debug settings for a variety of the components running on the BMC. For more information, see https://github.com/openbmc/phosphor-state-manager/blob/master/obmcutil

This is interesting, I was not really thinking of these being used by our external service type teams. I was mostly thinking of this as a development only tool. Used early in bringup of new systems when lots of new bugs and issues are being discovered. Within our company, the rule is that the default software you ship, must generate and collect enough information to debug any failure. Asking a customer to turn on extra debug is frowned upon (but at times still needed). I do wonder if we could interest the DMTF in some sort of “DebugLevel” property on the Manager interface? It does make me think though that if were to formalize this behind an actual external interface, it would then make sense to formalize across OpenBMC how we enable different levels of debug. For example, a consistent —vebose/—debug option that is passed to applications on startup. Or a more consistent use of systemd-journald levels across applications.

Quoted 9 lines

The obmcutil tool is a shell script, so folks can take just the pieces they need. That is, don't be more granular at this time.

In summary, it seems like a good idea. It seems like we should ask our service architects to weight in. I'll go ask mine....

- Joseph

Quoted 2 lines

Andrew

#7 lore raw
In reply to Andrew Geissler
Quoted 13 lines · Andrew Geissler

I find myself running a lot of different commands to enable a variety of debug data on OpenBMC when debugging different issues (usually BIOS communication issues). I also end up giving these commands to a lot of people when recreating issues for me. Stuff like this:

# enable debug logs in journal
sed -i 's/info/debug/' /lib/systemd/journald.conf.d/journald-maxlevel-policy.conf
systemctl restart systemd-journald.service
Quoted 10 lines

# Enable BIOS communication service debug
sed -i 's/mboxd/mboxd -vv/' /lib/systemd/system/mboxd.service
sed -i 's/btbridged/btbridged --vv/' /lib/systemd/system/org.openbmc.HostIpmi.service sed -i 's/ipmid/ipmid -d 0xff/' /lib/systemd/system/phosphor-ipmi-host.service sed -i 's/0/1/' /etc/default/pldmd
systemctl daemon-reload
systemctl restart mboxd.service
systemctl restart org.openbmc.HostIpmi.service
systemctl restart phosphor-ipmi-host.service
systemctl restart pldmd.service

I put up a proposal to try and standardize our debug within OpenBMC up at https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/29684

That would make something like “obmcutil debugon” much easier in that it wouldn't have to know all the special debug incarnations per service.

Quoted 9 lines

I was contemplating wrapping the above stuff in a obmcutil command so instead of telling people to do all of the above (and dealing with situations when those commands change), I could say something like run "obmcutil debugon".

Any thoughts out there? Would finer granularity of the debug be useful? Are there other forms of debug people would like enabled?

Andrew