SQL Server Performance

Perfmon output: converting binary to CSV file

Discussion in 'Performance Tuning for DBAs' started by bj007, May 17, 2004.

  1. bj007 New Member

    Is there a way to convert the binary file output of the perfmon counters to CSV ? I need to copy this to excel and product charts.<br /><br />Thanks for your help.<br />Bj.[<img src='/community/emoticons/emotion-11.gif' alt='8)' />]
  2. Raulie New Member

    Yes you can create a counter log in the save options you can choose Binary (Default) or CSV file.
  3. bj007 New Member

    Hi,

    I already ran perfmon, but unfortunately stored it in binary format. I cannot run perfmon again.

    I need to read that file, and make charts and present to mgmt.
  4. Raulie New Member

    Oh sorry I missunderstood. I'll try to get an answer for you I have never came accross this. Mean time lets see what other forum members have to add.
  5. Luis Martin Moderator

  6. satya Moderator

    I think you can do that by opening the file in PERFMON again and save it as CSV format again (I will try as well to confirm).

    Edit:
    Yes, you can save the report to .TSV extension which can be manipulated using excel.

    HTH
    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  7. bj007 New Member

    Satya,
    I dont know how to open this *.blg file in perfmon. I started perfmon. In systemmonitor, right-click Open nothing happens. I moved to the right pane, and clicked on the 4th button (View Log File Data), and opened the log file. But, nothing shows up on the screen. I know my log file has data in it. I clicked on the various reporting buttons, nothing happens. I went to properties, and selected tsv file format.
    Right clicked on the pane, and did a saveas. The file got created but nothing in it.

    I think I am missing something important. Any help greatly appreciated. Meanwhile I will try the tracedmp or tracerpt files.
    Thanks much.
  8. bj007 New Member

    Satya & others,

    I was able to bring the logs into the SystemMonitor. I could save it as a html file, which also shows the exact graphy. But, when I try to store it as a TSV file, it stores only the one data for every counter. So, every counter will have one value.
    I dont know how to save all the couter values, for every time interval.

    Thanks, I am glad to get atleast up to this point.
  9. Luis Martin Moderator

    As far I know (I'll wait for Satya) you can't load a previus binary and save in CSV.
    On way is to follows instruccion I give in link before.




    Luis Martin
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.

  10. bj007 New Member

    Louis,
    I copied the log file to an XP OS machine, and tried the tracertp.

    C> tracerpt mylog.blg -o output.csv

    It gave me a message: mylog.blg is a corrupted file.
    But, this looks to me a good file. I was able to open it in notepad. I even, reloaded it into SystemMonitor, but, not able to save the entire data into a tsv file.

    BJ.
  11. bj007 New Member

    I tried the tracedmp.exe. Following is the error:

    Setting log file to: C: est_pc_000001.blg
    Getting guids from C:MofData.guid
    Error processing with status=6L (GetLastError=0xb7)
    Error Closing Trace 0 with status=6
    Event traces dumped to DumpFile.csv
    Event Summary dumped to Summary.txt
    Exit Status: 183

    Thing is, i did not setup anything as mofdata.guid, as i dont know what to set. it creates dumpfile.csv. but it contains, almost nothing. Some headings related to event logs. I think, tracedump or tracerpt will be used for *.etl files (event log files) and not for *.blg files. I may be wrong. I desperately need to convert this blg file to a csv file to read all my counter values.
    Any suggestions greatly appreciated.
  12. satya Moderator

    Bj

    Glad to know you solve the issue with the HTML graphs in SYSMON which is an addition in Win2K.
    Even I was able to perform the same operation and there is no root to save the data as .CSV file, until unless you specify the filename while creating the PERFMON trace itself.

    I think as of now you need to suffice using the HTML graphs in SYSMON.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  13. gaurav_bindlish New Member

    Perfmon can read previously saved files....

    After the trace has been saved and you want to open the same, right click on the graph and go in Source tab. Here selecting the Log Files radio button gives you an option to see the data previously captured.

    Tip: Clicking on the timerange allows you to see the data for a specific time interval.

    Gaurav
    Moderator
    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

    The views expressed here are those of the author and no one else. There are no warranties as to the reliability or accuracy of anything presented here.
  14. Luis Martin Moderator

    Hat off, Gaurav!!!!!!!!!!!!!!!!!!!!!!!!!!![<img src='/community/emoticons/emotion-1.gif' alt=':)' />]<br /><br />Luis Martin<br />Moderator<br />SQL-Server-Performance.com<br /><br /><font size="1">All postings are provided “AS IS” with no warranties for accuracy.</font id="size1"><br /><br />
  15. bj007 New Member

    Thanks Gaurav, Louis Satya and others.

    I am going to go through this painful process of collecting the data as Gaurav suggested. Fortunately, it is only 1 hour worth of data with 6 counters.

    Also, i found this article by Microsoft, which provides a program to convert to a csv file. I will test this in the coming weeks, to see if is the way to go.

    http://msdn.microsoft.com/library/d..._format_log_file_to_a_csv_format_log_file.asp

    BJ
  16. gaurav_bindlish New Member

    Great Link!

    Gaurav
    Moderator
    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

    The views expressed here are those of the author and no one else. There are no warranties as to the reliability or accuracy of anything presented here.
  17. satya Moderator

    From WIn2K onwards you can schedule the PERFMON trace in order to capture the counters.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  18. vikingsjas New Member

    Just a quick note to tell you to use relog.exe at a windows XP command prompt. This will convert binary to csv no problem. I have tried it and it works great! Read the microsoft article:
    http://support.microsoft.com/kb/303133
    This will show you how to use the command. Thanks! [;)]
  19. rahul_dfandoo New Member

    relog logfile.blg -f CSV -o newfile.csv run this command on cmd.
    logfile.blg is perfmon file
    newfile.csv is newly created file as cvs

Share This Page