1748152 Members
3431 Online
108758 Solutions
New Discussion

Re: TAIL for OVMS IA64?

 
SOLVED
Go to solution
roose
Regular Advisor

TAIL for OVMS IA64?

Hi Guys,

 

Just wanted to check if there is an existing port of the TAIL binary for OpenVMS IA64? We were using previously the TAIL freeware from Hunter Goatley on our Alpha servers, but I was getting errors when I tried to compile it in our Itanium server. I tried doing a type/tail on our Oracle alert log, but I was getting the error "-RMS-F-ORG, invalid file organization value". I also tried a Perl implementation of tail but it was not functioning properly. I don't want to install GNV on our production servers, so we are only looking for a native tail binary on OVMS IA64.

 

Thanks in advance for your help!

 

Regards,

Roose

12 REPLIES 12
Steven Schweda
Honored Contributor

Re: TAIL for OVMS IA64?

> [...] the TAIL freeware from Hunter Goatley [...]

   Not a very detailed description of the program, or where you found
it.

> [...] I was getting errors [...]

   Not a very detailed description of what happened.

>  [...] when I tried to compile it in our Itanium server.

   Not a very detailed description of what you did, or of your system.

   As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations.

> [...] but I was getting the error [...]

   What was the _whole_ message?

> [...] I also tried a Perl implementation [...]

   Not a very detailed description of anything.

> [...] but it was not functioning properly.

   Not a very detailed description of what happened, here, either.

roose
Regular Advisor

Re: TAIL for OVMS IA64?

Hi Steven,

 

1. Hunter Goatley's TAIL archive freeware http://vms.process.com/scripts/fileserv/fileserv.com?TAIL

2. I am attaching the log when I tried to compile the source code for Hunter's program.

3. I am doing the compilation on a standalone HP Integrity rx2660 with OpenVMS 8.3-1H1, and compiling it using HP C v7.3-018.

4. Problem with the Perl script TAIL implementation is if I tried to put the parameter to specify the number of lines I would like to see, e.g $ tail -n10 operator.log,  it will still print out the whole file. I am attaching the TAIL Perl script that I got from the internet (already forgot which site I got it).

 

Thanks.

roose
Regular Advisor

Re: TAIL for OVMS IA64?

Here was the error when I used type/tail=10 on our Oracle alert log file:

ORACLE10G_S1P0A::> dir s1p0c_prod_alert*.log/size

Directory DISK$PKG:[1020.ADMIN.PROD.bdump]

S1P0C_PROD_alert.log;1
3576

Total of 1 file, 3576 blocks.
ORACLE10G_S1P0A::> type/tail=10 s1p0c_prod_alert.log
%TYPE-W-OPENIN, error opening DISK$PKG:[1020.ADMIN.PROD.bdump]S1P0C_PROD_alert.log;1 as input
-SYSTEM-E-UNSUPPORTED, unsupported operation or function
-RMS-F-ORG, invalid file organization value
ORACLE10G_S1P0A::> dir/full S1P0C_PROD_alert.log;1

Directory DISK$PKG:[1020.ADMIN.PROD.bdump]

S1P0C_PROD_alert.log;1 File ID: (16194,4,0)
Size: 3576/3584 Owner: [DBA,ORACLE10G]
Created: 13-JUL-2011 15:38:09.33
Revised: 2-SEP-2011 14:02:26.52 (21300)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attributes: <None specified>
Modified: <None specified>
Linkcount: 1
File organization: Sequential
Shelved state: Online
Caching attribute: Writethrough
File attributes: Allocation: 3584, Extend: 0, Global buffer count: 0, No version limit
Record format: Variable length, maximum 0 bytes, longest 904 bytes
Record attributes: Carriage return carriage control
RMS attributes: None
Journaling enabled: None
File protection: System:RWED, Owner:RWED, Group:, World:
Access Cntrl List: None
Client attributes: None

Total of 1 file, 3576/3584 blocks.
ORACLE10G_S1P0A::>
H.Becker
Honored Contributor

Re: TAIL for OVMS IA64?

$ help type/tail

TYPE
  /TAIL
        /TAIL[=n]
     Displays the last several lines of a log file. The value, n,
     defaults to p-2 where p is the current terminal page length. You
     can use TYPE/TAIL only if all of the following criteria are true:
     o  File organization is sequential.
     o  The longest record is less than 512 bytes.
     o  The record format is either VAR, VFC, STM, STRCM or STMLF
        (for more information, see the description of FAB$B_RFM in the
        OpenVMS Record Management Services Reference Manual).
     o  The file being typed is on a device that supports random
        access. The TYPE/TAIL command does not work on magnetic tape
        drives.
     Even with this criteria, some file conditions cannot be
     anticipated and may not allow display of the last several lines
     of a log file, resulting in the following error message:
     %TYPE-W-READERR, error reading DEVICE:[DIRECTORY]FILE.EXT;1
     -SYSTEM-E-UNSUPPORTED, unsupported operation or function
$
It seems the longest record length doesn't meet the above criteria. 
The GNV tool will not help, here. It expects a stream_lf file.
Hoff
Honored Contributor

Re: TAIL for OVMS IA64?

That file might well have the LOG extension, but (based on the posted settings, and particularly that 904 byte record length) it is apparently not intended for use by humans.  (A situation which reminds me of this forum software, reading that last and garbled post from Hartmut.  But I digress.)

 

Check with whatever is writing that log, and see if you can adjust the record length to something more appropriate.

 

Alternatively, I used a gnv tool to wrap gonzo file text to fix a long-line issue with a text file.

Steven Schweda
Honored Contributor
Solution

Re: TAIL for OVMS IA64?

> 1. Hunter Goatley's TAIL archive freeware http://vms.process.com/scripts/fileserv/fileserv.com?TAIL


   Did you look at the dates in that fossil?

   It's too old.  It doesn't know about ODS5 extended file names.  It
has a very unfortunate default_string.  I'm sure that if I looked at it
longer, I could find any number of reasons for a complete re-write.
However, I took out some of the most lame parts ("#ifdef __alpha"), so
that it might get past a modern compiler in more places, and it's
attached here.


   I deny everything.

 

 

   Well, I would have attached it here, but today I'm on a Mac with
Firefox, so I can post a message normally instead of as a text
attachment (which is all I've gotten to work with SWB on my main VMS
system), but here I can't seem to get an attachment accepted.  So, for a
limited time only:

      http://antinode.info/ftp/misc/tail.c

   I still deny everything.

Hein van den Heuvel
Honored Contributor

Re: TAIL for OVMS IA64?

Roose>>. I tried doing a type/tail on our Oracle alert log, but I was getting the error "-RMS-F-ORG, invalid file

organization value".

 

It is unfortunate that the type/tail implementor highjacked a fine error message for a lowly cause.

The error should have been "TYPE-F-ing_too_lazy. We know what is good for you." 

 

One single long record can spoil the fun for a file.

I don't have an Oracle-on-openvms handy, but I suspect Oracle does not keep the file open.

In that case you can just make a white lie about the LRL using SET FILE/ ATTR=LRL=511 and hope for the best.

You  could  rename it away, have Oracle create a fresh one, and then use SET FILE

 

HB> It seems the longest record length doesn't meet the above criteria. 

 

Yeah sure, but how LAME are those criteria?

Why would they even bother to validate a record length for a stream-lf file?

Why are fixed length records not allowed? Those are the easiest to implement of all!

(Cobol applications often make those.)

 

Hoff>> it is apparently not intended for use by humans.  

BS. The Oracle alert log is strictly, and only, intended for use by humans.

Now it may have made tricky or even erroneous choices but that is not up to TYPE to judge.

 

Fwiw, I have raised the type malfunction with engineering in a meeting last month and got some traction.

 

Regards,

Hein.

 

 

Hoff
Honored Contributor

Re: TAIL for OVMS IA64?

I've seen this sort of code before and know a porting error when I see it.  This is an Oracle error.  

 

It might have been the intent of the programmers here to use this log for humans, but (as I stated) that wasn't the result.    This isn't a file intended for (VMS-using) humans.

 

These results are typically usable only after file modifications are made; wrapping or related.

 

While you're raising this testing coverage issue with Oracle, the test coverage likely need generic LRL and related checks of the resulting files; I'd likely add checks to detect and flag any other questionable RMS file constructions might exist here.

John Gillings
Honored Contributor

Re: TAIL for OVMS IA64?

I'm with Hein on this, the way TYPE/TAIL works (or rather, doesn't work) is rather silly and could be improved significantly with little effort, if engineering cared about usability.

 

Something I've seen with log files is the phenomenon of TYPE/TAIL working for a particular log file while it's being actively written, but then failing with -RMS-F-ORG once it's been closed. It's usually a STREAM_LF log file from a C program. What happens is the MRS and LRL of the open file are 0 while the file is being written, so TYPE is happy, but once it's closed, LRL is set to 32767, which TYPE doesn't like.

 

$ SET FILE/ ATTR=LRL=511 on an affected file is one way around it, another is to reset the DECC default LRL:

 

$ DEFINE/SYSTEM DECC$DEFAULT_LRL 511 

A crucible of informative mistakes