Red Hat Enterprise Linux Server 5 Operating System Available MegaBytes Swap Space 监视器
该监视器检查可用交换空间的数量。如果收到监视器发出的警报,则必须采取措施以将系统恢复到操作状态。
不正常状态表示可用交换空间使用率当前为高。环境可能引起此情况:
进程占用过多的物理内存资源。
写入一个临时的文件系统。
计算机上同时运行的应用程序太多。
应用程序可能在一段时间内泄漏内存。
关闭或取消一个或多个应用程序、后台程序或进程。在“状态”视图下执行 "top" 命令或 "Top 10 CPU Processes" 任务。这将提供按 CPU 使用率排序的进程列表,如按默认排序,则仅显示最占用 CPU 资源的进程及其相关的 PID(进程 ID)。利用由 "top" 命令产生的结果,识别有问题或不必要的进程及其 PID 号。利用进程的 PID 来运行 "kill" 命令。例如,如果进程的 PID 号是 4510,则运行命令 "kill 4510"。
添加额外的交换空间。使用 mkfile 来为交换区域创建文件。创建一个大小为 1GB 的交换文件:dd if=/dev/zero of=/swapfile bs=1k count=1048576。 发布命令使其成为交换文件:mkswap /swapfile。发布命令来激活交换文件:swapon /swapfile。你可以运行 'free' 命令来查看所有可用交换空间。
向计算机添加更多的物理内存。
您可查看在“状态”视图下运行“内存信息”后的可用内存。
VMStat 提供上次重新启动后平均的详细内存分析。您可在“状态”视图下运行 VMStat 任务。
Target | Microsoft.Linux.RHEL.5.OperatingSystem | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Unix.WSMan.Performance.Average.Threshold.MonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Linux.RHEL.5.OperatingSystem.AvailableMBytesSwap.Monitor" Accessibility="Public" Target="Microsoft.Linux.RHEL.5.OperatingSystem" TypeID="Unix!Microsoft.Unix.WSMan.Performance.Average.Threshold.MonitorType" Enabled="true" ParentMonitorID="SystemHealth!System.Health.PerformanceState">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.Linux.RHEL.5.OperatingSystem.AvailableMBytesSwap.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Value$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Error" MonitorTypeStateID="UnderThreshold" ID="UnderThreshold"/>
<OperationalState HealthState="Success" MonitorTypeStateID="OverThreshold" ID="OverThreshold"/>
</OperationalStates>
<Configuration>
<TargetSystem>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_MemoryStatisticalInformation?__cimnamespace=root/scx</Uri>
<Filter/>
<SplitItems>true</SplitItems>
<Interval>300</Interval>
<ObjectName>Swap Space</ObjectName>
<CounterName>Available MBytes</CounterName>
<InstanceName/>
<Value>$Data///*[local-name()="AvailableSwap"]$</Value>
<Threshold>2.5</Threshold>
<NumSamples>3</NumSamples>
</Configuration>
</UnitMonitor>