How to find out what exactly is not working
Last updated on
To facilitate finding out what exactly is not working all the components of UltraDefrag generate debugging output during execution. Whenever a component encounters an error, it outputs an error message with a detailed explanation of what exactly went wrong.
For instance, when a component fails to open a file to relocate its clusters, it shows the reason why the operation failed, whether because the file does not exist or because of some kind of lock, or because of something else. Looking at the debugging output you can always find out exactly why an operation failed.
There are 3 levels of the debugging output and two ways to access it: either using the DebugView program or using UltraDefrag built-in logging facilities.
Setting the debugging output level
You can control the amount of the debugging output which UltraDefrag produces by setting the debugging output level.
There are 3 levels available:
- Normal – produces a moderate amount of debugging output
- Detailed – produces more detailed debugging output
- Paranoid – produces a lot of debugging output
By default the normal level is set. We do recommend to set the level to detailed before a submission of a bug report to gather more detailed information about the problem.
To set the debugging output level open the main configuration file, search in it for the
dbgprint_level parameter and set it to
DETAILED, then save the changes:
dbgprint_level = "DETAILED"
dbgprint_level parameter sets the debugging output level for all the components of UltraDefrag, except custom batch scripts for the automatic defragmentation and the boot time interface. To set the level for the custom scripts use the
UD_DBGPRINT_LEVEL environment variable:
Capturing debugging output using DebugView
The DebugView program by Mark Russinovich is a tool which captures the debugging output from all the running applications and displays it in real time.
Follow this step by step guide to learn how to use it:
Download the latest version of DebugView from Microsoft’s website.
Download DebugView installation script.
Extract all the files from both downloaded ZIP archives to a single folder.
Right click the
install-debugview.cmdfile and select Run as administrator to install DebugView on your computer.
Double click the DebugView desktop icon to launch the program:
To capture UltraDefrag debugging output, select Capture > Capture Global Win32:
That’s about it! Now you can launch UltraDefrag and check its debugging output:
At any time you can save the captured debugging output to a file by clicking File > Save.
Using UltraDefrag built-in logging facilities
Alternatively, you can use UltraDefrag built-in logging facilities to access the debugging output. This is especially useful for the boot time interface as you cannot use DebugView to capture the debugging output produced by it.
By default, UltraDefrag components save their debugging output to the following files:
|Component||Default log file path|
|Automatic defragmentation component|
|Boot time interface|
|One-click defragmentation component|
So, for instance, after the boot time defragmentation you can open the
boot-time-defrag.log file to check what was going on during the disk processing.
Accessing the log file of the graphical interface is even easier. Just click Help > Debug > Open log at any time to open the log file:
On Windows 7 the automatic defragmentation component of UltraDefrag cannot save the debugging output to the log file when the task gets terminated before completion, for instance, when it runs out of time. To catch the debugging output in this case use the DebugView program mentioned above.
To change the log file path for the graphical interface and the one-click defragmentation component open the main configuration file, adjust the
log_file_path parameters there (one for the graphical interface and another for the one-click defragmentation component) and then save the changes. For instance, to set the path to
log_file_path = "C:\\logs\\ultradefrag.log"
Changing of the log file path for the automatic defragmentation component and the boot time interface is currently not supported, unless you use custom scripts. In the custom scripts you can turn the logging on and set the log file path at the same time using the
UD_LOG_FILE_PATH environment variable:
If logging to the specified file will fail, for instance because the file path is invalid, logging will be redirected to a file with the same name as specified, but located in the following folder: