次の方法で共有


Win32_DefragAnalysis class

The Win32_DefragAnalysis class represents fragmentation values on a volume. An instance of the Win32_DefragAnalysis class is passed as an out parameter from the Win32_Volume methods DefragAnalysis and Defrag.

Windows XP: This class is not available.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

class Win32_DefragAnalysis
{
  uint64 AverageFileSize;
  real64 AverageFragmentsPerFile;
  real64 AverageFreeSpacePerExtent;
  uint64 ClusterSize;
  uint64 ExcessFolderFragments;
  uint32 FilePercentFragmentation;
  uint64 FragmentedFolders;
  uint64 FreeSpace;
  uint32 FreeSpacePercent;
  uint32 FreeSpacePercentFragmentation;
  uint64 LargestFreeSpaceExtent;
  uint32 MFTPercentInUse;
  uint64 MFTRecordCount;
  uint64 PageFileSize;
  uint64 TotalExcessFragments;
  uint64 TotalFiles;
  uint64 TotalFolders;
  uint64 TotalFragmentedFiles;
  uint64 TotalFreeSpaceExtents;
  uint64 TotalMFTFragments;
  uint64 TotalPageFileFragments;
  uint32 TotalPercentFragmentation;
  uint64 TotalUnmoveableFiles;
  uint64 UsedSpace;
  string VolumeName;
  uint64 VolumeSize;
};

Members

The Win32_DefragAnalysis class has these types of members:

Properties

The Win32_DefragAnalysis class has these properties.

AverageFileSize

Data type: uint64

Access type: Read-only

Average size of the files on a volume in bytes.

For more information about using uint64 values in scripts, see Scripting in WMI.

AverageFragmentsPerFile

Data type: real64

Access type: Read-only

Average number of fragments per file on a volume.

AverageFreeSpacePerExtent

Data type: real64

Access type: Read-only

Average size of free space extents on the volume.

Windows Server 2003: This property is not available.

ClusterSize

Data type: uint64

Access type: Read-only

Size, in bytes, of the file system allocation unit.

For more information about using uint64 values in scripts, see Scripting in WMI.

ExcessFolderFragments

Data type: uint64

Access type: Read-only

Number of excess folder fragments on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

FilePercentFragmentation

Data type: uint32

Access type: Read-only

Percentage of files on a volume that are fragmented.

FragmentedFolders

Data type: uint64

Access type: Read-only

Number of fragmented folders (subdirectories) on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

FreeSpace

Data type: uint64

Access type: Read-only

Number of bytes currently available for use on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

FreeSpacePercent

Data type: uint32

Access type: Read-only

Percent of volume that is free space.

FreeSpacePercentFragmentation

Data type: uint32

Access type: Read-only

This property is no longer available for use as of Windows Vista. Instead, use AverageFreeSpacePerExtent, LargestFreeSpaceExtent, and TotalFreeSpaceExtents to determine the free space fragmentation state of a volume.

Windows Server 2003: Percentage of free space on a volume that is fragmented. Be aware that this value may not be computed reliably and that the value may be very close to zero.

LargestFreeSpaceExtent

Data type: uint64

Access type: Read-only

Size of the largest free space extent on the volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

Windows Server 2003: This property is not available.

MFTPercentInUse

Data type: uint32

Access type: Read-only

Percentage of the Master File Table that is in use.

MFTRecordCount

Data type: uint64

Access type: Read-only

Number of records in the Master File Table on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

PageFileSize

Data type: uint64

Access type: Read-only

This property is no longer available for use as of Windows Vista. The value is always zero and there is no substitute property to use in this class.

For more information about using uint64 values in scripts, see Scripting in WMI.

Windows Server 2003: Size of a page file on a volume, in bytes. If there is no page file on a volume, this property is NULL.

TotalExcessFragments

Data type: uint64

Access type: Read-only

Number of excess file fragments on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalFiles

Data type: uint64

Access type: Read-only

Number of files on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalFolders

Data type: uint64

Access type: Read-only

Number of folders (subdirectories) on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalFragmentedFiles

Data type: uint64

Access type: Read-only

Number of fragmented files on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalFreeSpaceExtents

Data type: uint64

Access type: Read-only

Total number of free space extents on the volume.

Windows Server 2003: This property is not available.

TotalMFTFragments

Data type: uint64

Access type: Read-only

Number of Master File Table fragments on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalPageFileFragments

Data type: uint64

Access type: Read-only

This property is no longer available for use as of Windows Vista. The value is always zero and there is no substitute property to use in this class.

Windows Server 2003: Number of fragments for a page file. If there is no page file on a volume, this property is NULL.

For more information about using uint64 values in scripts, see Scripting in WMI.

TotalPercentFragmentation

Data type: uint32

Access type: Read-only

This property is no longer available for use as of Windows Vista. Instead, use FilePercentFragmentation to determine whether the volume should be defragmented. The AverageFreeSpacePerExtent, LargestFreeSpaceExtent, and TotalFreeSpaceExtents properties report the free space fragmentation state of the volume.

Windows Server 2003: Percent of the volume that is fragmented. Be aware that this field is computed as the average of FreeSpacePercentFragmentation and FilePercentFragmentation and may be inaccurate because FreeSpacePercentFragmentation is inaccurate.

TotalUnmoveableFiles

Data type: uint64

Access type: Read-only

Total number of immovable files on the volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

Windows Server 2003: This property is not available.

UsedSpace

Data type: uint64

Access type: Read-only

Number of bytes currently used on a volume.

For more information about using uint64 values in scripts, see Scripting in WMI.

VolumeName

Data type: string

Access type: Read-only

Name of the volume for which this report is generated. This property can be the drive letter, mount point, or the volume GUID name.

VolumeSize

Data type: uint64

Access type: Read-only

Total size of a volume in bytes.

For more information about using uint64 values in scripts, see Scripting in WMI.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2003
Namespace
Root\CIMV2
MOF
Vds.mof
DLL
Vdswmi.dll

See also

Storage Volume Provider

Win32_Volume

Win32_VolumeQuota

Win32_VolumeUserQuota

Win32_MountPoint