Question & Answer
Question
How do you enable debug logging for PowerVC without manually editing the config files?
Answer
PowerVC comes with some built-in commands. One of the commands allows for enabling and disabling debug logging, as well as checking the logging status. This document describes how to enable debug logging for PowerVC services, depending on the level of PowerVC you are running.
Enabling logging on PowerVC 2.1.x
Enabling logging on PowerVC 2.0.x-1.4.4
Enabling logging on PowerVC 1.4.3.x—1.3.x
Enabling logging on PowerVC 1.2.3.x (or older)
Note: In most cases, you should only do this under the direction of IBM support. Debug logging can impact product performance and function so it should be avoided in a production environment. If you are unsure about which component to debug, use the "general" option, which enables debug for all services. Remember to turn off the debug logging after you have collected your data.
PowerVC 2.1.x
PowerVC 2.1.x debugging logging is the same as 2.0.x, except that the --restart option is not required.
PowerVC 2.0.x-1.4.4
The latest versions of PowerVC use the powervc-log command to enable and disable debug logging. The restart option is not usually required1. What follows are examples for the compute service and also all services. The last section shows all of the supported services for this command.
To check the current of status of debug logging for all services:
[root@powervc ~]# /usr/bin/powervc-log general debug
To enable debug logging for all services use "general":
[root@powervc ~]# /usr/bin/powervc-log general debug --enable
To enable debug logging for compute:
[root@powervc ~]# /usr/bin/powervc-log compute debug --enable
To disable debug logging for compute:
[root@powervc ~]# /usr/bin/powervc-log compute debug --disable
To enable debug logging for storage:
[root@powervc ~]# /usr/bin/powervc-log storage debug --enable --restart
To disable debug logging for storage:
[root@powervc ~]# /usr/bin/powervc-log storage debug --disable --restart
general |
|
Manage log settings of all services |
compute |
Manage compute-related settings. |
|
event |
Manage event-related settings |
|
identity |
Manage identity-related settings |
|
image |
Manage image-related settings |
|
metering |
Manage metering-related settings |
|
metric |
Manage metric-related settings |
|
network |
Manage network-related settings |
|
self-service |
Manage self service portal |
|
storage 1 |
Manage storage-related settings |
|
ui-server |
Manage New GUI settings |
|
validation |
Manage validation related settings |
|
web |
Manage web related settings |
If the powervc-log command does not work, check the command syntax with powervc-log -h, or try the manual steps in the last section of this document.
Note 1: The --restart option is required when enabling debug logging for external modules, and the cinder (storage) service. (This option is not required in PowerVC 2.1.)
PowerVC 1.4.3.x—1.3.x
These versions of PowerVC use the powervc-config command to enable and disable debug logging. The --restart option is used to restart the affected services. What follows are examples for the compute service and also all services. The last section shows all of the supported services for this command.
To check the status of logging for compute or all you can run the following commands:
For Compute Service:
[root@powervc ~]# /usr/bin/powervc-config compute debug
compute: nova-MT_SN1: Debug logging is disabled
compute: nova-MT_SN2: Debug logging is disabled
compute: nova-MT_SN3: Debug logging is disabled
compute: nova: Debug logging is disabled
For All Services:
[root@powervc ~]# /usr/bin/powervc-config general debug
metering: Debug logging is disabled
identity: Debug logging is disabled
network: Debug logging is disabled
storage: cinder-22976bc4b4318811e6801ff758cccc68c5: Debug logging is disabled
storage: cinder-clv7k: Debug logging is disabled
storage: cinder: Debug logging is disabled
image: glance-api: Debug logging is disabled
image: glance-glare: Debug logging is disabled
image: glance-registry: Debug logging is disabled
self-service: Debug logging is disabled
compute: nova-MT_SN1: Debug logging is disabled
compute: nova-MT_SN2: Debug logging is disabled
compute: nova-MT_SN3: Debug logging is disabled
compute: nova: Debug logging is disabled
validation: Debug logging is disabled
Enable logging -- Example commands:
Enable for all components:
[root@powervc ~]# /usr/bin/powervc-config general debug --enable --restart
For the compute service only:
[root@powervc ~]# /usr/bin/powervc-config compute debug --enable --restart
To disable the logging on the compute service and restart:
[root@powervc ~]# /usr/bin/powervc-config compute debug --disable --restart
[root@powervc ~]# /usr/bin/powervc-config compute debug
compute: nova-MT_SN1: Debug logging is disabled
compute: nova-MT_SN2: Debug logging is disabled
compute: nova-MT_SN3: Debug logging is disabled
compute: nova: Debug logging is disabled
The following list of services support the method above. To enable logging on all use "general" else for specifics use service type name.
general |
Manage log settings of all services |
|
identity |
Manage identity-related settings |
|
image |
Manage image-related settings |
|
storage |
Manage storage-related settings |
|
network |
Manage network-related settings |
|
compute |
Manage compute-related settings |
|
metering |
Manage metering-related settings |
|
web |
Manage web related settings |
|
self-service |
Manage self service portal |
|
validation |
Manage validation related settings |
PowerVC 1.2.3.x (or older)
For PowerVC 1.2.3.x (or older), you must use a manual process to enable debug logging. As an example, IBM support may ask you to enable debug logging for OpenStack nova. Here's what to do:
- Use SSH to connect the PowerVC server.
- Edit the /etc/nova/nova.conf file to find the debug line and remove the comment (#) before it:
# Print debugging output (set logging level to DEBUG instead
# of default WARNING level). (boolean value)
debug=true
- Do the same for the line with the word verbose:
# Print more verbose output (set logging level to INFO instead
# of default WARNING level). (boolean value)
verbose=true
After changes to the conf files, you must stop and start PowerVC services for debug to begin. The following command works well:
/opt/ibm/powervc/bin/powervc-services stop
/opt/ibm/powervc/bin/powervc-services start
You would do the same procedure for each OpenStack component. Cinder, Glance, Keystone, etc.
Notes on enabling DEBUG logging for NovaLink:
Currently, to enable debug on the NovaLink LPARS you would need to manually ssh into each NovaLink system and enable debug. The example shown below is for Nova. Neutron and cinder can also be done in this manner, just change the path and .conf file to match the service.
1. ssh padmin@novalink_ip
2. sudo vi /etc/nova/nova.conf
3. Set debug = true and verbose = true under the [general] section.
4. On the PowerVC node, restart the NovaLink services using the following command:
All NovaLink systems:
powervc-services remote restart --node all
To restart a specific Novalink system, use the powervc-services remote list
command to find the node name, and then run:
powervc-services remote restart --node NODE_NAME
Was this topic helpful?
Document Information
More support for:
PowerVC Standard Edition
Software version:
1.3.0, 1.3.1, 1.2.3, 1.3.2, 1.3.3
Operating system(s):
Linux
Document number:
667547
Modified date:
29 November 2022
UID
nas8N1021641