lsof icon indicating copy to clipboard operation
lsof copied to clipboard

warning message not supressed in AIX

Open sanumesh opened this issue 4 years ago • 3 comments

Hello

In AIX, we still see the warning message related to Kernel ID check in spite of using the -w option

WARNING: compiled for AIX version 6.1.0.0; this is 7.2.0.0.

Solution : In dialects/aix/dproc.c Function : void ckkv(d, er, ev, ea)

The if (Fwarn) check is missing for AIX levels above 5.0.0.0

if AIXV<5000 ... if (Fwarn) return; else ... endif

sanumesh avatar Jan 19 '22 18:01 sanumesh

A pull request for the solution is welcome.

masatake avatar Mar 17 '22 19:03 masatake

i compiled lsof from master on aix 7.1 and for some reason could not reproduce the problem.

packagebuilder@aixbuildhostng: /home/packagebuilder/test/lsof # ./lsof -v
lsof version information:
    revision: 4.94.0
    latest revision: https://github.com/lsof-org/lsof
    latest FAQ: https://github.com/lsof-org/lsof/blob/master/00FAQ
    latest (non-formatted) man page: https://github.com/lsof-org/lsof/blob/master/Lsof.8
    configuration info: 64 bit kernel
    constructed by and on: packagebuilder@aixbuildhostng
    compiler: cc
    compiler version: IBM XL C for AIX, Version 13.1.3.7 ./lsof_Configure_tmp_10747960.c 04/27/22 09:29:58 (C)
    compiler flags: -DHASIPv6 -DHASSTAT64 -DHAS_JFS2 -I/home/packagebuilder/test/lsof/dialects/aix/aix5 -q64 -DAIX_KERNBITS=64 -DAIXA=1 -DAIXV=7100 -qmaxmem=-1 -DHAS_STRFTIME -DLSOF_VSTR="7.1.0.0" -O
    loader flags: -L./lib -llsof  -bnolibpath
    system info: AIX aixbuildhostng 1 7 00FB1A6B4C00 powerpc AIX
    Anyone can list all files.
    /dev warnings are enabled.
    Kernel ID check is enabled.
    Device cache file read-only paths:
        Named via -D: none
        Named in environment variable LSOFDEVCACHE: none
        Personal path format (HASPERSDC): "%h/%p.lsof_%L"
        Modified personal path environment variable: LSOFPERSDCPATH
        LSOFPERSDCPATH value: none
        Personal path: /home/packagebuilder/.lsof_aixbuildhostng
    Device cache file write paths:
        Named via -D: none
        Named in environment variable LSOFDEVCACHE: none
        Personal path format (HASPERSDC): "%h/%p.lsof_%L"
        Modified personal path environment variable: LSOFPERSDCPATH
        LSOFPERSDCPATH value: none
        Personal path: /home/packagebuilder/.lsof_aixbuildhostng

no warning message:

./lsof -w  +D /tmp | awk '{ print $9 }' | tail -n +2 | cut -d'/' -f3- | awk NF | sort | uniq
dpi_socket

edit: tested on a broader basis...the warning message comes up somewhat erratic, strange

flynn1973 avatar Apr 27 '22 13:04 flynn1973

@sanumesh

Solution : ...

A pull request is welcome.

masatake avatar Apr 27 '22 22:04 masatake