Schedule CDF Tracing through Task Scheduler

Schedule CDF Tracing through Task Scheduler

book

Article ID: CTX216634

calendar_today

Updated On:

Description

This article outlines the step by step procedure to set a Scheduled Task to start and Stop CDF Tracing based on a Trigger (Time, Event ID etc). The example shown in this article is based on Time trigger.


Instructions

Make sure you have the latest copy of CDFcontrol downloaded before attempting the procedure below. You can download CDFControl from:

http://support.citrix.com/article/CTX111961

1. Create a text file with the names of the machines (one machine per line) as below:

VDALIst.txt

Here it is named as VDAList.txt
2.
Create a custom .CTL file if required with a subset of required trace providers. If you are planning to take All module trace, just get the CTL file for VDA/DDC/Client. Eg:
DesktopVDATraceProviders

Here it is named as DesktopVDATraceProviders.ctl

Note: To create custom ctl file, launch CDFControl locally on the VDA/DDC/Client machine, select the necessary modules (Or all modules) as per the requirement, go to Tools > Create CTL file and save it with an appropriate name.

3. Open Task Scheduler and create a new task (Control Panel > Administrative Tools > Task Scheduler > Create Task)
General Tab
  • Type in a name for the task.
  • Verify the user account used to run the task has appropriate permissions on the remote machine and change the user account if required.
  • Select the "Run with highest privileges" check box
  • Select appropriate target OS in the Configure for drop down menu.
5. Select Actions tab and configure the path for CDFControl.exe and add arguments.
Actions Tab

Arguments needed:
-start -guids <FullPathof .ctl file> -machinelist <fullpathofTextfile>

Eg:
-start -guids c:\tools\CDFControl\DesktopVDATraceProviders.ctl -machinelist c:\tools\CDFControl\VDAList.txt

Click Ok.
Note: -machinelist is an optional parameter. Only if you are tracing multiple remote machines you will need this parameter. If you are tracing only local computer then you can drop this parameter. Additional parameters such as -mode and -MaxLog can also be added to manage the type of logging and the log file size.
-mode <Circular - 2, Sequential -1, MulSeq - 8>
-maxlog <Maximum log file size in MB>

6. Select appropriate conditions as per your requirement. The following is fine in my case.
Conditions Tab

7. Select appropriate options from the settings tab and click Ok.
Settings Tab

Similarly you will have to create another task to stop CDF control with a different Trigger time to stop the trace. The arguments needed for CDFControl would be:
-stop -machinelist <FullPathofTextFile>

Eg: -stop -machinelist C:\Tools\CDFControl\VDAlist.txt

When the CDF trace is started, you may not see the log files immediately. This is normal. When the task to stop CDFcontrol runs, you will see a new folder named CDFControl_Remote_Traces in the same folder as CDFControl.exe and it will contain the traces from the target machines.

Output

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Additional Information

For more information on Task Scheduler, please refer to:

https://technet.microsoft.com/en-us/library/cc749579(v=ws.11).aspx