Support Subsystem
The SupportSubsystem enables tools that you can use to diagnose problems in a ThingWorx environment. You can use this subsystem to configure the running of stack traces and heap dumps in your environment. In ThingWorx 9.0.11, 9.1.6, and 9.2.2 and later, the Support Subsystem is enabled by default, and can not be stopped or disabled.
This subsystem replaces the PTC Support Tools extension, which is no longer supported.
Services
Support Subsystem-Specific Services
Description
DeleteStacktraceFiles
Deletes all files in the SupportRepository that have the same format of the stack trace files that Support Subsystem generates. You can use this service to remove unnecessary previous stack trace files so that new stack traces can be taken.
DisableHeapDumps
Sets the Enable Heap Dumps checkbox in the Watchdog Settings configuration table to false. When Enable Heap Dumps is set to false, the DumpHeap and DumpHeapAndAllThreads services cannot execute.
DumpAllThreads
Collects stack traces of all threads on the platform that execute the service. In a cluster environment, only the platform that receives the request will collect a stack trace. Once the stack trace is collected, a file is generated in the SupportRepository, which is named stacktrace_<platform-id>where <platform-id> is the platform ID in that platform’s platform-settings.json file. If the service is called again on the same platform, a new stack trace is collected and appended to the end of the existing file. DumpAllThreads will not run if there is less than 5% hard disk space in the SupportRepository.
DumpHeap
Collects a heap dump on the platform that executes the service. If the Enable Heap Dumps checkbox in the Watchdog Settings configuration is set to false (which is the default) or the EnableHeapDumps service is not called, no heap dump is taken.
In a cluster environment, only the platform that receives the service call will collect the heap dump. Once the heap dump is collected, a file is generated in the SupportRepository, which is named heapdump_<platform-id>_<timestamp>.hprof where <platform-id> is the platform ID assigned to that platform in its platform-settings.json file and <timestamp> is the current system time in milliseconds. DumpHeap generates a new heap dump file every time this service is called. DumpHeap will not run if there is less than 5% hard disk space in the SupportRepository.
The mechanism used to dump the heap from a running platform relies on certain mechanics of the JVM that may not exist or be supported by every JVM. If a heap dump cannot be performed by the JVM, an error message is shown.
DumpHeapAndAllThreads
Performs the DumpHeap and DumpAllThreads services in a single service call. The result is a heap dump file with a unique timestamp and additional stack trace information in any existing stack trace files on the platform that invoked the service. If no stack trace files exist, they will be created. If the Enable Heap Dumps configuration checkbox is set to false, this service will not perform heap dumps or stack traces.
EnableHeapDumps
Sets the Enable Heap Dumps checkbox in the Watchdog Settings configuration table to true. The default value is false.
When enabled, DumpHeap and DumpHeapAndAllThreads can be called any number of times.
GetRepositoryFreePercent
Returns a NUMBER, which indicates the percentage of usable disk space in the SupportRepository. This service is used by other services to determine whether or not heap dumps and stack traces should continue to be taken or if there is not enough remaining disk space.
GetSupportFileLinks
Returns an infotable containing information about all heap dumps and stack traces, including links to download the generated files from the repository. This service functions exactly like GetFileListingWithLinks where the provided name mask retrieves every heap dump and stack trace file.
GetWatchdogInterval
Retrieves the Watchdog Interval configuration value, which is an INTEGER base type of 1 or more seconds.
SetWatchdogInterval
Changes the Watchdog Interval configuration value in the Watchdog Settings configuration table. This configuration value changes the interval of stack traces taken when DiagnosticWatchdog is running. The interval value can be an INTEGER base type of 1 or more seconds.
StartDiagnosticWatchdog
Begins a background process on every platform in the cluster. The process continuously generates stack traces for each platform at a given interval. The file is generated in the SupportRepository and is named watchdog-stacktrace_<platform-id> where <platform-id> is the platform ID assigned to that platform in its platform-settings.json file. The DiagnosticWatchdog runs on every platform or none of the platforms.
You can set the stack trace interval in seconds in the Watchdog Interval field or by using the SetWatchdogInterval service.
The StartDiagnosticWatchdog service also generates a runstacktrace file in the SupportRepository. DiagnosticWatchdog collects stack traces as long as that file exists. If that file is renamed or removed, DiagnosticWatchdog will remain idle. If the runstacktrace file is reintroduced while DiagnosticWatchdog is enabled, then stack traces will resume at their set interval. The runstacktrace file is deleted when DiagnosticWatchdog is disabled. Also, DiagnosticWatchdog will not collect heap dumps or stack traces if there is less than 5% hard disk space remaining in SupportRepository.
If a platform or cluster will not start up and the Support Subsystem is inaccessible, you can force the enablement of DiagnosticWatchdog when the platform starts or when the first platform to enter the cluster starts. To do that, create the SupportRepository directory in the ThingworxStorage/repositories directory if it does not already exist. Then, create a new file named runstacktrace with no extension and no contents necessary. And, start the platform. The platform should detect the file, will automatically set the Enable Watchdog checkbox to true and run DiagnosticWatchdog.
* 
In ThingWorx 9.0.10, 9.1.5, and 9.2.1 and earlier, you can enable DiagnosticWatchdog by setting the Enable Watchdog checkbox in the Watchdog Settings configuration table to true.
StopDiagnosticWatchdog
Sets the Enable Watchdog checkbox to false in the Watchdog Settings configuration table. If this setting is false, DiagnosticWatchdog is shut down, which stops all automated stack trace collection. It also removes the runwatchdog file. It does not delete any existing heap dump or stack trace files.
CreateRunStackTraceFile
Creates the runstacktrace file in the Support Subsystem file repository.
* 
This service is available in ThingWorx 9.0.11, 9.1.6, and 9.2.2 and later.
RemoveRunStackTraceFile
Removes the runstacktrace file in the Support Subsystem file repository.
* 
This service is available in ThingWorx 9.0.11, 9.1.6, and 9.2.2 and later.
Configuration
Watchdog Settings
Base Type
Default
Notes
Enable Watchdog
BOOLEAN
true
By default, it is enabled.
* 
In ThingWorx 9.0.10, 9.1.5, and 9.2.1 and earlier, this setting is false by default.
Watchdog Interval
INTEGER
30
The interval value can be set to one or more seconds.
Enable Heap Dumps
BOOLEAN
false
By default, it is disabled.
Was this helpful?