Contact Support

Customers who viewed this article also viewed

banner icon

Identify Changes in NetScaler build files with

File Integrity Monitoring

Learn More Watch Video
CTX286630 {{tooltipText}}

Citrix Data Collection Tool - CDC

Objective

Citrix Data Collection Tool


The Citrix Data Collection Tool aka. CDC tool is intended to help automate data collection process and to provide ease of access. This tool has a UI version which is simple and user friendly to start and stop tools, abstracting the complexity and logic to enable and disable tools with additional configuration. The tool is a collection of complex written code to make it simple for end users, customers and engineers. Its unique and is entirely built to make the data collection process simple and much powerful. It also helps you collect OS information and environment information for better contextual information and to easily co-relate the troubleshooting dataset.

CDC helps you collect data from the below tools efficiently and you can provide additional customization to it:
  • CDF
  • Wireshark ( Needs to be installed on the machine separately )
  • Process monitor
  • Netsh ( Built-in tool for collect network trace on Windows machines )
  • Workspace logs
  • Storefront logs
  • Process dump
  • Perfmon
  • WPR
  • Screenshots
  • Kerberos logging

The tool also has built-in features like:
  • Import existing configuration file
  • Run a well known PowerShell command to start the tool
  • Start the tools manually
  • Triggers ( Start and stop data collection based on an Event or a PowerShell script outcome )
  • Copy additional folders to the log directory
  • Automatic compression of the collected logs
  • Upload logs directly to "cis.citrix.com"


 

Release v1.2 notes

  • Fixed bugs to make the product better.
  • Added Download Manager for downloading third-party tools, refer to the help document located inside the root folder for more information.
  • Added the "Finish" button to quickly move on and start logging.
  • Added the "Restart Logging" button to collect repeated datasets.



Release v1.1 notes

  • CDC stops logging automatically if one of the conditions become true:
    • CPU or Memory hits above 95% OR Disk space falls below 2GB of free space
    • Note, free disk space checking is currently not supported for UNC paths
  • Process monitor automatic log deletion if the log size reaches above 1GB only when triggers are defined. This is useful when process monitor tracing is enabled with triggers ( Start/Stop conditions/Events ). If triggers are not defined, there is no limit to procmon trace files.
  • Fixed a bug where Netsh chained capture files were not getting deleted.
  • UI enhancements & help documentation

 


    Instructions

     

    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
     
    image.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:\temp\additional 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>\Bin\Temp\output.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
    ​​
    • If the GUI Window is stuck for too long on "Validating Settings" page, you may check the below to see if it helps
      • Run "Get-ExecutionPolicy -Scope MachinePolicy" and verify if it is set to either "AllSigned/RemoteSigned". If this is the case, you cannot override PowerShell execution policies as it is set at machine level. 
      • Manually Execute the CDC Script once and if it prompts to allow the script for execution, PRESS the letter "A" to make sure the Citrix certificate is trusted and future executions are allowed and it does stop to prompt each time. You can run the below command from the root directory of CDC from an Admin PowerShell command to verify if the issue is due to certificate not trusted.
           .\CDC.ps1 -Reset
    Screenshot_3.png
     
     
     
     
     

    Additional Resources

    For any feedback/queries/problems send an email to supporttools@citrix.com

    Authors of the tool:
    • Rahul Deshmukh
    • Chintu Sinha

    Disclaimer

    This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.