Lists all processes with CPU and related data.
Target | ComTrade.EMC.Documentum.Windows.DmBasicMethodServer |
Monitor | ComTrade.EMC.Documentum.Windows.MethodServer.CPU.Usage.Monitor |
Remotable | True |
Timeout | 300 |
Execute On State | Warning |
Category | Maintenance |
Enabled | true |
Accessibility | Internal |
<Diagnostic ID="ComTrade.EMC.Documentum.Windows.MethodServer.CPU.Usage.Diagnostics" Accessibility="Internal" Enabled="true" Target="CTDmWinDisc!ComTrade.EMC.Documentum.Windows.DmBasicMethodServer" Monitor="ComTrade.EMC.Documentum.Windows.MethodServer.CPU.Usage.Monitor" ExecuteOnState="Warning" Remotable="true" Timeout="300">
<Category>Maintenance</Category>
<ProbeAction ID="PA" TypeID="ComTrade.EMC.Documentum.PA.Xml.Generic.CommandExecuter.Provider">
<ScriptFilename>CTDmMPDMBMSCPUUDiagDataProv.js</ScriptFilename>
<XslFilter><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template name="matchProcesses">
<xsl:param name="cNode" />
<xsl:param name="cname" />
<xsl:param name="csname" />
<xsl:param name="rpname" />
<xsl:param name="rpid" />
<xsl:param name="totalcpu" />
<xsl:param name="totalmemsz" />
<xsl:param name="totalvmsz" />
<xsl:param name="threadscount" />
<xsl:param name="ctime" />
<xsl:variable name="mainprocess">
<xsl:choose>
<xsl:when test="$totalcpu=&quot;-1&quot;">
<xsl:value-of select="1"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="tcpu">
<xsl:choose>
<xsl:when test="$totalcpu=&quot;-1&quot;">
<xsl:value-of select="sum(descendant-or-self::*\/@cpu)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$totalcpu"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="tmemsz">
<xsl:choose>
<xsl:when test="$totalmemsz=&quot;-1&quot;">
<xsl:value-of select="sum(descendant-or-self::*\/@memsz)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$totalmemsz"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="tvmsz">
<xsl:choose>
<xsl:when test="$totalvmsz=&quot;-1&quot;">
<xsl:value-of select="sum(descendant-or-self::*\/@vmsz)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$totalvmsz"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="$cNode/process">
<xsl:sort select="@cpu"/>
<DataItem>
<Property Name="RepositoryName"><xsl:value-of select="$rpname"/></Property>
<Property Name="RepositoryId"><xsl:value-of select="$rpid"/></Property>
<Property Name="ContentServerName"><xsl:value-of select="$csname"/></Property>
<Property Name="Name"><xsl:value-of select="$cname"/></Property>
<Property Name="ProcessName"><xsl:value-of select="@name"/></Property>
<Property Name="ProcessId"><xsl:value-of select="@pid"/></Property>
<Property Name="ParentProcessId"><xsl:value-of select="@ppid"/></Property>
<Property Name="MainProcess"><xsl:value-of select="$mainprocess"/></Property>
<Property Name="ThreadsCount"><xsl:value-of select="$threadscount"/></Property>
<Property Name="ChildCount"><xsl:value-of select="count(descendant::*)"/></Property>
<Property Name="ProcessCPU"><xsl:value-of select="@cpu"/></Property>
<Property Name="OverallChildsCPU"><xsl:value-of select="sum(descendant::*\/@cpu)"/></Property>
<Property Name="OverallCPU"><xsl:value-of select="$tcpu"/></Property>
<Property Name="ProcessCheckTime"><xsl:value-of select="$ctime"/></Property>
<Property Name="CommandLine"><xsl:value-of select="@params"/></Property>
</DataItem>
<xsl:call-template name="matchProcesses">
<xsl:with-param name="cNode" select="." />
<xsl:with-param name="cname" select="$cname" />
<xsl:with-param name="csname" select="$csname" />
<xsl:with-param name="rpname" select="$rpname" />
<xsl:with-param name="rpid" select="$rpid" />
<xsl:with-param name="totalcpu" select="$tcpu" />
<xsl:with-param name="totalmemsz" select="$tmemsz" />
<xsl:with-param name="totalvmsz" select="$tvmsz" />
<xsl:with-param name="threadscount" select="$threadscount" />
<xsl:with-param name="ctime" select="$ctime" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="matchMthdsvrs">
<xsl:for-each select="repositories/repository/contentservers/contentserver/mthdsvr">
<xsl:if test="health">
<xsl:call-template name="matchProcesses">
<xsl:with-param name="cNode" select="health" />
<xsl:with-param name="cname" select="@name" />
<xsl:with-param name="csname" select="../@name" />
<xsl:with-param name="rpname" select="../../../@name" />
<xsl:with-param name="rpid" select="../../../@id" />
<xsl:with-param name="totalcpu" select="-1" />
<xsl:with-param name="totalmemsz" select="-1" />
<xsl:with-param name="totalvmsz" select="-1" />
<xsl:with-param name="threadscount" select="@method_server_threads" />
<xsl:with-param name="ctime" select="health/@time" />
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="*">
<Collection>
<xsl:call-template name="matchMthdsvrs"/>
</Collection>
</xsl:template>
</xsl:stylesheet></XslFilter>
<ValueProperties>ContentServerName!!Next!!RepositoryName!!Next!!RepositoryId</ValueProperties>
<ValuePropertyValues>$Target/Property[Type="CTDmLib!ComTrade.EMC.Documentum.ContentServer.Component"]/ServerConfigName$!!Next!!$Target/Property[Type="CTDmLib!ComTrade.EMC.Documentum.Repository.Component"]/Name$!!Next!!$Target/Property[Type="CTDmLib!ComTrade.EMC.Documentum.Repository.Component"]/Id$</ValuePropertyValues>
<TargetComputer>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</TargetComputer>
</ProbeAction>
</Diagnostic>