大网数据广告活动
Windows排障命令

refsutil leak

· 52CE 我爱测

Reference article for the refsutil leak tool, which detects and diagnoses storage leaks, revealing their location and size to optimize storage usage on a specified Resilient File System (ReFS) volume in Windows.

The refsutil leak command assists administrators in detecting and diagnosing storage leaks, which occur when storage space is consumed inefficiently or unnecessarily. When the specified Resilient File System (ReFS) volume is scanned, this command identifies the location and size of leaks, helping to optimize storage usage and maintain system performance.

Syntax

refsutil leak <drive> [/a] [/x] [/v] [/d] [/q] [/t <count>] [/s <file>]

Parameters

Parameter Description
<drive> Specifies the drive letter in the format E: or the path to the volume mount point.
/a If leak detection discovers corruption, this parameter attempts to fix it and rerun the leak detection. With this parameter enabled, leak detection restarts once for each corrupted directory found on the volume.
/x Operates with an exclusive lock on the volume. Without this parameter, leak detection creates a snapshot of the volume for processing.
/v Enables verbose output, providing more detailed information.
/d Only performs a diagnosis. Leaks are reported to standard output (stdout) but isn't fixed.
/q Queries the required space for the leak analysis operation.
/t <count> Specifies how many CPU threads to use for leak detection. Utilizing more threads speeds up the process on a multi-core CPU. If set to 0, it runs the detection in a single thread (not recommended). The default is 4 threads.
/s <file> Uses the specified <file> as a scratch buffer for the operation. The <file> must be able to grow to the size reported by the /q parameter. If this parameter is omitted, a scratch buffer is created in the TEMP directory.

Note: Using the /d and /a parameters together will triage all found directory and file corruptions, but doesn't fix leaks.

Examples

To perform a leak analysis and generate a detailed report using F:\Scratch.tmp as the temporary file using 6 CPU threads, run this command:

refsutil leak D: /a /t 6 /s F:\Scratch.tmp

To perform a leak analysis and display detailed output using 5 CPU threads, run this command:

refsutil leak D: /a /d /v /t 5

To check the amount of space needed for a leak analysis on the D: drive, run this command:

refsutil leak D: /q

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 04/03/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。