Operating System - OpenVMS
1753481 Members
4900 Online
108794 Solutions
New Discussion

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

 
SOLVED
Go to solution
How to use DECset PCA w
Occasional Advisor

Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

Hi there, 

              I seen on an old post (2008) that a OpenVMS user had the same issue as I'm currently having. I use the FILES_INFO freeware utility on a regular basis and have found it really useful in scripts to check updates to files are happening as expected. We're moving from ES45 running OpenVMS 8.3 to I64 Integerity servers running OpenVMS 8.4.

Hoping someone can give me some info on:

Has anyone used an updated FILES_INFO utility that runs on the I64 Integrity servers with OpenVMS 8.4?

Does it work as expected?

Is there a ported version out there that is Freeware thats been ported or is porting it something I'd need to undertake myself?

I presume this would mean either getting a C Compiler license or paying someone to procude the exe?

All information/guidance appreciated

 

20 REPLIES 20
Steven Schweda
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

> I seen on an old post (2008) [...]

   An actual link might be much more helpful than this "reference".

> [...] really useful in scripts to check updates to files are happening
> as expected.

   What, exactly, are you checking?

> Has anyone used an updated FILES_INFO utility that runs on the I64
> Integrity servers with OpenVMS 8.4?

   Not I.  I took a quick look at it, but I was frightened off by stuff
like:

%ILINK-E-INVLDHDR, invalid ELF header; field 'ehdr$w_e_type' has invalid value %XFE00

   It's also too old to deal with ODS5 extended names.  With my
(extremely) weak macro32 knowledge, I'd be looking for another way to do
whatever it is you want to do.

> I presume this would mean either getting a C Compiler license or
> paying someone to procude the exe?

   Yeah, but I'd guess that getting the C code compiled would be the
least of your problems.

H.Becker
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

> %ILINK-E-INVLDHDR, invalid ELF header; field 'ehdr$w_e_type' has invalid value %XFE00

Usually the linker prints out more information than that. The complete linker message would be useful. It shows the module. Obviously the linker got an input file, expected an ELF header and didn't find one. Looking at the input file, with the analyze or dump utility will very likely help to understand and resolve the problem.

How to use DECset PCA w
Occasional Advisor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

Hi,

    the link to the old post: https://community.hpe.com/t5/System-Management/Freeware-FILES-INFO/m-p/5108038#M37507

I have a database files and logs that I monitor for reads and writes to ensure that their being regularly updated. The files are likely to be open when I'm checking.

Thanks

 

Steven Schweda
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

> %ILINK-E-INVLDHDR, invalid ELF header; field 'ehdr$w_e_type' has invalid
> value %XFE00

   Oops.  That was from when I was fooling around.  The normal MMS build
died like this:

IT $ mms

MACROS = "/MACRO=(__DECC__=1,__ALPHA__=1)"
MMS'macros' default
CC /NOLIST/OBJECT=FILES_INFO.OBJ FILES_INFO.C

typedef struct wcbstr
^
%CC-I-USELESSTYPED, This typedef declaration is useless because it does not decl
are a typedef name.
at line number 123 in file IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]files_
info.c;1
If "''F$Search("FILES_INFO.OLB")'" .EQS. "" Then LIBRARY/Create FILES_INFO.OLB
LIBRARY/REPLACE FILES_INFO.OLB FILES_INFO.OBJ
MACRO /NOLIST/OBJECT=FILES_MACRO.OBJ FILES_MACRO.MAR
If "''F$Search("FILES_INFO.OLB")'" .EQS. "" Then LIBRARY/Create FILES_INFO.OLB
LIBRARY/REPLACE FILES_INFO.OLB FILES_MACRO.OBJ
SET COMMAND /OBJECT=FILES_CLD.OBJ FILES_CLD.CLD
If "''F$Search("FILES_INFO.OLB")'" .EQS. "" Then LIBRARY/Create FILES_INFO.OLB
LIBRARY/REPLACE FILES_INFO.OLB FILES_CLD.OBJ
MACRO /NOLIST/OBJECT=LOCK_NONPAGED_CODE.OBJ LOCK_NONPAGED_CODE.MAR
If "''F$Search("FILES_INFO.OLB")'" .EQS. "" Then LIBRARY/Create FILES_INFO.OLB
LIBRARY/REPLACE FILES_INFO.OLB LOCK_NONPAGED_CODE.OBJ
LINK/TRACE/NOMAP/EXEC=FILES_INFO.EXE/NOTRACEBACK/MAP/CROSS/FULL FILES_INFO/INCLU
DE=FILES_INFO/LIBR,
FILES_INFO.ALPHA_OPT/OPTIONS/SYSEXE
%ILINK-W-NUDFSYMS, 5 undefined symbols:
%ILINK-I-UDFSYM, EXE$IPID_TO_EPID (Weak Reference)
%ILINK-I-UDFSYM, FCB$W_ACNT
%ILINK-I-UDFSYM, FCB$W_REFCNT
%ILINK-I-UDFSYM, FCB$W_STATUS
%ILINK-I-UDFSYM, FCB$W_WCNT
%ILINK-I-UDFSYM, WCB$W_ACON
%ILINK-W-USEUNDEF, undefined symbol FCB$W_REFCNT referenced
section: $CODE$
offset: %X0000000000001520 slot: 1
module: FILES_INFO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-W-USEUNDEF, undefined symbol FCB$W_ACNT referenced
section: $CODE$
offset: %X0000000000001670 slot: 2
module: FILES_INFO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-W-USEUNDEF, undefined symbol FCB$W_WCNT referenced
section: $CODE$
offset: %X00000000000016A0 slot: 2
module: FILES_INFO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-W-USEUNDEF, undefined symbol FCB$W_STATUS referenced
section: $CODE$
offset: %X00000000000016D0 slot: 0
module: FILES_INFO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-W-USEUNDEF, undefined symbol WCB$W_ACON referenced
section: $CODE$
offset: %X0000000000001720 slot: 2
module: FILES_INFO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-F-SHRINOFF, linker internal error - an official FD was made for a symbol
defined by a shareable image
relocation section: .relaEXEC$NONPAGED_DATA (section header entry: 13)
relocation type: RELA$K_R_IA_64_VMS_ADD
relocation entry: 1
module: FILES_MACRO
file: IT$DKE0:[UTILITY.SOURCE.FILES_INFO.v2r0.source]FILES_INFO.OLB;1
%ILINK-E-NOIMGFIL, image file not created
%MMS-F-ABORT, For target FILES_INFO.EXE, CLI returned abort status: %X1789EA6C.
%MMS-F-ABORT, For target BUILD_IT, CLI returned abort status: %X10EE8034.

   It did better (no LINK errors) on Alpha.

    Knowing nothing, I assume that the undefined things might be in some
other .STB on IA64, but "help /mess SHRINOFF" was discouraging.  Someone
who knows something about VMS kernel code and Macro32 would have a
better chance than I of making this work.

H.Becker
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

Actual commands and actual output really helps :-)

> It did better (no LINK errors) on Alpha.

No suprise, as there are "#ifdef __alpha" in the C source. I would try to replace them with "#ifdef __ia64".

> Knowing nothing, I assume that the undefined things might be in some
other .STB on IA64, but "help /mess SHRINOFF" was discouraging. Someone
who knows something about VMS kernel code and Macro32 would have a
better chance than I of making this work.

On I64 .STBs are no linker input files.

I agree, the Macro32 code needs to be looked at whether it is OK for I64. To avoid the linker error, get rid of the EXEC$NONPAGED_DATA PSECT in the file_macro.mar and try a JSB to the real routine. The PSECT (and what the compiler generates) causes the linker to create an official function descriptor for something which is defined in the base (shareable) image. But, again, that may not be enough to get this working. 

 

Steven Schweda
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

> No suprise, as there are "#ifdef __alpha" in the C source. I would try
> to replace them with "#ifdef __ia64".

   I'd try "#ifndef __vax" (or plain "vax", for stone-age
compatibility), which seems to work.  (Wouldn't want to do this again
for x86.  I must have glanced at the MMS macro, __ALPHA__, and figured
that all would be well.  Duh.)

> %CC-I-USELESSTYPED, [...]

   Discarding the useless "typedef" keyword quiets that one.

> [...] To avoid the linker error, get rid of the EXEC$NONPAGED_DATA
> PSECT in the file_macro.mar and try a JSB to the real routine. [...]

   That's well beyond my (negligible) Macro/VMS understanding.  (I could
probably handle the (C) NAM -> NAML conversion, though.)

H.Becker
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers


@Steven Schweda wrote:

 

   That's well beyond my (negligible) Macro/VMS understanding.  (I could
probably handle the (C) NAM -> NAML conversion, though.)


At the moment I don't have access to an I64 system (that I can crash in case something goes wrong). I have an Alpha emulator running and can do some tests on it. I'm not sure whether (all of) the macro32 code is needed on Alpha or I64. From what I remember, there are standard calling interfaces for most of these internal routines, including CVT_EPID_TO_IPID. I'll try this on Alpha. If this works out as expected, it should work on I64 as well. 

H.Becker
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

Using exe_std$cvt_ipid_to_epid() seems to work on Alpha. Calling it from C can replace the jacket routine in files_macro.mar. I didn't change anything else in the Macro32 sources.

I created a new files_convert_pid.c:

#include <ssdef.h>
extern int exe_std$cvt_ipid_to_epid();
int convert_pid (unsigned int ipid, unsigned int * epid) {
    *epid = exe_std$cvt_ipid_to_epid (ipid);
    return SS$_NORMAL;
}

removed the corresponding code from files_macro.mar:

$ diff/slp files_macro.mar-orig files_macro.mar/out=sys$output
- 67, 69
- 152, 176
/
$

added files_convert_pid to the mms file:

$ diff/slp descrip.mms-orig descrip.mms/out=sys$output
- 55, 57
FILES_INFO_OBJS = FILES_INFO,FILES_MACRO,FILES_CLD,LOCK_NONPAGED_CODE, -
files_convert_pid

FILES_INFO$(OBJ) : FILES_INFO.C
files_convert_pid$(OBJ) : files_convert_pid.c
/
$

OK, this is more or less a quick and dirty change to get over the I64 linker error message and to produce an executable. Again, as I understand this code, for I64 you need to make sure the "#ifdef __alpha" C source code is compiled.

If necessary, I can drop a zip file with what I have for Alpha.

Steven Schweda
Honored Contributor

Re: Freeware FILES_INFO on OpenVMS 8.4 I64 Integrity Servers

> I created a new files_convert_pid.c:
> [...]

   It works for me.  I stuck the code into files_info.c, and added some
VAX conditionality to files_macro.mar.  And replaced descrip.mms.  I
haven't tried it with VAX C, but, around here:

IT $ cc /vers
HP C V7.3-019 on OpenVMS IA64 V8.3-1H1

IT $ mms test

   Destination: [.IA64]

if (f$search( "IA64.DIR;1") .eqs. "") then create /directory [.IA64]
mcr [.IA64]FILES_INFO.EXE [.IA64]FILES_INFO.EXE

FILE: ALP$DKC0:[UTILITY.SOURCE.FILES_INFO.files_info_030.source.IA64]FILES_INFO.
EXE;1
Total access count of 1, XQP access 1, writers 0, size 54/64

PID USERNAME READS WRITES ACCESS CHARACTERISTICS
-------- ------------ -------- -------- ----------------------
20E00471 SYSTEM 9 0 Read, Cathedral, Complete, Sequential
, NoWriteShr

ALP $ cc /vers
HP C V7.3-010 on OpenVMS Alpha V8.4

ALP $ mms test

   Destination: [.ALPHA]

if (f$search( "ALPHA.DIR;1") .eqs. "") then create /directory [.ALPHA]
mcr [.ALPHA]FILES_INFO.EXE [.ALPHA]FILES_INFO.EXE

FILE: ALP$DKC0:[UTILITY.SOURCE.FILES_INFO.files_info_030.source.ALPHA]FILES_INFO
.EXE;1
Total access count of 1, XQP access 1, writers 0, size 25/32

PID USERNAME READS WRITES ACCESS CHARACTERISTICS
-------- ------------ -------- -------- ----------------------
20215CEE SYSTEM 10 0 Read, Cathedral, Complete, Sequential
, NoWriteShr

WISP $ cc /vers
Compaq C V6.4-005 on OpenVMS VAX V7.3

WISP $ mms test

   Destination: [.VAX]

if (f$search( "VAX.DIR;1") .eqs. "") then create /directory [.VAX]
mcr [.VAX]FILES_INFO.EXE [.VAX]FILES_INFO.EXE

FILE: _WISP$DUA0:[UTILITY.SOURCE.FILES_INFO.FILES_INFO_030.SOURCE.VAX]FILES_INFO
.EXE;1
Total access count of 1, XQP access 1, writers 0, size 17/18

PID USERNAME READS WRITES ACCESS CHARACTERISTICS
-------- ------------ -------- -------- ----------------------
0000023A SYSTEM 9 0 Read, Cathedral, Complete, Sequential
, NoWriteShr

   The documentation still needs some work, so the following kit is
subject to change (without notice), but:

http://antinode.info/ftp/files_info/files_info-030/files_info-030_src.zip

   Complaints are always welcome.