Chapter 7. Troubleshooting

This section explains how to troubleshoot issues:

Checking the State of Services

The manager and agent services are controlled by the systemd system manager:

  • ppem is the manager service.

  • ppem-agent is the agent service.

To view the state of services, use the systemctl utility:

# systemctl status ppem
● ppem.service - PostgresPro Enterprise Manager
    Loaded: loaded (/lib/systemd/system/ppem.service; enabled; preset: enabled)
    Active: active (running) since Sat 2024-11-16 15:43:01 MSK; 48min ago
  Main PID: 53582 (ppem-manager)
    Tasks: 7 (limit: 3512)
    Memory: 226.9M
      CPU: 8.445s
    CGroup: /system.slice/ppem.service
            └─53582 /usr/sbin/ppem-manager -config /etc/ppem-manager.yml

The status output contains the following:

  • ppem.service is the name and description of the service.

    The dot indicator (●) uses colors to highlight the service state:

    • White is the neutral inactive or deactivating state.

    • Red is the failed or error state.

    • Green is the normal active, reloading or activating state.

  • Loaded is the service configuration state indicating that the configuration is uploaded to memory and that this is the normal state.

  • Active is the service running state, indicating that the service has successfully started and is currently operational.

    The start time and running duration are also displayed.

  • Main PID is the ID and name of the main process in the list of OS processes.

  • Tasks is the total number of processes and streams generated by the main process.

  • Memory is usage of memory.

  • CPU is usage of CPU time.

  • CGroup is the control group where service processes are placed.

  • After the main section, the last service messages will also be displayed.

When operating correctly, the manager and agent services are in the Active state.

Checking Message Logs

The manager and agent services can send each other service messages during operation. By default, the manager and agent use the standard output (stdout) for sending service logs and messages. Messages are captured by the systemd tools and can be viewed using journalctl:

# journalctl -u ppem
...

You can use the -f option to output incoming messages:

# journalctl -fu ppem
...

Configuring Verbosity for the Log

Logging can have different verbosity:

  • error is logging only errors.

  • warning is logging errors and warnings.

  • info is logging errors, warnings, and information messages.

    This level is used by default.

  • debug is logging errors, warnings, information messages, and debug messages.

You can configure logging in the ppem-manager.yml manager and ppem-agent.yml agent configuration files using the log.level configuration parameter.

Logging changes take effect after the service restart.