Windows Perl Scripting Forums » Windows

Perl script works but fails Windows binary compilation

(1 post)
  • Started 7 years ago by

  1. Anonymous

    I was wondering if anyone has input on the following weird issue I observe. I have a script (posted below) that makes use of Perl's block or multiline print. What's interesting is the script runs fine as a Perl script under Windows (didn't test under *nix), but the script doesn't compile into a binary very well. I would assume that if a script can run fine, then generally it can compile and run as a binary fine assuming all dependencies are met or compiled into the binary. I haven't had such issues with my other scripts compilations, generally via PAR.

    Using the Perl Archiving Toolkit (PAR) module with ActivePerl v5.8.7, the script compiles but fails to run, with this error:

    C:\WorkTemp>pp -o genVpLoadPALTemplate.exe genVpLoadPALTemplate.pl

    C:\WorkTemp>genVpLoadPALTemplate.exe
    Unrecognized character \xEF at script/genVpLoadPALTemplate.pl line 1.

    Using freeware/shareware version of Perl2Exe (though a newer version than what my Perl version is) to do the compilation, the tool fails to compile with these errors:

    C:\Perl2Exe>Perl2Exe c:\WorkTemp\genVpLoadPALTemplate.pl -o= c:\WorkTemp\genVpLo
    adPALTemplateb.exe
    Perl2Exe V8.82 Copyright (c) 1997-2007 IndigoSTAR Software

    This is an evaluation version of Perl2Exe, which may be used for 30 days.
    For more information see the attached pxman.htm file,
    or visit http://www.indigostar.com

    Converting 'c:/WorkTemp/genVpLoadPALTemplate.pl -o= c:\WorkTemp\genVpLoadPALTemp
    lateb.exe' to genVpLoadPALTemplate.exe
    Warning: Can't locate this.pm
    at c:\WorkTemp\genVpLoadPALTemplate.pl line 67
    @INC = C:\Perl\lib, C:\Perl\site\lib, .

    Warning: Can't locate this.pm
    at c:\WorkTemp\genVpLoadPALTemplate.pl line 123
    @INC = C:\Perl\lib, C:\Perl\site\lib, .

    Warning: Can't locate this.pm
    at c:\WorkTemp\genVpLoadPALTemplate.pl line 154
    @INC = C:\Perl\lib, C:\Perl\site\lib, .

    Warning: Can't locate this.pm
    at c:\WorkTemp\genVpLoadPALTemplate.pl line 210
    @INC = C:\Perl\lib, C:\Perl\site\lib, .

    Looking through the script, the failures are from lines in the script that are inside a multiline print block, particularly the lines that begin with "Use".

    print OUTPUTSCRIPT <<SCRIPTHEADER;
    ...omitted blocks...
    of time.

    Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis. If you suspect a
    ...omitted blocks...
    SCRIPTHEADER

    Here's the script, works but a bit messy...

    ################################################################################
    # genVpLoadPALTemplate.pl
    # Written by: David Luu
    # Last updated: 03/18/10
    #
    # Script to generate a PAL analysis report template for x # of VP clients
    # running on a single machine
    #
    # Revision History
    # 03/18/10 - v1.0 - initial release
    #
    ################################################################################

    ### No input display ###
    if (@ARGV[0] eq "?" || @ARGV < 1 || @ARGV > 2) {
    print "\n";
    print " Usage: genVpLoadPALTemplate.pl numClients [OutputScriptFile]\n";
    print " Arg0 Arg1\n";
    print "\n";
    print " Notes: 1st ARG => number of VP clients running on single machine.\n";
    print " 2nd ARG => Optional name & path of output script file.\n";
    print " Default is VpLoadPALTemplate.xml\n\n";
    print " Example: genVpLoadPALTemplate.pl 16\n";
    print "\n";
    exit;
    }
    ### Initialization ###
    # Save command line arguments/parameters to variables
    my $numVpClients = @ARGV[0];
    my $CmdLine_OutputFile = "";
    if(@ARGV > 1){
    $CmdLine_OutputFile = @ARGV[1];
    }else{
    $CmdLine_OutputFile = "VpLoadPALTemplate.xml";
    }

    # Open input & output files for parsing & processing
    open (OUTPUTSCRIPT, ">$CmdLine_OutputFile") || die ("FATAL ERROR: Could not create output script file: $^E");

    print OUTPUTSCRIPT <<SCRIPTHEADER;
    <?xml version="1.0"?>
    <PAL NAME="ViewPoint Client Analysis for $numVpClients VP clients on same PC" DESCRIPTION="System performance analysis customized for analyzing $numVpClients VP clients running on same PC." CONTENTOWNERS="David Luu" FEEDBACKEMAILADDRESS="dluu\@vertical.com" VERSION="1.0">
    <QUESTION DATATYPE="string" DEFAULTVALUE="1" QUESTIONVARNAME="NumberOfProcessors">How many processors (physical and virtual) does the server have?</QUESTION>
    <QUESTION DATATYPE="boolean" DEFAULTVALUE="False" QUESTIONVARNAME="ThreeGBSwitch">Was the /3GB switch being used on the server?</QUESTION>
    <QUESTION DATATYPE="boolean" DEFAULTVALUE="False" QUESTIONVARNAME="SixtyFourBit">Was the computer 64-bit?</QUESTION>
    <QUESTION DATATYPE="string" DEFAULTVALUE="1" QUESTIONVARNAME="TotalMemory">How much memory did the server have in gigabytes?</QUESTION>
    <QUESTION QUESTIONVARNAME="KernelDumpOnCDrive" DATATYPE="boolean" DEFAULTVALUE="True">Is the System set to create a MEMORY.DMP file on C: drive in the event of a server crash (blue screen). By default this is set to C: drive.</QUESTION>
    <ANALYSIS NAME="Memory Leak Detection for Vertical.Wave.ViewPoint" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint)\\Private Bytes" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint)\\Private Bytes" MINVARNAME="MinPrivateBytes" AVGVARNAME="AvgPrivateBytes" MAXVARNAME="MaxPrivateBytes" TRENDVARNAME="TrendPrivateBytes" DATATYPE="Integer">
    </COUNTER>
    <THRESHOLD NAME="Memory: an increasing trend of 10MB's per hour detected for Vertical.Wave.ViewPoint" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[If the private bytes size is greater than <B>100MB</B> and the process is increasing at a rate greater than <B>10MB's</B> per hour, then an aggressive memory leak is suspected.
    ]]></DESCRIPTION>
    <![CDATA[' If the private bytes is over 100MBs and if the trend shows a 10MB increase at each hour.
    If IsNull(AvgPrivateBytes) = False AND IsNull(TrendPrivateBytes) = False Then
    If AvgPrivateBytes > 100000000 AND TrendPrivateBytes > 10000000 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <CHART CHARTTYPE="Line" CATEGORIES="AUTO" MAXCATEGORYLABELS="0" LEGEND="ON" VALUES="AUTO" GROUPSIZE="640x480" OTSFORMAT="MM/dd hh:mm" CHARTTITLE="\\Process(Vertical.Wave.ViewPoint)\\Private Bytes" DATASOURCE="\\Process(Vertical.Wave.ViewPoint)\\Private Bytes" DATATYPE="Integer">
    </CHART>
    <DESCRIPTION><![CDATA[This analysis determines if the process is consuming a large chunk of the system's memory and if the process is increasing in memory consumption over time. A process consuming large portions of memory is okay as long as the process returns the memory back to the system. Look for increasing trends in the chart. An increasing trend over a long period of time could indicate a memory leak. Private Bytes is the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes. This analysis checks for a 10MB’s per hour increasing trends. Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis.

    Also, keep in mind that newly started processes will initially appear as a memory leak when it is simply normal start up behavior. A memory leak is when a process continues to consume memory and not releasing memory over a long period of time.

    Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis. If you suspect a memory leak condition, then install and use the Debug Diag tool. For more information on the Debug Diag Tool, see the references section.

    <B>References:</B>

    Debug Diagnostic Tool v1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en&gt;&lt;/DESCRIPTION&gt;
    </ANALYSIS>
    <ANALYSIS NAME="Handle Leak Detection for Vertical.Wave.ViewPoint" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint)\\Handle Count" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint)\\Handle Count" MINVARNAME="MinHandleCount" AVGVARNAME="AvgHandleCount" MAXVARNAME="MaxHandleCount" TRENDVARNAME="TrendHandleCount" DATATYPE="Integer">
    </COUNTER>
    <THRESHOLD NAME="Handle Leak Suspected - more than 2000 handles and a trend of more than 100 handles per hour" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[Checks for any process with a handle count greater than <B>2000</B> and if the trend is greater than <B>100</B> handles per hour. If so, check the chart to determine if the counter is on an increasing trend potentially indicating a handle leak.]]></DESCRIPTION>
    <![CDATA[If IsNull(AvgHandleCount) = False AND IsNull(TrendHandleCount) = False Then
    If AvgHandleCount > 2000 AND TrendHandleCount > 100 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <CHART CHARTTYPE="Line" CATEGORIES="AUTO" MAXCATEGORYLABELS="0" LEGEND="ON" VALUES="AUTO" GROUPSIZE="640x480" OTSFORMAT="MM/dd hh:mm" CHARTTITLE="\\Process(Vertical.Wave.ViewPoint)\\Handle Count" DATASOURCE="\\Process(Vertical.Wave.ViewPoint)\\Handle Count" DATATYPE="Integer">
    </CHART>
    <DESCRIPTION><![CDATA[This analysis checks the process to determine how many handles it has open and determines if a handle leak is suspected. A process with a large number of handles and/or an aggresive upward trend could indicate a handle leak which typically results in a memory leak. The total number of handles currently open by this process. This number is equal to the sum of the handles currently open by each thread in this process.]]></DESCRIPTION>
    </ANALYSIS>
    <ANALYSIS NAME="Vertical.Wave.ViewPoint Processor Utilization" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint)\\% Processor Time" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint)\\% Processor Time" MINVARNAME="MinProcess_PercentProcessorTime" AVGVARNAME="AvgProcess_PercentProcessorTime" MAXVARNAME="MaxProcess_PercentProcessorTime" TRENDVARNAME="TrendProcess_PercentProcessorTime" DATATYPE="integer" />
    <CHART CHARTTITLE="\\Process(Vertical.Wave.ViewPoint)\\% Processor Time" OTSFORMAT="MM/dd hh:mm" GROUPSIZE="640x480" CATEGORIES="AUTO" DATATYPE="integer" LEGEND="ON" MAXCATEGORYLABELS="0" CHARTTYPE="Line" VALUES="AUTO" DATASOURCE="\\Process(Vertical.Wave.ViewPoint)\\% Processor Time" />
    <THRESHOLD NAME="Significant Processor Use Suspected for Vertical.Wave.ViewPoint - more than 10% CPU utilization" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[This analysis checks if the process is consuming a significant amount of processor time, as specified by the current average/maximum threshold of 10% CPU utilization.]]></DESCRIPTION>
    <![CDATA[
    If AvgProcess_PercentProcessorTime > 7Then
    IsTrendThresholdBroken = True
    IsAvgThresholdBroken = True
    End If

    If AvgProcess_PercentProcessorTime > 10 Or MaxProcess_PercentProcessorTime > 10 Then
    IsMaxThresholdBroken = True
    End If]]>

    </THRESHOLD>
    <DESCRIPTION><![CDATA[% Processor Time is the percentage of elapsed time that all of process threads used the processor to execution instructions. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count.]]></DESCRIPTION>
    </ANALYSIS>
    <ANALYSIS NAME=".NET CLR Memory # Bytes in all Heaps for Vertical.Wave.ViewPoint" ENABLED="True" ANALYZECOUNTER="\\.NET CLR Memory(Vertical.Wave.ViewPoint)\\# Bytes in all Heaps" CATEGORY="Process">
    <COUNTER NAME="\\.NET CLR Memory(Vertical.Wave.ViewPoint)\\# Bytes in all Heaps" MINVARNAME="MinNETCLRMemory_#BytesinallHeaps" AVGVARNAME="AvgNETCLRMemory_#BytesinallHeaps" MAXVARNAME="MaxNETCLRMemory_#BytesinallHeaps" TRENDVARNAME="TrendNETCLRMemory_#BytesinallHeaps" DATATYPE="integer" />
    <CHART CHARTTITLE="\\.NET CLR Memory(Vertical.Wave.ViewPoint)\\# Bytes in all Heaps" OTSFORMAT="MM/dd hh:mm" GROUPSIZE="640x480" CATEGORIES="AUTO" DATATYPE="integer" LEGEND="ON" MAXCATEGORYLABELS="0" CHARTTYPE="Line" VALUES="AUTO" DATASOURCE="\\.NET CLR Memory(Vertical.Wave.ViewPoint)\\# Bytes in all Heaps" />
    <THRESHOLD NAME="Significant .NET Heap usage for Vertical.Wave.ViewPoint, possible memory leak." CONDITION="Warning" COLOR="#FFFF00" PRIORITY="50">
    <DESCRIPTION><![CDATA[This analysis checks if the process's .NET heap has exceeded 32 MBytes and if the trend shows a rate increase of 10 MBytes per hour, in which case, a memory leak may be occuring, or at least the process is consuming a significant amount of memory resources on the .NET side.]]></DESCRIPTION>
    <![CDATA[' If the heap usage is over 32MBs and if the trend shows a 10MB increase at each hour.
    If IsNull(AvgNETCLRMemory_#BytesinallHeaps) = False AND IsNull(TrendNETCLRMemory_#BytesinallHeaps) = False Then
    If AvgNETCLRMemory_#BytesinallHeaps > 32000000 AND TrendNETCLRMemory_#BytesinallHeaps > pMRate000000 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <DESCRIPTION><![CDATA[This counter is the sum of four other counters; Gen 0 Heap Size; Gen 1 Heap Size; Gen 2 Heap Size and the Large Object Heap Size. This counter indicates the current memory allocated in bytes on the GC Heaps.

    This analysis checks if the process's .NET heap has exceeded 32 MBytes and if the trend shows a rate increase of 10 MBytes per hour, in which case, a memory leak may be occuring, or at least the process is consuming a significant amount of memory resources on the .NET side.

    Also, keep in mind that newly started processes will initially appear as a memory leak when it is simply normal start up behavior. A memory leak is when a process continues to consume memory and not releasing memory over a long period of time.

    Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis. If you suspect a memory leak condition, then install and use the Debug Diag tool. For more information on the Debug Diag Tool, see the references section.

    <B>References:</B>

    Debug Diagnostic Tool v1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en&gt;&lt;/DESCRIPTION&gt;
    </ANALYSIS>
    SCRIPTHEADER
    ### End Step 1 ###

    ### Functions ##################################################################
    for($i=1;$i<=$numVpClients-1;$i++){
    print OUTPUTSCRIPT <<CLIENTBLOCK;
    <ANALYSIS NAME="Memory Leak Detection for Vertical.Wave.ViewPoint#$i" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint#$i)\\Private Bytes" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint#$i)\\Private Bytes" MINVARNAME="MinPrivateBytes" AVGVARNAME="AvgPrivateBytes" MAXVARNAME="MaxPrivateBytes" TRENDVARNAME="TrendPrivateBytes" DATATYPE="Integer">
    </COUNTER>
    <THRESHOLD NAME="Memory: an increasing trend of 10MB's per hour detected for Vertical.Wave.ViewPoint#$i" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[If the private bytes size is greater than <B>100MB</B> and the process is increasing at a rate greater than <B>10MB's</B> per hour, then an aggressive memory leak is suspected.
    ]]></DESCRIPTION>
    <![CDATA[' If the private bytes is over 100MBs and if the trend shows a 10MB increase at each hour.
    If IsNull(AvgPrivateBytes) = False AND IsNull(TrendPrivateBytes) = False Then
    If AvgPrivateBytes > 100000000 AND TrendPrivateBytes > 10000000 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <CHART CHARTTYPE="Line" CATEGORIES="AUTO" MAXCATEGORYLABELS="0" LEGEND="ON" VALUES="AUTO" GROUPSIZE="640x480" OTSFORMAT="MM/dd hh:mm" CHARTTITLE="\\Process(Vertical.Wave.ViewPoint#$i)\\Private Bytes" DATASOURCE="\\Process(Vertical.Wave.ViewPoint#$i)\\Private Bytes" DATATYPE="Integer">
    </CHART>
    <DESCRIPTION><![CDATA[This analysis determines if the process is consuming a large chunk of the system's memory and if the process is increasing in memory consumption over time. A process consuming large portions of memory is okay as long as the process returns the memory back to the system. Look for increasing trends in the chart. An increasing trend over a long period of time could indicate a memory leak. Private Bytes is the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes. This analysis checks for a 10MB’s per hour increasing trends. Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis.

    Also, keep in mind that newly started processes will initially appear as a memory leak when it is simply normal start up behavior. A memory leak is when a process continues to consume memory and not releasing memory over a long period of time.

    Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis. If you suspect a memory leak condition, then install and use the Debug Diag tool. For more information on the Debug Diag Tool, see the references section.

    <B>References:</B>

    Debug Diagnostic Tool v1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en&gt;&lt;/DESCRIPTION&gt;
    </ANALYSIS>
    <ANALYSIS NAME="Handle Leak Detection for Vertical.Wave.ViewPoint#$i" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint#$i)\\Handle Count" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint#$i)\\Handle Count" MINVARNAME="MinHandleCount" AVGVARNAME="AvgHandleCount" MAXVARNAME="MaxHandleCount" TRENDVARNAME="TrendHandleCount" DATATYPE="Integer">
    </COUNTER>
    <THRESHOLD NAME="Handle Leak Suspected - more than 2000 handles and a trend of more than 100 handles per hour" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[Checks for any process with a handle count greater than <B>2000</B> and if the trend is greater than <B>100</B> handles per hour. If so, check the chart to determine if the counter is on an increasing trend potentially indicating a handle leak.]]></DESCRIPTION>
    <![CDATA[If IsNull(AvgHandleCount) = False AND IsNull(TrendHandleCount) = False Then
    If AvgHandleCount > 2000 AND TrendHandleCount > 100 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <CHART CHARTTYPE="Line" CATEGORIES="AUTO" MAXCATEGORYLABELS="0" LEGEND="ON" VALUES="AUTO" GROUPSIZE="640x480" OTSFORMAT="MM/dd hh:mm" CHARTTITLE="\\Process(Vertical.Wave.ViewPoint#$i)\\Handle Count" DATASOURCE="\\Process(Vertical.Wave.ViewPoint#$i)\\Handle Count" DATATYPE="Integer">
    </CHART>
    <DESCRIPTION><![CDATA[This analysis checks the process to determine how many handles it has open and determines if a handle leak is suspected. A process with a large number of handles and/or an aggresive upward trend could indicate a handle leak which typically results in a memory leak. The total number of handles currently open by this process. This number is equal to the sum of the handles currently open by each thread in this process.]]></DESCRIPTION>
    </ANALYSIS>
    <ANALYSIS NAME="Vertical.Wave.ViewPoint#$i Processor Utilization" ENABLED="True" ANALYZECOUNTER="\\Process(Vertical.Wave.ViewPoint#$i)\\% Processor Time" CATEGORY="Process">
    <COUNTER NAME="\\Process(Vertical.Wave.ViewPoint#$i)\\% Processor Time" MINVARNAME="MinProcess_PercentProcessorTime" AVGVARNAME="AvgProcess_PercentProcessorTime" MAXVARNAME="MaxProcess_PercentProcessorTime" TRENDVARNAME="TrendProcess_PercentProcessorTime" DATATYPE="integer" />
    <CHART CHARTTITLE="\\Process(Vertical.Wave.ViewPoint#$i)\\% Processor Time" OTSFORMAT="MM/dd hh:mm" GROUPSIZE="640x480" CATEGORIES="AUTO" DATATYPE="integer" LEGEND="ON" MAXCATEGORYLABELS="0" CHARTTYPE="Line" VALUES="AUTO" DATASOURCE="\\Process(Vertical.Wave.ViewPoint#$i)\\% Processor Time" />
    <THRESHOLD NAME="Significant Processor Use Suspected for Vertical.Wave.ViewPoint#$i - more than 10% CPU utilization" CONDITION="Warning" COLOR="Yellow" PRIORITY="50">
    <DESCRIPTION><![CDATA[This analysis checks if the process is consuming a significant amount of processor time, as specified by the current average/maximum threshold of 10% CPU utilization.]]></DESCRIPTION>
    <![CDATA[
    If AvgProcess_PercentProcessorTime > 7Then
    IsTrendThresholdBroken = True
    IsAvgThresholdBroken = True
    End If

    If AvgProcess_PercentProcessorTime > 10 Or MaxProcess_PercentProcessorTime > 10 Then
    IsMaxThresholdBroken = True
    End If]]>

    </THRESHOLD>
    <DESCRIPTION><![CDATA[% Processor Time is the percentage of elapsed time that all of process threads used the processor to execution instructions. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count.]]></DESCRIPTION>
    </ANALYSIS>
    <ANALYSIS NAME=".NET CLR Memory # Bytes in all Heaps for Vertical.Wave.ViewPoint#$i" ENABLED="True" ANALYZECOUNTER="\\.NET CLR Memory(Vertical.Wave.ViewPoint#$i)\\# Bytes in all Heaps" CATEGORY="Process">
    <COUNTER NAME="\\.NET CLR Memory(Vertical.Wave.ViewPoint#$i)\\# Bytes in all Heaps" MINVARNAME="MinNETCLRMemory_#BytesinallHeaps" AVGVARNAME="AvgNETCLRMemory_#BytesinallHeaps" MAXVARNAME="MaxNETCLRMemory_#BytesinallHeaps" TRENDVARNAME="TrendNETCLRMemory_#BytesinallHeaps" DATATYPE="integer" />
    <CHART CHARTTITLE="\\.NET CLR Memory(Vertical.Wave.ViewPoint#$i)\\# Bytes in all Heaps" OTSFORMAT="MM/dd hh:mm" GROUPSIZE="640x480" CATEGORIES="AUTO" DATATYPE="integer" LEGEND="ON" MAXCATEGORYLABELS="0" CHARTTYPE="Line" VALUES="AUTO" DATASOURCE="\\.NET CLR Memory(Vertical.Wave.ViewPoint#$i)\\# Bytes in all Heaps" />
    <THRESHOLD NAME="Significant .NET Heap usage for Vertical.Wave.ViewPoint#$i, possible memory leak." CONDITION="Warning" COLOR="#FFFF00" PRIORITY="50">
    <DESCRIPTION><![CDATA[This analysis checks if the process's .NET heap has exceeded 32 MBytes and if the trend shows a rate increase of 10 MBytes per hour, in which case, a memory leak may be occuring, or at least the process is consuming a significant amount of memory resources on the .NET side.]]></DESCRIPTION>
    <![CDATA[' If the heap usage is over 32MBs and if the trend shows a 10MB increase at each hour.
    If IsNull(AvgNETCLRMemory_#BytesinallHeaps) = False AND IsNull(TrendNETCLRMemory_#BytesinallHeaps) = False Then
    If AvgNETCLRMemory_#BytesinallHeaps > 32000000 AND TrendNETCLRMemory_#BytesinallHeaps > pMRate000000 Then
    IsTrendThresholdBroken = True
    End If
    End If]]>

    </THRESHOLD>
    <DESCRIPTION><![CDATA[This counter is the sum of four other counters; Gen 0 Heap Size; Gen 1 Heap Size; Gen 2 Heap Size and the Large Object Heap Size. This counter indicates the current memory allocated in bytes on the GC Heaps.

    This analysis checks if the process's .NET heap has exceeded 32 MBytes and if the trend shows a rate increase of 10 MBytes per hour, in which case, a memory leak may be occuring, or at least the process is consuming a significant amount of memory resources on the .NET side.

    Also, keep in mind that newly started processes will initially appear as a memory leak when it is simply normal start up behavior. A memory leak is when a process continues to consume memory and not releasing memory over a long period of time.

    Use this analysis in correlation with the Available Memory analysis, and total process (i.e. Process(*)) private bytes allocation analysis. If you suspect a memory leak condition, then install and use the Debug Diag tool. For more information on the Debug Diag Tool, see the references section.

    <B>References:</B>

    Debug Diagnostic Tool v1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en&gt;&lt;/DESCRIPTION&gt;
    </ANALYSIS>

    CLIENTBLOCK
    }
    print OUTPUTSCRIPT "</PAL>\n";
    close (OUTPUTSCRIPT);
    print "\nPAL template generated.\n";

    Posted 7 years ago #

RSS feed for this topic

Reply

You must log in to post.