Help Center/ Migration Center/ MgC Agent Usage Guide/ FAQs/ How Do I Obtain Run Logs of the MgC Agent (Formerly Edge) on Linux?
Updated on 2025-07-18 GMT+08:00

How Do I Obtain Run Logs of the MgC Agent (Formerly Edge) on Linux?

Viewing the Log Files of the MgC Agent

  1. Go to the log directory in the MgC Agent installation directory. This directory contains the log files generated during the running of the MgC Agent.

    cd /opt/cloud/MgC-Agent/logs/agent-server

  2. Run the vi command to view a specific log file.

    vi <xxx.log>
    Replace <xxx.log> with the log file you want to view. The following table lists the names and descriptions of different types of log files.

    Log File

    Description

    debug.log

    Debug logs recording the running of the MgC Agent.

    error.log

    Error logs generated when the MgC Agent is running.

    operation.log

    Operation logs recording interactions between users and the interface.

    plugins.log

    IoTDA logs, which record the messages exchanged between the MgC Agent and MgC through IoTDA.

    run.log

    All logs generated during the running of the MgC Agent.

    warn.log

    Alarm logs generated during the running of the MgC Agent.

    user.log

    User audit logs.

  3. If the log file has been archived, perform the following steps to view the archived log file:

    1. Run the cd command to access the directory of the archived log file. Replace <xxx/> with the actual directory of the archived log file.
      cd <xxx/>
    2. Run the gunzip command to decompress the archived log file.
      For example, if the name of an archived log file is archived_log.gz, you can run the following command.
      gunzip archived_log.gz

Viewing Logs of the Big Data Plug-in

  1. Go to the log directory in the MgC Agent installation directory. This directory contains various log files generated during the running of the big data plug-in.

    cd /opt/cloud/MgC-Agent/tools/plugins/collectors/bigdata-migration/logs

  2. Run the vi command to view a specific log file.

    vi <xxx.log>
    Replace <xxx.log> with the log file you want to view. The following table lists the names and descriptions of different types of log files.

    Log File

    Description

    debug.log

    Debug logs generated during the running of the big data plug-in.

    error.log

    Error logs generated during the running of the big data plug-in.

    run.log

    All logs generated during the running of the big data plug-in.

    warn.log

    Alarm logs generated during the running of the big data plug-in.

    rda_run.log

    Recording the plug-in startup command.

    api.log/user.log

    Deprecated. No content is recorded.

  3. If the log file has been archived, perform the following steps to view the archived log file:

    1. Run the cd command to access the directory of the archived log file. Replace <xxx/> with the actual directory of the archived log file.
      cd <xxx/>
    2. Run the gunzip command to decompress the archived log file.
      For example, if the name of an archived log file is archived_log.gz, you can run the following command.
      gunzip archived_log.gz