Operating System - Tru64 Unix
1753853 Members
7928 Online
108808 Solutions
New Discussion юеВ

How to convert collect cgz file to cvs style without collgui&cfilt ?

 
Jun Sasaki
Occasional Contributor

How to convert collect cgz file to cvs style without collgui&cfilt ?

Hello,

My system is Tru64 v5.1B.
I want to convert collect cgz file to cvs style without collgui&cfilt.
And I want to do in CLI.
(I would export collect data to Excel.)

Please, teach me whether it is possible.

regards,
Jun Sasaki
3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: How to convert collect cgz file to cvs style without collgui&cfilt ?

Will be a little complicated to have a correct output to import in excel because there is no a commond field separator.

If you don't mind about a perfect output, you can do something like:

collect -sp -p collect_init@19-Jun-00:05:02.cgz |tr -s " "|tr " " ";" |more

But I still think that cfilt was developed to do that.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Hein van den Heuvel
Honored Contributor

Re: How to convert collect cgz file to cvs style without collgui&cfilt ?

There is a C tool in the OpenVMS Freeware to convert a collect log file to csv:

http://h71000.www7.hp.com/freeware/freeware80/t4$unix_collect

Personally I was considering something similar in perl, but never had the incentive to do so.

Anyway, T4 is pretty neat tool to visualize time based CSV data originated in OpenVMS land.
Much better than Excell.

The tools run great on Windoze.
Check out
http://h71000.www7.hp.com/OpenVMS/products/t4/index.html


Also.... A while back I was delivered some cgz files for a consulting engagement but did not have a Tru64 box handy to analyze them. So I asked the (old/ex) collect engineer/friend Rob Urban if there were non-Tru64 tools to read the cgz files. His answer:

"To (finally) answer your question, I can remember that at least one person hacked collgui to work with the ASCII output of collect, as opposed to the binary files. I believe it ran/runs on linux. If you're still interested, I can probably get the details for you.

Reading the binary files on linux, is, as you probably already know, not trivial, but not impossible. I used a number of 64 bit datatypes, so some programming work would be necessary. I would be a bit of a mess,
though."

Regards,
Hein.
Don Ritchey
Frequent Advisor

Re: How to convert collect cgz file to cvs style without collgui&cfilt ?

We ran into the same issues where I work and we used the collect program with the '-t' option to get tagged output which we post-processed through perl. The tags allow you to select the exact lines that are of interest, otherwise the parsing gets to be very, very ugly. The perl module 'Spreadsheet::WriteExcel' allows you to directly create an excel spreadsheet on your UNIX machine for analysis on Windows.