Error Message

Jul 18, 2012 at 7:56 PM

I am using PAL to analyze a simple sample workload. However, I receive a error message,

Method invocation failed because [System.Char] doesn't contain a method named 'substring'

Not sure where I could find an answer for this error.

-jeelanikcp

Coordinator
Jul 19, 2012 at 7:15 AM

Can you provide the full error message and some context as to how you are using the tool? Substring() is used in many parts of the code.

Jul 20, 2012 at 5:22 PM

Thanks Clint for the product and taking time to answer questions - all for free.

SQL Server: SQL Server 2008 R2 Enterprise / OS: Windows Server 2003 R2

Desktop OS (where PAL Tool os installed): Windows 7 Professional 32 bit

PAL Tool:  v2.3.2

The following is a sample of contents from PerMon to be fed to PAL:

"(PDH-CSV 4.0) (Central Daylight Time)(300)","\\Server\Memory\Available MBytes"
"07/18/2012 13:34:29.203","194"
"07/18/2012 13:34:30.144","194"
"07/18/2012 13:34:31.144","194"
"07/18/2012 13:34:32.144","194"
"07/18/2012 13:34:33.144","194"
"07/18/2012 13:34:34.144","194"
"07/18/2012 13:34:35.144","194"

Steps Followed:

Opened up PAL Wizard v.2.3.2, 1. clicked on next, 2. selected the output file from Perfmon (sample contents listed above), clicked on 2. next, 3. next, 4.next (changed the output folder of output html file), clicked on next and finish.

The following is the message on the PAL screen:

Transcript started, output file is C:\Users\Me\AppData\Local\Temp\PAL.log
PAL v2.3.2 (http://www.codeplex.com/PAL)
Written by: Clint Huffman (clinth@microsoft.com) and other contributors.
Last Modified: 07/16/2012 21:47:36
The information and actions by this tool is provided "as is" and is intended for
 information purposes only. The authors and contributors of this tool take no re
sponsibility for damages or losses incurred by use of this tool.

Your locale is set to: English (United States)
SCRIPT ARGUMENTS:
-Log C:\PerfLogs\sample.csv
-ThresholdFile C:\Program Files\PAL\PAL\SystemOverview.xml
-Interval AUTO
-OutputDir C:\PerfLogs\Server_PAL_ANALYSIS_2012-07-18_13-45-47
-IsOutputHtml True
-HtmlOutputFileName [LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm
-AllCounterStats False
-IsOutputXml False
-XmlOutputFileName [LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml
-BeginTime
-EndTime


Creating session working directory...
Creating directory "C:\Users\Me\AppData\Local\Temp\{d9ebeea1-0c75-4286-bf4
7-e709f79cff1d}"
Creating file "C:\PerfLogs\Server_PAL_ANALYSIS_2012-07-18_13-45-47\samp
le_PAL_ANALYSIS_2012-07-20_11-11-19.htm"
Creating directory "C:\PerfLogs\Server_PAL_ANALYSIS_2012-07-18_13-45-47
\sample_PAL_ANALYSIS_2012-07-20_11-11-19\"

Threshold File Load History:
C:\Program Files\PAL\PAL\SystemOverview.xml
QuickSystemOverview.xml
VMWare.xml
SystemOverview.xml

Generating the counter list to filter on...Done
Removing duplicate counter expressions from counter list...Done

WARNING: Please post errors or problems with this tool to the PAL web site
located at http://www.codeplex.com/PAL with the following error message and a
brief description of what you were trying to do. Thank you.
Method invocation failed because [System.Char] doesn't contain a method named '
substring'.
At C:\Program Files\PAL\PAL\PAL.ps1:1165 char:29
+     If ($sCounterPath.substring <<<< (0,2) -ne "\\")
    + CategoryInfo          : InvalidOperation: (substring:String) [], ParentC
   ontainsErrorRecordException
    + FullyQualifiedErrorId : MethodNotFound


C:\Program Files\PAL\PAL>

  

 

 

 

 


 

Coordinator
Jul 21, 2012 at 3:41 AM

Thank you for the details. I was able to fix that error and a number of others, but there are too many places that are expecting more than one counter instance in the log file and throwing an error due to little data. If you simply put another performance counter instance in your log, then it will work.

Jul 23, 2012 at 7:35 PM

Clint,

Thanks for the info. Still not out of the woods, yet.

 

Sample File:

"(PDH-CSV 4.0) (Central Daylight Time)(300)","\\MyMachine\LogicalDisk(_Total)\Disk Writes/sec","\\MyMachine\Memory\Available MBytes","\\MyMachine\MSSQL$TSSQL2:Buffer

Manager\Page life expectancy","\\MyMachine\MSSQL$TSSQL3:Memory Manager\Target Server Memory (KB)","\\MyMachine\MSSQL$TSSQL3:Memory Manager\Total Server Memory

(KB)","Generate a report detailing the status of local hardware resources, system response times, and processes on the local computer. Use this information to

identify possible causes of performance issues. Membership in the local Administrators group, or equivalent, is the minimum required to run this Data Collector Set."
"07/23/2012 13:21:12.465"," ","432","10900","2107616","1900000"," "
"07/23/2012 13:21:13.425","3.1428560802556333","432","10901","2107616","1900000"," "
"07/23/2012 13:21:14.424","4.0040280702545505","435","10901","2107616","1900000"," "
"07/23/2012 13:21:15.424","4.9997510810091725","435","10901","2107616","1900000"," "
"07/23/2012 13:21:16.424","49.011255608512421","435","10902","2107616","1900000"," "

 

Error Message:

Transcript started, output file is C:\Users\99993483\AppData\Local\Temp\PAL.log
PAL v2.3.2 (http://www.codeplex.com/PAL)
Written by: Clint Huffman (clinth@microsoft.com) and other contributors.
Last Modified: 07/16/2012 21:47:36
The information and actions by this tool is provided "as is" and is intended for
 information purposes only. The authors and contributors of this tool take no re
sponsibility for damages or losses incurred by use of this tool.

Your locale is set to: English (United States)
SCRIPT ARGUMENTS:
-Log C:\PerfLogs\20120723-000002\Performance Counter.csv
-ThresholdFile C:\Program Files\PAL\PAL\SystemOverview.xml
-Interval AUTO
-OutputDir [My Documents]\PAL Reports
-IsOutputHtml True
-HtmlOutputFileName [LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm
-AllCounterStats False
-IsOutputXml False
-XmlOutputFileName [LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml
-BeginTime
-EndTime


Creating session working directory...
Creating directory "C:\Users\Me\AppData\Local\Temp\{58606bb4-6fb9-4520-b8a
1-f03f740bcb4d}"
Creating file "C:\Users\Me\Documents\PAL Reports\Performance_Counter_PAL_A
NALYSIS_2012-07-23_13-32-10.htm"
Creating directory "C:\Users\Me\Documents\PAL Reports\Performance_Counter_
PAL_ANALYSIS_2012-07-23_13-32-10\"

Threshold File Load History:
C:\Program Files\PAL\PAL\SystemOverview.xml
QuickSystemOverview.xml
VMWare.xml
SystemOverview.xml

Generating the counter list to filter on...Done
Removing duplicate counter expressions from counter list...Done

Number Of Counter Instances In Perfmon Log: 6

Processing: Process Private Bytes

Processing: Process Handle Count

Processing: Process Thread Count

Processing: Process Working Set

Processing: Process % Processor Time

Processing: Process Virtual Bytes

Processing: Process IO Data Operations/sec

Processing: Process IO Other Operations/sec

Processing: Process ID Process

Processing: Process IO Read Operations/sec

Processing: Process IO Write Operations/sec

Processing: Process % Privileged Time

Processing: Memory Available MBytes
        Time data (one time only)...Done
        Counter data for ""...Done
        Auto analysis interval (one time only)...Done
        Quantized index (one time only)...WARNING: Please post errors or problem
s with this tool to the PAL web site
located at http://www.codeplex.com/PAL with the following error message and a
brief description of what you were trying to do. Thank you.
Attempted to divide by zero.
At C:\Program Files\PAL\PAL\PAL.ps1:2190 char:52
+         $iNumberOfIntervals = $ArrayOfTimes.Count / <<<<  $global:NumberOfVal
uesPerTimeSlice
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE
   xception
    + FullyQualifiedErrorId : RuntimeException


C:\Program Files\PAL\PAL>

Coordinator
Jul 27, 2012 at 4:24 AM

Are you using a real counter log or just making one from scratch?

In any case, I got PAL.ps1 quite a ways through the errors that you are seeing, but after hitting the 10th error or so, I just gave up on it. In any case, you can try out the updated version of PAL.ps1 on my SkyDrive at http://sdrv.ms/LTpPIn

Jan 15, 2013 at 4:16 PM

Hi Clint, I'm also running into the same issue. And I see what you mean about the pervasiveness of the issue. But PAL has become such a useful tool over the years that it would be a help to get this sort of thing worked out. 

Any update on this? 

Coordinator
Jan 16, 2013 at 9:51 AM

Hi lordzowy,

I don't recall ever receiving the log file to debug it. Can you send me your log file? It will allow me to track it down. Did you custom create the CSV log file or is it a log created from Performance Monitor?

On a side note, a colleage of mine had the same problem, but it came down to the formating of the date time stamps. Perfmon seemed to like it just fine, but PAL had problems with the fields. If you log has the same condition, then I'll consider modifying PAL to accomodate.

Thank you,

Jan 16, 2013 at 2:08 PM

Hi Clint, 

I didn't send in a log file. 

The issue I've been experiencing is directly related to a single Perfmon tracking file.  I'm rebuilding the metric's with more than one object and I'll rerun them. If I encounter the issue again I'll be sure to include the details. I need to complete the request before working on this issue. 

On a side note, Date format for all my systems is US (mm/dd/yyyy) if there is a problem with the date formate within PAL I've yet to see it throw an error to that effect. 

Thanks, 

Coordinator
Jan 23, 2013 at 9:00 PM

Okay, I'm willing to help when I can, so keep me posted.

I'm in the US, so I use the same date time format, so it should work. PAL also supports UK and Canadian formats as well - that took some work. With that said, I just wish every country just moved to universal yyyy/mm/dd or a star date (Star Trek reference) and be done with it.