Product Documentation

Tracing On

Feb 26, 2018

Overview

Collecting logs and reproducing issues slow down the diagnostics and degrade the user experience. This release provides the Tracing On feature to ease such efforts. Tracing is enabled for the Linux VDA by default.

Configuration

The ctxlogd daemon and the setlog utility are now included in the Linux VDA release package. By default, the ctxlogd daemon starts after you install and configure the Linux VDA. 

ctxlogd daemon

All the other services that are traced depend on the ctxlogd daemon. You can stop the ctxlogd daemon if you do not want to keep the Linux VDA traced.

setlog utility

Tracing On is configured using the setlog utility, which is under the /opt/Citrix/VDA/bin/ path. Only the root user has the privilege to run it. You can use the GUI or run commands to view and change the configurations. Run the following command for help with the setlog utility:

Command Copy

$ setlog help

Values

By default, Log Output Path is set to /var/log/xdl/hdx.log, Max Log Size is set to 200 MB, and you can save up to two old log files under Log Output Path

View the current setlog values:

Command Copy

$ setlog values 

log_path (Log Output Path) = /var/log/xdl/hdx.log

log_size (Max Log Size (MiB)) = 200

log_count (Max Old Log Files) = 2

View or set a single setlog value:

Command Copy

$ setlog value <name> [<value>]

For example:

Command Copy

$ setlog value log_size 100  

Levels

By default, the log level is set to Warnings

View the log levels set for different components:

Command Copy

$ setlog levels  

You can set all log levels (including Disable, Inherited, Verbose, Information, Warnings, Errors, and Fatal Errors) by using the following command:

Command Copy

$ setlog level <class> [<level>]  

The <class> variable specifies one component of the Linux VDA. To cover all components, set it to all:

Command Copy

$ setlog level all error 

Output Copy

Setting log class ALL to ERROR. 

Flags

By default, the flags are set as follows:

Command Copy

$ setlog flags

DATE = true

TIME = true

NAME = true

PID = true

TID = false

SID = true

UID = false

GID = false

CLASS = false

LEVEL = false

FUNC = true

FILE = false

View the current flags:

Command Copy

$ setlog flags

View or set a single log flag:

Command Copy

$ setlog flag <flag> [<state>]

Restore Defaults

Revert all levels, flags, and values to the default settings:

Command Copy

$ setlog default

Important

The ctxlogd service is configured using the /var/xdl/.ctxlog file, which only root users can create. Other users do not have write permission to this file. Citrix recommends that root users not give write permission to other users. Failure to comply can cause the arbitrary or malicious configuration to ctxlogd, which can affect server performance and therefore the user experience.

Troubleshooting

The ctxlogd daemon fails and you cannot restart the ctxlogd service when the /var/xdl/.ctxlog file is missing (for example, accidentally deleted).

/var/log/messages: 

Error Copy

Apr 1 02:28:21 RH72 citrix-ctxlogd[17881]: Failed to open logging configuration file.

Apr 1 02:28:21 RH72 systemd: ctxlogd.service: main process exited, code=exited, status=1/FAILURE

Apr 1 02:28:21 RH72 systemd: Unit ctxlogd.service entered failed state.

Apr 1 02:28:21 RH72 systemd: ctxlogd.service failed.

To solve this issue, run setlog as a root user to recreate the /var/xdl/.ctxlog file. Then restart the ctxlogd service on which other services depend.