CDC

Pre-requisites

PowerShell 4.0 and above

.NET 4.0 and above

Media FrameWork 5.0 and above

PowerShell Execution policy set to RemoteSigned/Unrestricted/ByPass

Task Scheduler should be enabled for the creation of tasks to be executed when triggers are defined.

Administrator privileges

Note:

  • It is recommended to use a Network location for saving logs in case of PVS devices and VMs with low disk space, when logs need to run for longer. We should keep logging minimal and short for PVS devices, and collect Network traces from Switches instead. To prevent crashes, CDC monitors health of the device during log collection, and stops logging automatically when the below conditions stay the same for average of 5 minutes:

– CPU usage is above 95%

– Memory usage is above 95%

– Disk space is less than 2 GB (if local disks are used)

  • Running CDC.exe from a UNC Path ( Network location ) is currently not supported.


Compatibility

Client OS – Windows 8.1 and above

Server OS – Windows Server 2012 R2 and above

Usage

  1. Download CDC.zip file and extract it
  2. Double-click “CDC.exe” to open the GUI
  3. The GUI will start and provides the below three options to choose a configuration to start
image001.png
Config file
This option lets you import a pre-defined configuration file that selects the tools to start, including their configuration and allows you to quickly start tracing
PowerShell Command
Use this option if you are familiar about the core parameters and switches that you can use to start the tool. For more information on the parameters and its usage refer to the section “List of Parameters” in this document.
Configure Manually
Use this option if you want to manually configure which tools to start and customize the configuration for the respective tool. E.g. if you wish to start Wireshark and want to have 4 files to be run in a ring-circular mode and define size of each file.
4. Next page is “Select Logging Tools” which will list down the tools to select from
image003.png
5. On the next page “Set Parameters” you can customize the tool that you have selected to its advanced properties. E.g. in the below screenshot we can see that Netsh is saving logs to three files and by default, it uses ring-circular mode to write to files. Each file size limit is set to 500MB (hard-coded) each. We can also see CDF tool is selected with the parameters set to run in “Mode – Multi-Sequential” and “Size – No limit”. No Limit – unlimited.
image005.png
6. In the “Additional Logs” page, you can may check the boxes “MSInfo32” or “OS Info” to collect additional information like msinfo32.exe output and OS information like GPresult output, current running services, processes and output of DNS cache, netstat etc.
image007.png
7. You can also collect additional event logs apart from Application and System event logs which are already included when you check “OSInfo”, you can select additional event logs to choose from the drop-down box “Event Logs” after you check it.

There is another option “Logs from a Folder Path” wherein, you can add a folder path e.g. “c:tempadditional logs” which will be compressed as a ZIP file and added to the final logs directory in case if you want logs to be collected from a different directory to be included.
image007.png
8. On the next page “Set Triggers to Start” is an important option when you wish to start the tools on a specific trigger condition or on a specific Event ID that is triggered.
This option helps you dynamically enable tracing if you don’t wish to start tracing right now, this flexibility allows administrators and engineers to define certain triggers and leave the box to start tracing on its own and stop on its own as well (more information in the next page).

We have three options that tell us more about it.

  • Start Manually: This option allows you to start the tools manually from the page “Save & Start Logging” by clicking on “Start Logging” button
  • Start on Event: This option lets you define a trigger on an Event ID to be started. E.g. Log on “Application”, Source “Citrix Desktop Service” and on “Event 1050”. As seen in the screenshot below.
  • Start on Condition: This option lets you define a trigger based on the outcome of a PowerShell script block which returns the final output in Boolean true or false.e.g. If you wish to start the tools in 5 hours from the current time, then you can write a custom script block to check that condition and start the script. As seen in the below screenshot. Click “Test” button to validate the condition and care should be taken to match the current condition as “false” and the future condition will return true which will trigger the script to start.
Please use this option only if you are familiar with PowerShell.
image011.png
9.Next page “Set Triggers to Stop” is similar to “Set Triggers to start” with the only difference is, you are setting triggers in this page to stop the tool. Follow similar instructions as mentioned in point # 8 to define your triggers, validate it before clicking next to make sure you have the correct triggers in place which can match the conditions in future time on the machine.
10. In this page “Save & Start Logging”, you will see the final PowerShell command pre-generated based on your choices and customization. This command shall be passed on and CDC.ps1 shall be called to process the request further.
Note: It is recommended to use a different logs location for PVS server to avoid completely filling up the write-cache disk.
image013.png
You can go back to previous page and modify the settings or else you can click on either of the two buttons.
Save Settings: This button will give an option to save the current configuration into a JSON formatted file. This option is useful if you wish to re-use the current configuration on other machines. Simply import it in the first page “Select Saved Settings”
Save Session: This button will save the current configuration state and it will also create the triggers for start conditions, so that the tools can start running if the triggers match the respective Event / Condition. If no triggers are defined, it will save the current state and you can start logging later. You can close and re-open the tool and the state will be preserved.
Start Logging: This button will start the tools and enable tracing.
11. Once you start logging, the page will now transition to a running state and you would see the text “Logging Started” appear if everything goes well. And you would also see the “Stop Logging” button appear.
image015.png
12. Once you click on “Stop Logging” button, the page would transition and show the directory where all the logs are saved and when you click on “Upload logs” it will open a web page to cis upload site where you can input the case number and upload the zip file.

image017.png

From this page, you can click on “Go to Folder” to visit the logs directory and you can verify if the all the files are saved there before you can upload the logs.
Finally, you can upload the logs by clicking the “Upload Logs” button, which will open a page to the https://cis.citrix.com to sign-in (assuming there are no browser restrictions and JavaScript is not blocked) to upload the log files.


Please refer to the CDC_Help.docx document inside the zip file on how to start and stop the tool along with detailed information on the different modes of usage


Troubleshooting

  • You can refer to the troubleshooting log file placed inside “<CDC_folder>BinTempoutput.txt” in case the tool fails to start due to an unexpected error. You can correct if it is a configuration error and re-run the tool.
  • If you think the script is not responding or you need to reset the configuration or stop an existing session then follow the steps below:
  1. Open an Admin PowerShell window
  2. Navigate to the path where the script is located
  3. From the root of the path run the following command
 .CDC.ps1 -Reset

Related:

  • No Related Posts

Leave a Reply