home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / WindowsServerTrial / server.iso / sources / install.wim / 4 / Windows / PLA / Rules / Rules.System.CPU.xml < prev    next >
Extensible Markup Language  |  2006-10-01  |  9KB  |  149 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?Copyright (c) Microsoft Corporation. All rights reserved.?>
  3. <Rules>
  4.   <Group name="$(GroupSystem)" enabled="true">
  5.     <Rule name="$(RuleInterrupts)" enabled="true">
  6.       <Variable name="nicconfig" expression="' '"/>
  7.       <Variable name="processconfig" expression="' '"/>
  8.       <Variable name="highvalue" expression="' '"/>
  9.       <Variable name="numprocessors" expression="1"/>
  10.       <Step select="/Report/Section/Table[@name='processorInterruptCounters']/Item[Data[@name='instance']='_Total']" fatal="true">
  11.         <Variable name="totalinterrupt" expression="Data[@name='mean']"/>
  12.         <Exists>
  13.           <When expression="{totalinterrupt} > 1000">
  14.             <Variable name="numprocessors" expression="/Report/Section[@name='tracerptHeader']/Table[@name='client']/Item/Data[@name='processors']"/>
  15.           </When>
  16.         </Exists>
  17.       </Step>
  18.       <Step select="/Report/Section/Table[@name='processorInterruptCounters']/Item[Data[@name='instance']='_Total']" fatal="true">
  19.         <Variable name="averageinterrupts" expression="format-number({totalinterrupt} div {numprocessors},'0')"/>
  20.         <Exists>
  21.           <When tag="High Average Interrupt/Processor" expression="{averageinterrupts} >= 5000">
  22.             <Variable name="processconfig">$(LOC_IntProcs)</Variable>
  23.             <Variable name="numnics" expression="/Report/Section/Table[@name='events']/Item[Data[@name='event']='SystemConfig' and Data[@name='opcode']='NIC']/Data[@name='count']"/>
  24.             <Variable name="nicconfig">$(LOC_IntNics)</Variable>
  25.             <Variable name="internalruleindex" expression="{internalruleindex} + 1"/>
  26.             <Variable name="severitymsg">Information</Variable>
  27.             <Variable name="msgstring">$(LOC_IntHighValue)</Variable>
  28.             <Variable name="relatedperflink">$(PerformanceDiagnosis)</Variable>
  29.             <Warning tag="sysInterruptHighUp_18_{internalruleindex}" select="/Report/Section/Table[@name='processorCounters']/Item[Data[@name='counter'] = 'Interrupts/sec']/Data[@name='counter']" table="/Report/Section[@name='advice']/Table[@name='info']">
  30.               <Item>
  31.                 <Data name="severity" img="info" link="sysInterruptHighUp_18_{internalruleindex}" message="sysInterruptHighUp_18_{internalruleindex}" translate="value">{severitymsg}</Data>
  32.                 <Data name="warning" message="sysInterruptHighUp_18_{internalruleindex}">{msgstring}</Data>
  33.                 <Data name="related" url="http://go.microsoft.com/fwlink/?LinkID=70096">{relatedperflink}</Data>
  34.               </Item>
  35.             </Warning>
  36.           </When>
  37.         </Exists>
  38.       </Step>
  39.     </Rule>
  40.     <Rule name="$(RuleHideMultiCpu)" enabled="true">
  41.       <Step select="/Report/Section[@name='tracerptHeader']/Table[@name='client']/Item/Data[@name='processors']" fatal="true">
  42.         <Variable name="processor" expression="."/>
  43.         <Exists>
  44.           <When expression="{processor} = 1">
  45.             <Insert select="/Report/Section/Table[@name='processorInterruptCounters']">
  46.               <Attribute name="level" value="2"/>
  47.             </Insert>
  48.             <Insert select="/Report/Section/Table[@name='processorUserProcessorCounters']">
  49.               <Attribute name="level" value="2"/>
  50.             </Insert>
  51.           </When>
  52.         </Exists>
  53.       </Step>
  54.     </Rule>
  55.     <Rule name="$(RuleSingleImageCpu)" enabled="true">
  56.       <Step select="/Report/Section/Table[@name='imageStats']/Item" sortType="all">
  57.         <Variable name="cpuusage" expression="format-number(Data[@name='cpu'],'#,##0.0')"/>
  58.         <Variable name="processname" expression="Data[@name='image']"/>
  59.         <Variable name="processid" expression="Data[@name='pid']"/>
  60.         <Exists>
  61.           <When expression="{cpuusage} > 80 and '{processname}' != 'Idle'">
  62.             <Variable name="internalruleindex" expression="{internalruleindex} + 1"/>
  63.             <Variable name="severitymsg">Error</Variable>
  64.             <Variable name="msgstring">$(LOC_HSingleImageCPU)</Variable>
  65.             <Variable name="relatedperflink">$(PerformanceDiagnosis)</Variable>
  66.             <Warning tag="sysHighSingleImageCPU_21_{internalruleindex}" select="Data[@name='cpu']" table="/Report/Section[@name='advice']/Table[@name='error']">
  67.               <Item>
  68.                 <Data name="severity" img="error" link="sysHighSingleImageCPU_21_{internalruleindex}" message="sysHighSingleImageCPU_21_{internalruleindex}" translate="value">{severitymsg}</Data>
  69.                 <Data name="warning" message="sysHighSingleImageCPU_21_{internalruleindex}">{msgstring}</Data>
  70.                 <Data name="related" url="http://go.microsoft.com/fwlink/?LinkID=70096">{relatedperflink}</Data>
  71.               </Item>
  72.             </Warning>
  73.           </When>
  74.           <When expression="{cpuusage} > 60 and '{processname}' != 'Idle'">
  75.             <Variable name="internalruleindex" expression="{internalruleindex} + 1"/>
  76.             <Variable name="severitymsg">Warning</Variable>
  77.             <Variable name="msgstring">$(LOC_HSingleImageCPU)</Variable>
  78.             <Variable name="relatedperflink">$(PerformanceDiagnosis)</Variable>
  79.             <Warning tag="sysHighSingleImageCPU_22_{internalruleindex}" select="Data[@name='cpu']" table="/Report/Section[@name='advice']/Table[@name='warning']">
  80.               <Item>
  81.                 <Data name="severity" img="warning" link="sysHighSingleImageCPU_22_{internalruleindex}" message="sysHighSingleImageCPU_22_{internalruleindex}" translate="value">{severitymsg}</Data>
  82.                 <Data name="warning" message="sysHighSingleImageCPU_22_{internalruleindex}">{msgstring}</Data>
  83.                 <Data name="related" url="http://go.microsoft.com/fwlink/?LinkID=70096">{relatedperflink}</Data>
  84.               </Item>
  85.             </Warning>
  86.           </When>
  87.         </Exists>
  88.       </Step>
  89.     </Rule>
  90.     <Rule name="$(RuleServices)" enabled="true">
  91.       <Step select="/Report/Section/Table[@name='configService']/Item[Data[@name='processId'] = 0]">
  92.         <Exists>
  93.           <Otherwise>
  94.             <Delete select="Data[@name='processId']"/>
  95.             <Delete select="Data[@name='process']"/>
  96.             <Insert>
  97.               <Node>
  98.                 <Data name="process" translate="value" class="string italic">stopped</Data>
  99.                 <Data name="processId">-</Data>
  100.                 <Data name="cpu">0</Data>
  101.               </Node>
  102.             </Insert>
  103.           </Otherwise>
  104.         </Exists>
  105.       </Step>
  106.       <Step select="/Report/Section/Table[@name='configService']/Item[Data[@name='processId'] != '-']" sortType="all">
  107.         <Exists>
  108.           <Otherwise>
  109.             <Variable name="pid" expression="Data[@name='processId']"/>
  110.             <Insert select=".">
  111.               <Node document="{_document}" select="/Report/Section/Table[@name='imageStats']/Item[Data[@name='pid']='{pid}']/Data[@name='cpu']"/>
  112.             </Insert>
  113.           </Otherwise>
  114.         </Exists>
  115.       </Step>
  116.       <Step select="/Report/Section/Table[@name='configService']/Header">
  117.         <Exists>
  118.           <Otherwise>
  119.             <Delete select="Sort"/>
  120.             <Insert select="Data[1]">
  121.               <Node axis="preceding-sibling">
  122.                 <Sort field="cpu" type="number" order="descending"/>
  123.                 <Sort field="process" type="text" order="ascending"/>
  124.               </Node>
  125.             </Insert>
  126.             <Insert select="Data[last()]">
  127.               <Node axis="following-sibling">
  128.                 <Data name="cpu" class="number" format="#,##0.0"/>
  129.               </Node>
  130.             </Insert>
  131.           </Otherwise>
  132.         </Exists>
  133.       </Step>
  134.     </Rule>
  135.   </Group>
  136.   <StringTable>
  137.     <String ID="GroupSystem" loc.comment="Only used in WDC Console">System</String>
  138.     <String ID="RuleHideMultiCpu" loc.comment="Only used in WDC Console">Hide Multi-CPU tables on Single CPU</String>
  139.     <String ID="RuleInterrupts" loc.comment="Only used in WDC Console">High Per-Processor Interrupt Rate</String>
  140.     <String ID="RuleSingleImageCpu" loc.comment="Only used in WDC Console">High Single Image CPU consumption</String>
  141.     <String ID="RuleServices">Service Table</String>
  142.     <String ID="LOC_IntProcs" loc.comment="Interrupt Rule">This machine has {numprocessors} processors</String>
  143.     <String ID="LOC_IntNics" loc.comment="Interrupt Rule"> and {numnics} network cards.</String>
  144.     <String ID="LOC_IntHighValue" loc.comment="Interrupt Rule">High average interrupts / processor. {processconfig}{nicconfig} Total Interrupts/sec on the machine is {totalinterrupt}. The average interrupts per processor per sec is {averageinterrupts}.</String>
  145.     <String ID="PerformanceDiagnosis">Performance Diagnosis</String>
  146.     <String ID="LOC_HSingleImageCPU" loc.comment="Process has high CPU">Process {processname} [ProcessId: {processid}] has a high CPU consumption of {cpuusage}%.</String>
  147.   </StringTable>
  148. </Rules>
  149.