Automate conversion of .log files to .txt #113
-
Hello, I was wondering if it was at all possible to automate the conversion of the .log files to .txt files as shown in this HammerDB blog post. I.e. instead of manually typing out the input and output files in command line, have the script simply convert all .log files in a certain directory when run. For reference I am running HammerDB on Windows. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
OK this is only adding a couple of lines to loop through the files. As an windows example I have done a few runs and used "Use unique Log Name" to get the unique log extensions. You don't want the data for different runs in the same file as this will get mixed up.
Then copy the script below, name it something like "convert.tcl" - note my example logs are generated in C:\temp yours may go elsewhere and you will need to change the directory name - make sure you keep the Linux type naming ie C:/temp (TCL will convert it for you). We've also changed the output to go to a named file so don't need to redirect it.
double click on hammerdbcli and type "source convert.tcl"
You now have text files with the excel formatted data with the same file name before the extension
Follow the example in the blog for opening these in excel and generating the graphs. |
Beta Was this translation helpful? Give feedback.
-
Fantastic, this works perfectly. Thank you again for the help. |
Beta Was this translation helpful? Give feedback.
OK this is only adding a couple of lines to loop through the files. As an windows example I have done a few runs and used "Use unique Log Name" to get the unique log extensions. You don't want the data for different runs in the same file as this will get mixed up.
Then copy the script below, name it something like "convert.tcl" - note my example logs are generated in C:\temp your…