Skip to main content
All CollectionsTroubleshooting and How-ToTroubleshooting
How to collect the Teramind Agent logs
How to collect the Teramind Agent logs
A
Written by Arick Disilva
Updated over 5 months ago

Sometimes, you might encounter an issue which couldn’t be solved following the instructions provided on this Troubleshooting section. In such a case, Teramind Support can help. To help the support team diagnose the issue, you can provide them with the Agent log. This article explains how you can collect the log and send it to our support team.

Windows Logging

Collecting Logs with the Latest TMDIAG Tool

First, you will need to download and unpack the TMDIAG tool. This tool is used to collect Teramind Agent logs, conduct diagnostics and debugging by our support team. You can use its log capture feature to collect and send the logs.

Download TMDIAG from https://static-www.teramind.co/download/tmdiag.zip and extract it (e.g., to c:\temp\tmdiag directory).

Open the elevated Windows Command Prompt (cmd.exe), to do so please open your start menu find cmd.exe, right click on it and then click on "Run as administrator" menu item. Once done, please change to the directory you have the tmdiag.exe tool extracted into (in our example the directory is c:\temp\tmdiag)

cd c:\temp\tmdiag

Then, run the following command on the command prompt. If Teramind Support has provided you an alternate command to run, please run that alternate command instead:

tmdiag reproduce issue diag

Keep the Windows Command Prompt window open while command is running. Reproduce the issue, and once you're done, switch back to the Command Prompt and hit any key.

The above command will generate a file named issue.zip in the folder where tmdiag.exe is located. Send the file to [email protected], or attach it with a support ticket, or share it over chat.

Collecting Logs using an alternate method for a longer duration

This option uses the same diagnostics tool as above but is better if the issue isn't easy reproduceable and if logging needs to be left on for an extended period or for logging to remain enabled after a reboot.

First, you will need to download and unpack the TMDIAG tool. This tool is used to collect Teramind Agent logs, conduct diagnostics and debugging by our support team. You can use its log capture feature to collect and send the logs.

Download TMDIAG from https://static-www.teramind.co/download/tmdiag.zip and extract it (E.g. to c:\temp\tmdiag directory).

Open the elevated Windows Command Prompt (cmd.exe), to do so please open your start menu find cmd.exe, right click on it and then click on "Run as administrator" menu item. Once done, please change to the directory you have the tmdiag.exe tool extracted into (in our example the directory is c:\temp\tmdiag)

cd c:\temp\tmdiag

Then, run the following commands on the command prompt:

tmdiag log agent on
tmdiag log svc on restart

This will turn logging on. Wait until the issue is reproduced.

Please wait after executing the above commands. Only proceed to the next step after the issue is reproduced. Otherwise, the log will not be able to capture information relevant to the issue.

When the issue occurs, start collecting the log with the following command:

tmdiag collect report

The above command will generate a file named report.zip in the folder where tmdiag.exe is located. Send the file to [email protected], or attach it with a support ticket, or share it over chat. You can then disable the logging with the following command:

tmdiag log all off

Restart the agent service with:

tmdiag service tsvchst restart

Collecting Logs with Video (TMDIAG+)

This method is the same as the first method on this page but uses a different diagnostics package (TMDIAG+) so an MP4 video recording will be generated as well. The MP4 recording can often provide important details needed to investigate and verify actions taken during the log capture.

First, you will need to download and unpack the TMDIAG+ tool. This tool is used to collect Teramind Agent logs, conduct diagnostics and debugging by our support team. You can use its log capture feature to collect and send the logs.

Download TMDIAG+ from https://static-www.teramind.co/download/tmdiag+.zip and extract it (e.g. to c:\temp\tmdiag+ directory).

Open the elevated Windows Command Prompt (cmd.exe). To do so, please open your Start menu, type cmd.exe, right click on it and then click on Run as administrator menu item. Once done, please change to the directory you have the tmdiag.exe tool extracted into. (in our example the directory is c:\temp\tmdiag+)

cd c:\temp\tmdiag+

Then, run the following command on the command prompt. If Teramind Support has provided you an alternate command to run, please run that alternate command instead:

tmdiag reproduce issue diag

Keep the Windows Command Prompt window open while command is running. Reproduce the issue, once you're done, switch back to and hit any key.

The above command will generate a file named issue.zip and issue.mp4 in the folder where tmdiag+.exe is located. Send the file to [email protected], or attach them with a support ticket, or share them over chat.

Collecting the Agent Connectivity Logs

Sometimes our support engineer might need to view your Agent Connectivity log to diagnose any connection issues. The logs are usually located in the following folder: C:\ProgramData\{4CEC2908-5CE4-48F0-A717-8FC833D8017A}\logs.

We will need you to Zip all the .log files in that folder and send it to us. To do so:

1. Open File Explorer from your Start menu:

explorer.png

2. Enter the folder path in the address bar:

programdata.png

3. Select all the files, right-click on them, and select Compress to ZIP file:

compress_conn.png

4. Email the file to [email protected], or attach it with a support ticket, or share it over chat.

macOS Logging

1. Open the file /usr/local/teramind/agent/etc/agent.conf in a text editor such as TextEdit.

2. Add the following line at the end:

log-settings=file:~/tmagent.log

You can optionally specify a different path for the log-settings parameter. For example, file:~/Library/Logs/tmagent.log.

3. Open the Terminal app and run one of the commands below to restart the agent service:

Revealed Agent:

sudo killall tmui; open '/usr/local/teramind/agent/bin/Teramind Agent.app'

Hidden Agent:

sudo killall "System Monitoring"; open "/usr/local/teramind/agent/bin/System Monitoring.app"

4. Navigate to the employee's Home folder (or the path you specified in the log-settings parameter). You will see individual log files named in this format: name_yyyy-mm-dd_hh-mm-ss.log. For example,

 
tmagent_2023-11-08_16-24-48.log​
tmagent_2023-11-08_17-10-22.log
...

5. Email the files to [email protected], or attach them with a support ticket, or share them over chat. You can use the following optional parameters:

Parameter

Example

log-file-size
Max individual log file size (MB/GB).

log-file-size=10MB

log-file-count
Number of log files allowed.

log-file-count=100

log-total-size
Max size of all log files in total (MB/GB).

log-total-size=1GB

Did this answer your question?