TMM Core Files

Overview

Core files are typically produced to diagnose chronic issues such as memory leaks, high CPU usage, and intermittent networking issues. The Debug sidecar’s core-tmm utility creates a diagnostic core file of the Cloud-Native Network Functions (CNFs) Traffic Management Microkernel (TMM) process. Once obtained, the core file can be provided to F5 support for further analysis.

This document describes how to create, and obtain a TMM core file in an OpenShift orchestration environment.

Requirements

Ensure you have:

Procedures

Generate the core file

Use the following steps to connect to the TMM Proxy Pod’s debug container, and generate a core file using the core-tmm command.

  1. Connect to the debug container:

    oc exec -it deploy/f5-tmm -c debug -n <project> -- bash
    

    In this example, the debug sidecar is in the cnf-gateway Project:

    oc exec -it deploy/f5-tmm -c debug -n cnf-gateway -- bash
    
  2. Generate the TMM core file:

    _images/spk_info.png Note: It may be helpful to note the time the core is being generated.

    core-tmm
    
    Floating point exception (core dumped)
    

Obtain the core file

Use these steps to launch an oc debug Pod, and Secure Copy (SCP) the TMM core file to a remote server.

  1. Obtain the name of the worker node that the TMM Pod is running on:

    oc get pods -n <project> -o wide | grep f5-tmm
    

    In this example, the TMM Pod named f5-tmm-7cd5b85bdb-7c4b7 is in the cnf-gateway Project, and is running on worker-2.ocp.f5.com:

    oc get pods -n cnf-gateway -o wide | grep f5-tmm
    
    NAME                        READY   STATUS    IP             NODE          
    f5-tmm-7cd5b85bdb-7c4b7     3/3     Running   10.244.2.107   worker-2.ocp.f5.com
    f5-tmm-7cd5b85bdb-b7rgb     3/3     Running   10.244.3.90    worker-1.ocp.f5.com
    
  2. Launch the oc debug Pod:

    _images/spk_info.png Note: The oc debug command creates a new Pod, and opens a command shell.

    oc debug node/<node name>
    

    In this example, we create a copy of the worker-2.ocp.f5.com Pod:

    oc debug node/worker-2.ocp.f5.com
    
    Creating debug namespace/openshift-debug-node-m7f8z ...
    Starting pod/worker-2ocpf5com-debug ...
    To use host binaries, run `chroot /host`
    Pod IP: 10.144.2.107
    If you don't see a command prompt, try pressing enter.
    
  3. To use the host binaries run:

    chroot /host 
    
  4. List the core files written to the journal:

    coredumpctl list
    

    In this example, note the TIME the file was created and the PID (process ID):

    TIME                         PID      UID   GID SIG COREFILE   EXE
    Mon 2021-01-01 12:00:00 UTC  590091   0     0   8   truncated  /usr/bin/tmm64.no_pgo
    
  5. Change into the core file directory, and list the core file on the file system:

    cd /var/lib/systemd/coredump; ls -1
    

    In this example, the PID 590091 from the previous step identifies the bottom core file:

    cd /var/lib/systemd/coredump; ls -1
    'core.tmm\x2e0.0.951073d306bb4465a3d784e29da99995.1004628.1617028629000000.lz4'
    'core.tmm\x2e0.0.951073d306bb4465a3d784e29da99995.2442391.1617019721000000.lz4'
    'core.tmm\x2e0.0.951073d306bb4465a3d784e29da99995.590091.1617133773000000.lz4'
    
  6. Create an MD5 signature of the core file to ensure file integrity:

    md5sum <core_file> > <file_name>
    

    In this example, an MD5 signature is obtained of the TMM core file, and saved to a file named tmm_core.md5:

    md5sum core.tmm\x2e0.0.951073d306bb4465a3d784e29da99995.590091.1617133773000000.lz4 \
    > tmm_core.md5
    
  7. Secure Copy (SCP) the TMM core file to the remote server:

    scp <tmm_core> <username>@<ip address>:<directory> 
    

    In this example, the file is copied using the ocadmin user, to the remote server with IP address 10.244.4.10:

    scp core.tmm\x2e0.0.951073d306bb4465a3d784e29da99995.590091.1617133773000000.lz4 \
    ocadmin@10.244.4.10:/var/tmp/
    
  8. Secure Copy (SCP) the MD5 file to the remote server:

    scp <md5_file> <username>@<ip address>:<directory> 
    

    For example:

    scp tmm_core.md5 ocadmin@10.244.4.10:/var/tmp/
    

Feedback

Provide feedback to improve this document by emailing cnfdocs@f5.com.