// winioctl.h
typedef struct _FILESYSTEM_STATISTICS {
WORD FileSystemType;
WORD Version;
DWORD SizeOfCompleteStructure;
DWORD UserFileReads;
DWORD UserFileReadBytes;
DWORD UserDiskReads;
DWORD UserFileWrites;
DWORD UserFileWriteBytes;
DWORD UserDiskWrites;
DWORD MetaDataReads;
DWORD MetaDataReadBytes;
DWORD MetaDataDiskReads;
DWORD MetaDataWrites;
DWORD MetaDataWriteBytes;
DWORD MetaDataDiskWrites;
} FILESYSTEM_STATISTICS, *PFILESYSTEM_STATISTICS;
View the official Win32 API referenceNo description available.
Contains statistical information from the file system.
Tip Applications targeting Windows 10 can access additional statistics through FILESYSTEM_STATISTICS_EX.
FileSystemTypeThe type of file system.
This member can be one of the following values.
| Value | Meaning |
|---|---|
| FILESYSTEM_STATISTICS_TYPE_EXFAT 3 |
The file system is an exFAT file system. If this value is set, this structure is followed by an EXFAT_STATISTICS structure. Windows Vista, Windows Server 2003 and Windows XP: This value is not supported until Windows Vista with SP1. |
| FILESYSTEM_STATISTICS_TYPE_FAT 2 |
The file system is a FAT file system. If this value is set, this structure is followed by a FAT_STATISTICS structure. |
| FILESYSTEM_STATISTICS_TYPE_NTFS 1 |
The file system is the NTFS file system. If this value is set, this structure is followed by an NTFS_STATISTICS structure. |
VersionThis member is set to 1 (one).
SizeOfCompleteStructureThe size of this structure plus the size of the file system-specific structure that follows this structure, multiplied by the number of processors.
This value must be a multiple of 64. For example, if the size of FILESYSTEM_STATISTICS is 0x38, the size of NTFS_STATISTICS is 0xD8, and if there are 2 processors, the buffer allocated must be 0x280.
sizeof(FILESYSTEM_STATISTICS) = 0x38
sizeof(NTFS_STATISTICS) = 0xD8
Total Size = 0x110
size of the complete structure = 0x140 (which is the aligned length, a multiple of 64)
multiplied by 2 (the number of processors) = 0x280
UserFileReadsThe number of read operations on user files.
UserFileReadBytesThe number of bytes read from user files.
UserDiskReadsThe number of read operations on user files.
This value includes sub-read operations.
UserFileWritesThe number of write operations on user files.
UserFileWriteBytesThe number of bytes written to user files.
UserDiskWritesThe number of write operations on user files.
This value includes sub-write operations.
MetaDataReadsThe number of read operations on metadata files.
MetaDataReadBytesThe number of bytes read from metadata files.
MetaDataDiskReadsThe number of read operations on metadata files.
This value includes sub-read operations.
MetaDataWritesThe number of write operations on metadata files.
MetaDataWriteBytesThe number of bytes written to metadata files.
MetaDataDiskWritesThe number of write operations on metadata files.
This value includes sub-write operations.
There are two types of files: user and metadata. User files are available for the user. Metadata files are system files that contain information, which the file system uses for its internal organization.
The number of read and write operations measured is the number of paging operations.
FSCTL_FILESYSTEM_GET_STATISTICS