locked
export-counter with rename computer and object names RRS feed

  • Question

  • I have an existing .blg and need to change both the computer and object name in the file. for this I was thinking to run import-counter and get the objects then export-counter to export and replace computer and object names with friendly names (or anonymized). EG: 

    in blg file I have for computer \\Adv001 and for object MSSQL$Adv which I want to change them to \\AdventureSrv and for object MSSQL$AdventureWorks. 

    is there any way to specify mapping from existing names for computer and object to new computer and object names?

    Thank you,

    Thursday, February 20, 2020 8:32 PM

All replies

  • Basically no.  The files are in binary.

    "BLG file is a log file created by Windows performance tracking tools. ... BLG files contain a history of the computer resource utilization and performance, such as the amount of CPU, memory, and disk resources used by different programs. BLG files are stored in a proprietary binary format. They can be converted to ."


    \_(ツ)_/

    Thursday, February 20, 2020 8:41 PM
  • Hi jrv,

    I tested the import-counter blg file and export-counter to tsv or csv. then manually rename and then opposite to change it back to blg. the only issue is the counter order is not kept same, is reordered. is it possible to pick the order (in an collection/array) and specifiy the same collection/array order for the export? 

    Thank you,

    Thursday, February 20, 2020 9:09 PM
  • To maintain order I would suggest a database.  You can also just use a simple DataTable object and add an index to it.

    The binary file has no index and converting it to a CSV will destroy the physical order because the data will be deformalized thus losing the structure of the file.

    You would be better off just outputting the original collector to a database.  It will be slower so hi-rez captures will be harder.

    For more details see the performance counter web site and the PC examples in teh SDK.


    \_(ツ)_/


    • Edited by jrv Thursday, February 20, 2020 9:23 PM
    Thursday, February 20, 2020 9:22 PM
  • You cannot vote on your own post

    Just if anybody else needs to do the same thing, get the blg file and anonymize the servername/object Name/ I ended up exporting with relog the .blg to csv , manually updating the columns there and then import-counter/export-counter from csv to blg without any issue, and no errors reported. when I tried doing the same thing with just import-counter, export counter from blg to csv and back if gave me some errors.

    Monday, February 24, 2020 3:41 PM