• Home
  • Deploy
  • Dynatrace OneAgent
  • Installation and operation
  • OneAgent on Linux
  • Installation
  • OneAgent files and disk space requirements on Linux

OneAgent files and disk space requirements on Linux

This page provides information about the OneAgent directory structure and disk space requirements for OneAgent full-stack installation and updates. Note that exact values may vary based on OneAgent version.

Full-stack and Infrastructure Monitoring mode

The same disk space requirements apply to both Full-stack and Infrastructure monitoring modes.

OneAgent directories and their sizes

Linux (x86)Linux (ppcle)Linux (s390)Default directoryCan be modified?
Size of installation~1 GB410 MB145 MB/opt/dynatrace/oneagentYes 1
Persistent configuration~5 MB~5 MB~5 MB/var/lib/dynatrace/oneagent/agent/configNo
Temporary files, runtime configuration200 MB200 MB200 MB/var/lib/dynatrace/oneagent/agent/runtimeNo
Logs1 GB1 GB1 GB/var/log/dynatrace/oneagent 2Yes 3
Crash reports, memory dumps3 GB3 GB3 GB/var/lib/dynatrace/oneagent/datastorageYes 4
Additional space required for updates1.9 GB728 MB226 MBSee Space required for updates
Total7.1 GB5.3 GB4.6 GB
1

Use the INSTALL_PATH installation parameter.

2

For OneAgent version 1.201 and earlier, the default location for log files is /opt/dynatrace/oneagent/log.

3

Use the LOG_PATH installation parameter.

4

Use the DATA_STORAGE installation parameter.

For a complete list of files and directories added to your system by OneAgent, see OneAgent security on Linux.

OneAgent files aging mechanism

OneAgent in full-stack monitoring mode uses a built-in aging mechanism to ensure that the OneAgent files, including log files and runtime data, are kept within a reasonable size. For more information, see OneAgent file aging mechanism.

Dynatrace Managed self-monitoring

OneAgent self-monitoring for Dynatrace Managed requires 4.8 GB of disk space on Linux. For more information, see the directory structure of Dynatrace Managed.

Space required for updates

When calculating the space required for updates, we take into account the installer file size and the size of the installation process, that is the space required to deploy OneAgent files.

Linux (x86)Linux (ppcle)Linux (s390)
Installer file size175 MB63 MB27 MB
Installation process size1.54 GB600 MB226 MB

Additional space required for updates is calculated using the 10% safety margin:

(installer file size + size of the installation process) * 1.1

Size of the installation process

The size of the installation process is calculated as follows:

3 * installer file size + size of the installation

The installer size must be multiplied by 3 to account for:

  • Downloaded installer file (/var/lib/dynatrace/oneagent)
  • Archive, which is separated from the installer script (/opt/dynatrace/oneagent)
  • Unpacked external TAR (/opt/dynatrace/oneagent)

In terms of space requirements, there's no real difference between manual installation of the new version (when an older version is already installed), automatic update, and updates that are triggered by restarting the OneAgent container. In all these cases, the installation process is performed exactly the same way. What differs is the method through which the update is triggered.

OneAgent SDK troubleshooting

Initialization and logging

If the SDK stub encounters issues loading or initializing the OneAgent module (particularly if onesdk_initialize or onesdk_initalize_2 returns an error code), enable logging for the SDK stub to diagnose the problem.

Use one of these options to enable logging:

  • Set the DT_LOGLEVELSDK={level} environment variable (the easiest option).
  • Call the onesdk_stub_set_logging_level(ONESDK_LOGGING_LEVEL_{LEVEL}) function.
  • If your program passes command line arguments to the SDK (onesdk_stub_process_cmdline_args), use the --dt_loglevelsdk={level} command line argument.

Whichever option you choose, be sure to apply it before calling onesdk_initialize or onesdk_initalize_2.

By default, after logging is enabled, the stub's log output is directed to stderr. If you need an alternative method to process stub log messages, see the onesdk_stub_set_logging_callback function documentation.

If initialization fails, the most frequently encountered error code is ONESDK_ERROR_LOAD_AGENT (numerical code 2952658951, -1342308345 or 0xaffe0007, error message "Could not load agent.").

The two primary causes of this issue are:

  • Cause: OneAgent is not installed on the host where the program is executed.

    Solution: Install OneAgent and restart the program.

  • Cause: The program is initiated with a debugger, so OneAgent will not inject.

    Solution: Launch the program without the debugger. You can still attach the debugger later, after the program is running.

Post-initialization

After successfully initializing the SDK, you might still encounter issues, such as missing paths in the UI or unexpected error codes like ONESDK_INVALID_HANDLE. In such cases:

  • Check messages from the OneAgent logging callbacks. See the documentation for onesdk_agent_set_warning_callback and onesdk_agent_set_verbose_callback.

  • Examine the OneAgent log files.

    See the following pages for exact locations of log files:

    • OneAgent security on Windows
    • OneAgent security on Linux

    You can increase the OneAgent log level by setting the DT_LOGLEVELFILE={level} environment variable or passing the --dt_loglevelfile={level} command line argument to the SDK.

    Alternatively, you can use DT_LOGLEVELCON={level} or --dt_loglevelcon={level} if you want to receive OneAgent log output via stderr.

  • In certain scenarios, onesdk_agent_get_current_state can provide further insights.