This is a version of an expanded LIST.READU EVERY.
It changes the pid for the user name. Slight modifications can be made to
use replace the inode with the file name.
PID.ARRAY = '' ; ID.ARRAY = ''
EXECUTE "LISTU" CAPTURING EXEC.LINE.OUT
HEADER.LINE1 = TRIM(EXEC.LINE.OUT<2>)
HEADER.LINE2 = EXEC.LINE.OUT<4>
FOR A = 1 TO DCOUNT(EXEC.LINE.OUT,@AM)
LINE = TRIM(EXEC.LINE.OUT )
DISPLAY.LINE = EXEC.LINE.OUT
IF FIELD(LINE,' ',1) = "*" THEN
PID = FIELD(LINE,' ',3)
ID = FIELD(LINE,' ',4)
ID = FIELD(ID,"\",2)
END ELSE
PID = FIELD(LINE,' ',2)
ID = FIELD(LINE,' ',3)
ID = FIELD(ID,"\",2)
END
LOCATE PID IN PID.ARRAY SETTING PID.POS ELSE
PID.ARRAY = INSERT(PID.ARRAY,PID.POS,0,0,PID)
ID.ARRAY = INSERT(ID.ARRAY,PID.POS,0,0,ID)
END
NEXT A
EXECUTE "LIST.READU EVERY" CAPTURING EXEC.LINE.OUT
NUM.OF.LINES = DCOUNT(EXEC.LINE.OUT,@AM)
FOR A = 1 TO NUM.OF.LINES
LINE = EXEC.LINE.OUT
TRIM.LINE = TRIM(LINE)
IF NUM(TRIM.LINE[1,1]) THEN
USER.ID = FIELD(TRIM.LINE," ",4)
LOCATE USER.ID IN PID.ARRAY SETTING PID.POS THEN
NAME = ID.ARRAY<PID.POS>
END ELSE
NAME = USER.ID
END
LINE = CHANGE(LINE," ":USER.ID:" "," ":FMT(NAME,'20L'):" ")
END
PRINT LINE
NEXT A
Doug Chanco wrote:
>
> Hey all,
> Can someone please help me understand the differences between group
> locks and record locks? Also are high user numbers (Userno below)
> indicative of a phantom process?
>
>
> *Active Record Locks:
> Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID.....
> 3080194 3845801 0 137 6 RU 32694 crumjo 61570..5
>
> Active Group Locks: Record Group
> Group Group
> Device.... Inode.... Netnode Userno Lmode G-Address. Locks ...RD
> ...SH ...EX
> 3080194 328935 0 53 1 RD 935D800 0 1
> 0 0
>
> 3080194 389951 27 63180 2 RD E17000 0 1
> 0 0
>
> *
> one last question is there an easier way than finding out the file
> associated with the inode and then doing a fuser on that file to find
> out "what" is accessing the file? For example I would like to know
> who/what is holding this group lock
>
> * 3080194 389951 27 63180 2 RD E17000 0 1
> 0 0
>
> *yet all I have is an inode and a userno of 63180 DOING a LISTU does NOT
> show anything with that userno
>
> any and all assistance appreciated!
>
> thanks,
> dougc
>
>
>
> *
> *
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>
>
--
View this message in context:
http://www.nabble.com/group-locks-and-user-nbr%27s-tp18010061p18093258.html
Sent from the U2 - Users mailing list archive at Nabble.com.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/