<commit_before>
:orphan:

.. _support-compute:

====================
Troubleshoot Compute
====================

Common problems for Compute typically involve misconfigured
networking or credentials that are not sourced properly in the
environment. Also, most flat networking configurations do not
enable :command:`ping` or :command:`ssh` from a compute node
to the instances that run on that node. Another common problem
is trying to run 32-bit images on a 64-bit compute node.
This section shows you how to troubleshoot Compute.


.. _log-files-for-openstack-compute:

Compute service logging
~~~~~~~~~~~~~~~~~~~~~~~

Compute stores a log file for each service in
``/var/log/nova``. For example, ``nova-compute.log``
is the log for the ``nova-compute`` service. You can set the
following options to format log strings for the ``nova.log``
module in the ``nova.conf`` file:

* ``logging_context_format_string``

* ``logging_default_format_string``

If the log level is set to ``debug``, you can also specify
``logging_debug_format_suffix`` to append extra formatting.
For information about what variables are available for the
formatter see http://docs.python.org/library/logging.html#formatter-objects.

You have two logging options for OpenStack Compute based on
configuration settings. In ``nova.conf``, include the
``logfile`` option to enable logging. Alternatively you can set
``use_syslog = 1`` so that the nova daemon logs to syslog.


.. _section_compute-GuruMed-reports:

Guru Meditation reports
~~~~~~~~~~~~~~~~~~~~~~~

A Guru Meditation report is sent by the Compute service upon receipt of the
``SIGUSR2`` signal (``SIGUSR1`` before Mitaka). This report is a
general-purpose error report that includes details about the current state
of the service. The error report is sent to ``stderr``.

For example, if you redirect error output to ``nova-api-err.log``
using :command:`nova-api 2>/var/log/nova/nova-api-err.log`,
resulting in the process ID 8675, you can then run:

.. code-block:: console

   # kill -USR2 8675

This command triggers the Guru Meditation report to be printed to
``/var/log/nova/nova-api-err.log``.<commit_msg>Use hyperlink markup for the link reference title<commit_after>
:orphan:

.. _support-compute:

====================
Troubleshoot Compute
====================

Common problems for Compute typically involve misconfigured
networking or credentials that are not sourced properly in the
environment. Also, most flat networking configurations do not
enable :command:`ping` or :command:`ssh` from a compute node
to the instances that run on that node. Another common problem
is trying to run 32-bit images on a 64-bit compute node.
This section shows you how to troubleshoot Compute.


.. _log-files-for-openstack-compute:

Compute service logging
~~~~~~~~~~~~~~~~~~~~~~~

Compute stores a log file for each service in
``/var/log/nova``. For example, ``nova-compute.log``
is the log for the ``nova-compute`` service. You can set the
following options to format log strings for the ``nova.log``
module in the ``nova.conf`` file:

* ``logging_context_format_string``

* ``logging_default_format_string``

If the log level is set to ``debug``, you can also specify
``logging_debug_format_suffix`` to append extra formatting.
For information about what variables are available for the
formatter, see `Formatter Objects
<http://docs.python.org/library/logging.html#formatter-objects>`_.

You have two logging options for OpenStack Compute based on
configuration settings. In ``nova.conf``, include the
``logfile`` option to enable logging. Alternatively you can set
``use_syslog = 1`` so that the nova daemon logs to syslog.


.. _section_compute-GuruMed-reports:

Guru Meditation reports
~~~~~~~~~~~~~~~~~~~~~~~

A Guru Meditation report is sent by the Compute service upon receipt of the
``SIGUSR2`` signal (``SIGUSR1`` before Mitaka). This report is a
general-purpose error report that includes details about the current state
of the service. The error report is sent to ``stderr``.

For example, if you redirect error output to ``nova-api-err.log``
using :command:`nova-api 2>/var/log/nova/nova-api-err.log`,
resulting in the process ID 8675, you can then run:

.. code-block:: console

   # kill -USR2 8675

This command triggers the Guru Meditation report to be printed to
``/var/log/nova/nova-api-err.log``.
{'fraction_non_alphanumeric': 0.12264150943396226, 'fraction_numerical': 0.007823285780027611, 'mean_word_length': 4.874324324324324, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5702881', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1192, 'n_words': 532}