2

Closed

[System.Char] doesn't contain a method named 'substring'.

description

Hi Guys,
 
I'm getting the following error when trying to analyse a csv log. Looks like something other than a string is being sent to the GetCounterComputer function?
 
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
       
      I used relog.exe to convert a .blg file from a Windows Server 2003 server with Exchange 2003. Then I ran PAL Wizard v2.3.2 against the csv with default settings.
       
      Any help would be great as this looks like a great tool if I can get it working.
       
      Cheers,
       
      Dave

file attachments

Closed Oct 3, 2013 at 7:08 PM by ClintH

comments

daveyrand wrote Sep 28, 2012 at 11:59 AM

Don't worry about this one. I think it was just a corrupt csv. I exported the Exchange 2003 template and used that in PerfMon and that analysed fine.

mcstf wrote Nov 28, 2012 at 10:58 PM

I am seeing this error with blg files for a custom xml (attached), analysing a single counter for a product i'm troubleshooting. I have tried it with three separate blg files with the same error.

I think i cribbed relatively accurately, although quickly, and did not take time to determine if my series syntax is particularly correct.

I will dig in as time allows, and my powershell is serviceable, but if anyone has any insight I would be grateful.

kind thanks,

mike

Output

File: C:\Users\mcstf\AppData\Local\Temp\2{5060754c-bd77-418b-8673-f7b9fbda6a5f}_FilteredPerfmonLog.csv
Begin: 11/7/2012 9:32:35
End: 11/12/2012 12:15:39
Samples: 88351
The command completed successfully.
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) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : MethodNotFound

ClintH wrote Nov 30, 2012 at 1:05 AM

Hi mcstf, can you send me the BLG file that you are using? If it is larger than 4 MB, then consider putting up on a free Microsoft Skydrive.

mcstf wrote Dec 15, 2012 at 3:18 PM

Clint, just got emailed for your response this morning.

blg is on a spideroak share:

https://spideroak.com/browse/share/cannel-dot-la_netshare/pal_is_an_absolute_godsend

This is a little 5MB one--a one-week run is 160MB--but they all exhibit the error.

ClintH wrote Jan 3, 2013 at 11:00 PM

Hi mcstf, I received your counter log and custom threshold file. It processed just fine for me. I am using PAL v2.3.3 which I am going to release later today. Try it out with v2.3.3 and let me know if you still have problems with it.