Skip to main content
KathleenHambrick
Participating Frequently
Feb 7, 2023 2:27 PM UTC

LIST.READU

Being used to the Unidata format, when running this command in Universe the file the lock is in does not display. We have common keys across many files so the format of this tool is very unhelpful to us! Does anyone have the syntax, alternate command, or custom ditty that shows all the pertinent info for a lock at one time? IE login, date/time, file, ID, process ID, User ID?

Thanks for the help!

------------------------------
Kathleen Hambrick
Programmer at Colwell
------------------------------

    15 replies

    Mike Bojaczko
    Participating Frequently
    Feb 8, 2023 5:49 AM UTC
    Being used to the Unidata format, when running this command in Universe the file the lock is in does not display. We have common keys across many files so the format of this tool is very unhelpful to us! Does anyone have the syntax, alternate command, or custom ditty that shows all the pertinent info for a lock at one time? IE login, date/time, file, ID, process ID, User ID?

    Thanks for the help!

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    From TCL, LIST.READU EVERY DETAIL and PORT.STATUS as an admin user works well on Nix OS. The inode data can be used to find the actual filename that pertains to the key reported by LIST.READU. I use the OS find command with -inode parameter. If a parameter to one of those UV commands is not working, be sure the VOC has a record for that argument as found in the UV account VOC. PORT.STATUS gives at least one os process pid. I use the os ps -ef command and egrep to find the PORT STATUS Info such as pid,tty, and login name. The os last command shows some user details. To view os process environment variables, i use ps ewww | tr ' ' '\\n'  to view and format the output. I wonder if this forum has a code repo somewhere. Im sure all those commands could be bundled together to make a custom ditty. Good luck!




    ------------------------------
    Mike Bojaczko
    PROGRAMMER ANALYST
    US
    ------------------------------
    Jonathan Smith
    Rocketeer
    Feb 8, 2023 6:17 AM UTC
    Being used to the Unidata format, when running this command in Universe the file the lock is in does not display. We have common keys across many files so the format of this tool is very unhelpful to us! Does anyone have the syntax, alternate command, or custom ditty that shows all the pertinent info for a lock at one time? IE login, date/time, file, ID, process ID, User ID?

    Thanks for the help!

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Kathleen,

    This will not help you at the moment but starting at UniVerse 12 it apdopts the same lock structure and methodolgy as UniData.
    So at UniVerse 12 the output of LIST.READU is 

    >LIST.READU

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 977405710 C:\\u2\\UV\\ 2 14840 Jonatha LOGIN X Feb 8 09:39:01

    >LIST.READU DETAIL

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 281474977405710 C:\\u2\\UV\\HS.SALES\\VOC 2 14840 Jonathan LOGIN X Wed Fe
    b 8 09:39:01 2023

    >LIST.READU EVERY

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 977405710 C:\\u2\\UV\\ 2 14840 Jonatha LOGIN X Feb 8 09:39:01


    >LIST.READU EVERY DETAIL

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 281474977405710 C:\\u2\\UV\\HS.SALES\\VOC 2 14840 Jonathan LOGIN X Wed Fe
    b 8 09:39:01 2023

    You also have the option in UniVerse to add the word INTERNAL to get the information back in an array for processing in your own programs.

    >LIST.READU DETAIL INTERNAL
    2016955433ý281474977405710ýC:\\u2\\UV\\HS.SALES\\VOCý2ý14840ýJonathanýLOGINýXýWed Fe
    b 8 09:39:01 2023

    Also the uvglm_tool and uvulc_tool has been added to match the glm_tool and ulc_tool utlities in UniData.

    Prior to 12 you can use the following methods.

    >LIST.READU
    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    5768565761 176284 0 111 91 RU 21954800 root LOGIN

    You can search for the inode using find with the '-i' option, the example works quickly as the file is in the current directory.

    >sh -c "find . -i 176284"
    ./VOC

    You can also search the whole machine for files with matching inodes, this could take some time :-)

    >sh -c "cd / ; find . -i 176284 -print"
    ./disk1/uv1132/HS.SALES/VOC
    ./proc/21954800/fd/5
    ./proc/21954800/fd/10
    ./proc/21954800/fd/12

    UniVerse uses an internal method to calculate the device number it uses, I currently don't have a program that will work on all platforms to display which path maps to the device number, which you would need to shorten the method above and not having to search from root.

    The above methods work for UNIX, Windows is different again.

    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    Participating Frequently
    Feb 8, 2023 8:06 AM UTC
    Being used to the Unidata format, when running this command in Universe the file the lock is in does not display. We have common keys across many files so the format of this tool is very unhelpful to us! Does anyone have the syntax, alternate command, or custom ditty that shows all the pertinent info for a lock at one time? IE login, date/time, file, ID, process ID, User ID?

    Thanks for the help!

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------

    Hi Kathleen,

    We have from within SB Client, we run Universe on Windows, a utility that provides this

    this was written by K3 who provide  our ERP  this the definition
    The above executes a Paragraph, which in turn calls another Paragraph / s which have already grabbed some info from the standard LIST.READU -EVERY COMMAND
    I can't share the code as its subject to K3 copyright, but it does show what appears to be relatively simple process to grab all the info you ask for and present in a nice format.
    Perhaps our rocketeers could generate something similar ??
    I hope this helps 
    Thanks
    Andy


    ------------------------------
    Andrew Milne
    Business Systems Manager
    Potter and Moore Innovations
    Peterborough, Cambs GB
    ------------------------------
    KathleenHambrick
    Participating Frequently
    Feb 8, 2023 10:20 AM UTC
    Kathleen,

    This will not help you at the moment but starting at UniVerse 12 it apdopts the same lock structure and methodolgy as UniData.
    So at UniVerse 12 the output of LIST.READU is 

    >LIST.READU

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 977405710 C:\\u2\\UV\\ 2 14840 Jonatha LOGIN X Feb 8 09:39:01

    >LIST.READU DETAIL

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 281474977405710 C:\\u2\\UV\\HS.SALES\\VOC 2 14840 Jonathan LOGIN X Wed Fe
    b 8 09:39:01 2023

    >LIST.READU EVERY

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 977405710 C:\\u2\\UV\\ 2 14840 Jonatha LOGIN X Feb 8 09:39:01


    >LIST.READU EVERY DETAIL

    Active Locks:
    Device.... Inode.... FileName. UsrNo Pid.... LoginId ItemId... M LockTime.......
    2016955433 281474977405710 C:\\u2\\UV\\HS.SALES\\VOC 2 14840 Jonathan LOGIN X Wed Fe
    b 8 09:39:01 2023

    You also have the option in UniVerse to add the word INTERNAL to get the information back in an array for processing in your own programs.

    >LIST.READU DETAIL INTERNAL
    2016955433ý281474977405710ýC:\\u2\\UV\\HS.SALES\\VOCý2ý14840ýJonathanýLOGINýXýWed Fe
    b 8 09:39:01 2023

    Also the uvglm_tool and uvulc_tool has been added to match the glm_tool and ulc_tool utlities in UniData.

    Prior to 12 you can use the following methods.

    >LIST.READU
    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    5768565761 176284 0 111 91 RU 21954800 root LOGIN

    You can search for the inode using find with the '-i' option, the example works quickly as the file is in the current directory.

    >sh -c "find . -i 176284"
    ./VOC

    You can also search the whole machine for files with matching inodes, this could take some time :-)

    >sh -c "cd / ; find . -i 176284 -print"
    ./disk1/uv1132/HS.SALES/VOC
    ./proc/21954800/fd/5
    ./proc/21954800/fd/10
    ./proc/21954800/fd/12

    UniVerse uses an internal method to calculate the device number it uses, I currently don't have a program that will work on all platforms to display which path maps to the device number, which you would need to shorten the method above and not having to search from root.

    The above methods work for UNIX, Windows is different again.

    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    This is not working for me... I found a '-inum' option that looked equal to your '-i' but it does not seem to work...

    01 list.readu

    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    64770 19132140 0 95 169 RU 993343 kathleen BTIC100
    64770 19132140 0 95 169 RU 993343 kathleen FINISH.TICKET.1

    [root@ibm uv]# find . -inum 19132140
    [root@ibm uv]#

    ideas?


    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Jonathan Smith
    Rocketeer
    Feb 8, 2023 10:31 AM UTC
    This is not working for me... I found a '-inum' option that looked equal to your '-i' but it does not seem to work...

    01 list.readu

    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    64770 19132140 0 95 169 RU 993343 kathleen BTIC100
    64770 19132140 0 95 169 RU 993343 kathleen FINISH.TICKET.1

    [root@ibm uv]# find . -inum 19132140
    [root@ibm uv]#

    ideas?


    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    If you are on AIX you should be using 'find . -i nnnnnn'
    What OS are you using
    Also try doing LIST.READU INTERNAL to check to see if the LIST.READU output is being truncated.


    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    KathleenHambrick
    Participating Frequently
    Feb 8, 2023 10:48 AM UTC
    If you are on AIX you should be using 'find . -i nnnnnn'
    What OS are you using
    Also try doing LIST.READU INTERNAL to check to see if the LIST.READU output is being truncated.


    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    The internal command returns the same as without - no cutoff issue

    CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
    Kernel: Linux 4.18.0-425.10.1.el8_7.x86_64

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Neil Morris
    Rocketeer
    Feb 8, 2023 11:03 AM UTC
    The internal command returns the same as without - no cutoff issue

    CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
    Kernel: Linux 4.18.0-425.10.1.el8_7.x86_64

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Do you think the file exists in the current directory or in a sub directory from where the find command is being run? If so, it should find it. Maybe you need to run the command at a higher level to expand the search?

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    Jonathan Smith
    Rocketeer
    Feb 8, 2023 11:04 AM UTC
    The internal command returns the same as without - no cutoff issue

    CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
    Kernel: Linux 4.18.0-425.10.1.el8_7.x86_64

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Kathleen,

    I tested on one of our redhat systems and the -inum with find works (see below). Maybe you need to drop a line to your Linux Admin to see why it is not working.

    >LIST.READU

    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    2058 784223 0 2 5 RU 25251 root TIME
    2058 1045519 0 1 88 RU 25168 root LOGIN

    >sh -c "find . -inum 1045519"
    ./VOC

    >sh -c "uname -a"
    Linux dentrp 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x8
    6_64 x86_64 GNU/Linux
    >sh -c "uv -version"
    UniVerse 11.3.1


    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    Jonathan Smith
    Rocketeer
    Feb 8, 2023 11:07 AM UTC
    The internal command returns the same as without - no cutoff issue

    CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
    Kernel: Linux 4.18.0-425.10.1.el8_7.x86_64

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Kathlean,

    I just thought you may not get a result if the file doesn't exist in the current directory with 'find .' as it only works from the current directory down. If you want to search from the root file system down (as in my first response), it may take a while but try

    sh -c 'cd / ; find . -inum nnnnnnn'


    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    Mike Bojaczko
    Participating Frequently
    Feb 8, 2023 11:08 AM UTC
    Kathleen,

    I tested on one of our redhat systems and the -inum with find works (see below). Maybe you need to drop a line to your Linux Admin to see why it is not working.

    >LIST.READU

    Active Record Locks:
    Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID........
    .....
    2058 784223 0 2 5 RU 25251 root TIME
    2058 1045519 0 1 88 RU 25168 root LOGIN

    >sh -c "find . -inum 1045519"
    ./VOC

    >sh -c "uname -a"
    Linux dentrp 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x8
    6_64 x86_64 GNU/Linux
    >sh -c "uv -version"
    UniVerse 11.3.1


    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------
    Will "find /" instead of "find ." get it ?