Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

OpenVMS 7.3-2 - Monitor - append monitor binary files - how?

TechM-VMS
Occasional Contributor

OpenVMS 7.3-2 - Monitor - append monitor binary files - how?

Is it possible to append 2 or more binary monitor files together?

 

If so, how?

 

I've tried the following as a test

 

mon sys/record=1.1/nodisplay

mon sys/record=2.2/nodisplay

 

When I run a utility of the time ranges I get

 

1.1

@stats_com:get_monitor_range 1.1 echo
Range: 30-JUL-2012 12:22:33 -> 30-JUL-2012 12:22:45

 

2.2

@stats_com:get_monitor_range 2.2 echo
Range: 30-JUL-2012 12:23:07 -> 30-JUL-2012 12:23:16

 

This is to be expected

 

However, if I then append the two binary monitor files together and attempt to obtain the range of the monitor time coverage, it only returns the details for the first collection (1.1 in my case)

 

append 2.2 1.1
@stats_com:get_monitor_range 1.1 echo
Range: 30-JUL-2012 12:22:33 -> 30-JUL-2012 12:22:45

So, from this I conclude that the binary file might be having an end of monitor timestamp written to it and so that when i append the 2.2 monitor file, it is never looked at because the 1.1 end of monitor file record stops monitor looking any further into the file

 

Would this be correct?

 

I have also tried the above using just monitor and playback and the result is the same so it's not my monitor range utility that's misreporting here (it just uses monitor anyhow)

 

More importantly, how to I append the monitor files together and have one file that works? (in dcl would be nice)

 

I found the following reference to the record layout for monitor but I was hoping i didn't have to resort of pulling apart the file to get the functionality I wanted

 

http://h71000.www7.hp.com/doc/83final/6048/6048pro_092.html

 

Thanks,

 

Ian

3 REPLIES
John Gillings
Honored Contributor

Re: OpenVMS 7.3-2 - Monitor - append monitor binary files - how?

Ian,

 

   As you've seen, MONITOR binary records are non-trivial. Note that the header record MNR_HDR$ contains both the beginning & ending times and a record count. Even without other complications, this by itself means you're not going to be able to do any kind of simple concatenation. Minimally, the header would need to be updated. I suspect there will be more complications, especially if the two binary files have disjoint sets of monitor data.

 

  More than likely you're really interested in analysing the data, rather than maintaining it in MONITOR binary format. If that's the case, get yourself a copy of T4 and use the T4$MON_EXTRACT to pull the data out of MONITOR data files and convert it into T4 CSV format (see the CLD file and T4$COLLECT.COM for example use). Once you've converted both your input files, use CSVPNG to combine them. CSVPNG will handle merging both  "vertically" (ie: timeseries) and "horizontally" (ie: data items). You can then use TLViz to analyze the data.

 

It might look something like this:

$ monitor all/record=1.1/nodisplay/ending="+0-0:0:20.0"/inter=2
$ monitor all/record=2.2/nodisplay/ending="+0-0:0:20.0"/inter=2
$ Set Command T4$Sys:T4$Mon_Extract
$ t4extr 1.1/csv=1.csv/format=extended/Class=(All)/PROCESS=*
$ t4extr 2.2/csv=2.csv/format=extended/Class=(All)/PROCESS=*
$ csvpng="$T4$SYS:CSVPNG_ALPHA"
$ csvpng %.csv /PARAMETERS=ALL /NOCHART /MERGE=merged.csv

CSVPNG V1.0-170 Copyright 2001-2008 Hewlett-Packard Development Company, L.P.

Opened output log file T4_LOG.LIS
Parameters in all files are the same
The CSV files are from the same node

Appending data:
appended DISK_USERS:[GILLINGS_J.TEMP.MONTIOR]1.CSV, 10 data lines
appended DISK_USERS:[GILLINGS_J.TEMP.MONTIOR]2.CSV, 10 data lines

Appended data written to merged.csv

 

That said, note that the /INPUT qualifier accepts both lists of files, and wildcards, so you should be able to analyze both files without having to concatenate them. Try this:

 

$ MONITOR SYS/INPUT=(1.1,2.2)/SUMMARY

 

 Dig into your get_monitor_range.com procedure, find the MONITOR command and put brackets around the value for /INPUT then try:

 

$ @get_monitor_range "1.1,2.2"

 

 

A crucible of informative mistakes
Phil.Howell
Honored Contributor

Re: OpenVMS 7.3-2 - Monitor - append monitor binary files - how?

Have you looked into "Rerecording Monitoring"? You can playback and record at the same time.

 

So if you just record to a single file eg. 3.3 , you can then run monitor again with different qualifiers

 

MONITOR SYS /RECORD=3.3 /NODISPLAY

 

MONITOR /BEGIN=10:00:00 /end=10:00:59 /INPUT=3.3 /NODISPLAY /RECORD=1.1

 

MONITOR /BEGIN=10:01:00 /end=10:01:59 /INPUT=3.3 /NODISPLAY /RECORD=2.2

 

Phil

John Gillings
Honored Contributor

Re: OpenVMS 7.3-2 - Monitor - append monitor binary files - how?

Phil,

  Given that, I'd expect the solution to Ian's question would be the inverse of your command, ie: feed in the two files as input and record to the 3rd:

 

$ MONITOR ALL/INPUT=(1.1,2.2)/NODISPLAY/RECORD=3.3

 

Maybe I'm doing something wrong, but I get an error when using /INPUT without /SUMMARY

 

%MONITOR-E-NOSUMM, an input file list may be specified only when /SUMMARY is present

 

Odd because there's no mention of that requirement in the documentation for /INPUT

 

Anyone know what's going on?

A crucible of informative mistakes