此监视器定期运行(默认为每周六凌晨 3 点),以检查所有逻辑驱动器的碎片等级。如果发现碎片等级超过阈值,则默认情况下此监视器的状态将变为“警告”,并将生成一个警报。有一项面向此监视器的恢复操作,名为“逻辑磁盘碎片整理”,它在默认情况下是被禁用的。如果启用此恢复操作,则状态发生更改后,会自动开始执行逻辑驱动器碎片整理任务。
此监视器定期运行(默认为每周六凌晨 3 点),以检查所有逻辑驱动器的碎片等级。如果发现碎片等级超过阈值,则默认情况下此监视器的状态将变为“警告”,并将生成一个警报。有一项面向此监视器的恢复操作,名为“逻辑磁盘碎片整理”,它在默认情况下是被禁用的。如果启用此恢复操作,则状态发生更改后,会自动开始执行逻辑驱动器碎片整理任务。
此监视器具有以下可重写参数,以及通常可用于所有监视器的内容:
Use OS Recommendation:此参数确定碎片等级检查是否将使用由操作系统确定的默认阈值。如果此参数设置为“False”,则将使用“File Percent Fragmentation Threshold”中的值。
File Percent Fragmentation Threshold:如果 "Use OS Recommendation" 设置为 "False",则将使用此值作为碎片等级的阈值。
开始时间:在一天中应运行碎片检查的具体时间 (HH:MM)。
Days Of Week mask:应运行碎片检查的某天或某几天。天的值为“星期日”(1)、“星期一”(2)、“星期二”(4)、“星期三”(8)、“星期四”(16)、“星期五”(32) 和“星期六”(64)。要指定多天,请将这些天的值加在一起。例如,对于“星期一”、“星期三”和“星期五”,指定 42 (2+8+32)。
创建新文件或者将数据添加到现有文件中时,文件系统会尝试尽可能连续地分配空间,以便可以尽快执行读取操作。随着时间的推移,在连续部分中分配空间的可能性逐渐变小,因此会在整个磁盘中将文件分段。文件在磁盘上分段越多,文件系统处理这些文件需要的时间就越长,因此可能会使整个系统变慢。
注意:对驱动器执行碎片整理操作可能会消耗大量资源,并且在执行时可能会减慢系统性能。最好在非繁忙时间对驱动器执行碎片整理。
如果驱动器碎片阈值合适,则可以通过以下其中一种方式对驱动器进行碎片整理来解决此问题:
远程: 可以使用逻辑磁盘碎片整理任务 来远程执行碎片整理过程。
本地:通过终端服务连接到服务器,或者在本地登录到服务器。在“我的电脑”下,打开需要执行碎片整理的逻辑磁盘的属性。在属性窗口中切换到“工具”选项卡,然后单击“开始进行碎片整理...”按钮。之后,按照“磁盘碎片整理程序”窗口中的说明分析磁盘或整理磁盘碎片。
此监视器不支持操作控制台中“运行状况资源管理器”窗口的按需“重新计算运行状况”功能。解决问题并关闭警报后,请手动重置监视器的状态,或者等待下一个计划的间隔,以便监视器自动重置。
Target | Microsoft.Windows.Server.2003.LogicalDisk | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.Server.2003.LogicalDisk.DefragAnalysis.Monitortype | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | System.PrivilegedMonitoringAccount |
<UnitMonitor ID="Microsoft.Windows.Server.2003.LogicalDisk.DefragAnalysis" RunAs="System!System.PrivilegedMonitoringAccount" Accessibility="Public" Enabled="false" Target="Microsoft.Windows.Server.2003.LogicalDisk" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.Server.2003.LogicalDisk.DefragAnalysis.Monitortype" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Server.2003.LogicalDisk.DefragAnalysis.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$ ($Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/Name$)</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='FilePercentFragmentation']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='OSRecommended']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="OverThreshold" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<SchedulerStart>03:00</SchedulerStart>
<SchedulerDaysOfWeekMask>64</SchedulerDaysOfWeekMask>
<FilePercentFragmentationThreshold>10</FilePercentFragmentationThreshold>
<UseOSRecommendation>true</UseOSRecommendation>
</Configuration>
</UnitMonitor>