Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up some performance monitoring on our web servers.

I thought it would make sense to have 2 separate data collection sets, one with counters for the hardware and OS and another for web information (.net performance, connections per minute, errors etc).

I set up the schedule so that both run at the same time, but one always craps out after 5 seconds. Is it possible to have more than one data collector set running at the same time?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Well, I had the same problem in many performance logs throught the years. My workaround that works great for me is:

  • Configure all counters in only one job
  • Make sure that the destination folders isn't system protected
  • Use relog -q one time to "extract" all counters
  • Use some scripting (I use vbscrip) to "split" the big file in smaller files with the counters that you really need.

This approach is much better in my opinion because:

  1. you can check "more" counters and filter them after the gathering, but you always have the option to get "the others" counters.
  2. relog can export to csv, or txt, and parse it for graphs

In my servers, and after the processing, I usually get about 6-8 different files, csv, and others scripts load them into the graphs DDBB for periodic querys.

Hope it helps.

-------------- Additional Info ----------------

That's part of the script, isn't english but I think you'll get the point if you know a little about scripting (and I'm sure you do)

I have a "script" folder, a "metric" folder and a "counter" folder, basically, I launch relog with different parameters and counters but the same "input" so I get as many files as group of counters I want to extract.

If you export them to binary (BLG) you can open them with the perfomance console (good for debugging too).

' *** Constantes ***
' Algunas incluyen el espacio para que sea mas comodo su concatenacion
Const LanzaScript = "cscript "
Const ScriptConversion = "CambiaFormatoFechaYCaracterDecimal.vbs "
Const ArchivoMetrica = "DataCollector01.blg"
Const Para_Relog = "relog.exe "
Const Para_FormatoBin = " -f BIN "
Const Para_ExtBin = ".blg"
Const Para_FormatoCsv = " -f CSV "
Const Para_ExtCSV = ".csv"
Const Para_Contadores = " -cf "
Const Para_Salida = " -o "
Const Directorio_Salida = "D:\Metricas\"
Const Para_Confirmacion = " -y "

' Comprobaciones previas
CompruebaUso
CompruebaArgumentos

' Variables
Dim fso
Dim DirectorioMetricas
Dim DirectorioContadores
Dim Archivo

Dim objShell
Dim Estado
Dim Cmdz

' Objetos de ambito global
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set DirectorioMetricas = fso.GetFolder (WScript.Arguments(0))
Set DirectorioContadores = fso.GetFolder (WScript.Arguments(1))

' Comprobamos o creamos el directorio de salida
If Not fso.FolderExists (Directorio_Salida & "\" & Right (WScript.Arguments(0),6)) Then
    fso.CreateFolder (Directorio_Salida & "\" & Right (WScript.Arguments(0),6))
End If

' Algoritmo
If WScript.Arguments.Count = 3 Then
    Set Archivo = fso.GetFile (WScript.Arguments(1) & "\" & WScript.Arguments(2))
    ProcesaMetrica (Archivo)
Else
    For Each Archivo In DirectorioContadores.Files
        ProcesaMetrica (Archivo)
    Next
End If
' Salida

' Funciones
Sub ProcesaMetrica (Archivo)
    Dim Cmdz
    Dim fso
    ' Extraemos contadores a formato binario
    Cmdz = Transforma (Archivo, "BIN")
    objShell.Run Cmdz,2,True
    ' Extraemos contadores a formato CSV
    Cmdz = Transforma (Archivo, "CSV")
    objShell.Run Cmdz,2,True
    ' Cambiamos orden de fecha y caracter decimal
    Cmdz = CambiaFormato (Archivo.Name)
    objShell.Run Cmdz,2,True
End Sub

Function Transforma (Contador, tipo)
' tipo puede ser "BIN" o "CSV"
    Dim Cmdz
    Select Case LCase(tipo)
        Case "bin"
            ' Extraemos contadores a formato binario
            Cmdz = Para_Relog & Chr(34) & DirectorioMetricas & "\" & ArchivoMetrica & Chr(34)
            Cmdz = Cmdz & Para_Contadores & Chr(34) & Contador & Chr(34) & Para_FormatoBin & Para_Salida
            Cmdz = Cmdz & Chr(34) & Directorio_Salida & Right(WScript.Arguments(0),6) & "\" & Archivo.Name & Para_ExtBin & Chr(34) & Para_Confirmacion
            WScript.Echo "*** Para BLG :" & Cmdz
        Case "csv"
            ' Extraemos contadores a formato CSV
            Cmdz = Para_Relog & Chr(34) & DirectorioMetricas & "\" & ArchivoMetrica & Chr(34)
            Cmdz = Cmdz & Para_Contadores & Chr(34) & Contador & Chr(34) & Para_FormatoCsv & Para_Salida
            Cmdz = Cmdz & Chr(34) & Directorio_Salida & Right(WScript.Arguments(0),6) & "\" & Archivo.Name & Para_ExtCSV & Chr(34) & Para_Confirmacion
            WScript.Echo "*** Para CSV :" & Cmdz
    End Select
    Transforma = Cmdz
End Function
share|improve this answer
    
Makes sense, I was hoping to utilize the native reports in perf mon to make it easier for my nosy supervisor to look at the data. do you have any tips for the vbscript to use to split up the data? –  Snowburnt Mar 21 '13 at 13:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.