Re: [U2] Turn a device and inode into file name
Wrote this some years ago, so no guarantees either. Feel free to hack, spindle, mutilate. You just have to clear the STAT.FILE and make sure you run ACCOUNT.FILE.STATS ALL for (from?) every account on the system. I had no worries about putting the index back on the STAT.FILE, but it does rather ruin reporting on it, so you may decide a few seconds wait is better. I can't even remember why I had special handling of /ACC/COMMON/COMMON 001: PROGRAM SEELOCK 002: * Command to show locks, but displaying the file name rather than 003: * device and inode numbers. This requires STAT.FILE to be up to date. 004: * Author Keith Robert Johnson - Public Domain now 005: 006: SENTENCE = TRIM(@SENTENCE) 007: CONVERT ' ' TO @AM IN SENTENCE 008: WORD = UPCASE(SENTENCE<1>) 009: IF WORD EQ 'RUN' THEN 010: DEL SENTENCE<1> 011: DEL SENTENCE<1> 012: END 013: DEL SENTENCE<1> 014: THIS = SENTENCE<1> 015: 016: OPEN 'STAT.FILE' TO STAT.FILE ELSE STOP 201,'STAT.FILE' 017: READ THING FROM STAT.FILE,'THING' ELSE 018: THING = '' 019: SELECT STAT.FILE 020: LOOP WHILE READNEXT ID DO 021:READ REC FROM STAT.FILE,ID ELSE CONTINUE 022:NAME = REC<2> 023:THAT = (REC<8> 'R#10'):(REC<7> 'R#10') 024:LOCATE(THAT,THING,1;POSN;'AR') ELSE 025: INS THAT BEFORE THING<1,POSN> 026: INS NAME BEFORE THING<2,POSN> 027:END 028: REPEAT 029: WRITE THING ON STAT.FILE,'THING' 030: END 031: EXECUTE 'LIST.READU EVERY' CAPTURING JUNK 032: XXCNT = DCOUNT(JUNK,@AM) 033: FOR XX = 1 TO XXCNT 034: LINE = JUNK 035: THAT = LINE[1,20] 036: LOCATE(THAT,THING,1;POSN) THEN 037:NAME = THING<2,POSN> 038: END ELSE 039:IF LINE EQ '' OR LINE[1,1] # ' ' THEN CRT LINE; CONTINUE 040:NAME = THAT 041: END 042: IF NAME # '/ACC/COMMON/COMMON' OR THIS # '' THEN 043:IF LEN(NAME) < 25 THEN NAME = NAME 'L#25' 044:LINE = NAME:LINE[26,99] 045:IF THIS THEN 046: IF INDEX(LINE,THIS,1) THEN CRT LINE 047:END ELSE CRT LINE 048: END 049: NEXT XX Regards, Keith ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
You can also use UniAdmin. That will show the file name as well. On 17/03/2012 17:12, dia...@aptron.com wrote: Thanks!!! Quoting Charles Stevenson: Diane - Here's a short LIST.READU envelope that replaces dev/inode with filenames. Look up these UV-supplied tools that tie device& Inode to the filename: ACCOUNT.FILE.STATS LIST.FILE.STATS STAT.FILE UNIVERSE.STAT.FILE It relies on regularly running ACCOUNT.FILE.STATS to keep STAT.FILE up to date. I added an index to UV's vanilla STAT.FILE and use it to extract the filename. See lines 3& 30: 01: PROGRAM SHOW.READU 02: * Abbreviated LIST.READU, but with filenames replacing device/inode. 03: * Relies on indexed I-desc DICT STAT.FILE INODE.DEV: FILEINODE:".":FILEDEV 04: 05: $COPYRIGHT (c) 2012 Charles D. Stevenson. Permission to use with attribution granted. 06: $OPTIONS DEFAULT 07: 08: SENTENCE.OPTS = @SENTENCE[' ',2, 999 ] 09: BEGIN CASE 10: CASE NOT( LEN( SENTENCE.OPTS )) ; * usual case 11: EXECUTE 'LIST.READU EVERY' CAPTURING LRDU 12: LOOP ; * ignore Group lock section 13: UNTIL REMOVE( LRDU, MORE) = "Active Record Locks:" 14: WHILE MORE 15: REPEAT 16: CRT "Active Record Locks:" 17: CASE SENTENCE.OPTS = "SIMPLE" ; * LIST.READU's default 18: EXECUTE 'LIST.READU' CAPTURING LRDU 19: CASE @TRUE ; l * any valid LIST.READU syntax 20: EXECUTE 'LIST.READU ': SENTENCE.OPTS CAPTURING LRDU 21: END CASE 22: OPEN 'STAT.FILE' TO F.STAT ELSE STOP 201, 'STAT.FILE' 23: MORE = @TRUE 24: LOOP WHILE MORE 25: LINE = REMOVE( LRDU, MORE ) 26: TRIMMED = TRIM( LINE ) 27: DEV = TRIMMED[ ' ', 1, 1 ] 28: INODE = TRIMMED[ ' ', 2, 1 ] 29: IF LEN( DEV ) ! LEN( INODE ) THEN 30: SELECTINDEX 'INODE.DEV', INODE:'.':DEV FROM F.STAT TO 9 31: READNEXT STAT.ID FROM 9 THEN 32:READV FILENAME FROM F.STAT, STAT.ID, 1 THEN 33: LINE[1,29] = FILENAME '29.L#29' 34:END 35: END 36: END 37: CRT LINE 38: REPEAT 39: RETURN 40:END Catalogue it& run as a verb. Contact me if you have questions. cds On 3/16/2012 6:03 PM, dia...@aptron.com wrote: I swear I wrote a new version of LIST.READU at one time where I dealt with this and listed the file where the item was locked, but I can't find it anywhere. And now, of course, I'm obsessed with finding it. If I find it I'll post it. -Dianne ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Thanks!!! Quoting Charles Stevenson : > Diane - > > Here's a short LIST.READU envelope that replaces dev/inode with filenames. > > Look up these UV-supplied tools that tie device & Inode to the filename: > ACCOUNT.FILE.STATS > LIST.FILE.STATS > STAT.FILE > UNIVERSE.STAT.FILE > > It relies on regularly running ACCOUNT.FILE.STATS to keep STAT.FILE up > to date. > I added an index to UV's vanilla STAT.FILE and use it to extract the > filename. > See lines 3 & 30: > > 01: PROGRAM SHOW.READU > 02: * Abbreviated LIST.READU, but with filenames replacing device/inode. > 03: * Relies on indexed I-desc DICT STAT.FILE INODE.DEV: > FILEINODE:".":FILEDEV > 04: > 05: $COPYRIGHT (c) 2012 Charles D. Stevenson. Permission to use with > attribution granted. > 06: $OPTIONS DEFAULT > 07: > 08: SENTENCE.OPTS = @SENTENCE[' ',2, 999 ] > 09: BEGIN CASE > 10: CASE NOT( LEN( SENTENCE.OPTS )) ; * usual case > 11: EXECUTE 'LIST.READU EVERY' CAPTURING LRDU > 12: LOOP ; * ignore Group lock section > 13: UNTIL REMOVE( LRDU, MORE) = "Active Record Locks:" > 14: WHILE MORE > 15: REPEAT > 16: CRT "Active Record Locks:" > 17: CASE SENTENCE.OPTS = "SIMPLE" ; * LIST.READU's default > 18: EXECUTE 'LIST.READU' CAPTURING LRDU > 19: CASE @TRUE ; l * any valid LIST.READU syntax > 20: EXECUTE 'LIST.READU ': SENTENCE.OPTS CAPTURING LRDU > 21: END CASE > 22: OPEN 'STAT.FILE' TO F.STAT ELSE STOP 201, 'STAT.FILE' > 23: MORE = @TRUE > 24: LOOP WHILE MORE > 25: LINE = REMOVE( LRDU, MORE ) > 26: TRIMMED = TRIM( LINE ) > 27: DEV = TRIMMED[ ' ', 1, 1 ] > 28: INODE = TRIMMED[ ' ', 2, 1 ] > 29: IF LEN( DEV ) ! LEN( INODE ) THEN > 30: SELECTINDEX 'INODE.DEV', INODE:'.':DEV FROM F.STAT TO 9 > 31: READNEXT STAT.ID FROM 9 THEN > 32:READV FILENAME FROM F.STAT, STAT.ID, 1 THEN > 33: LINE[1,29] = FILENAME '29.L#29' > 34:END > 35: END > 36: END > 37: CRT LINE > 38: REPEAT > 39: RETURN > 40:END > > Catalogue it & run as a verb. > Contact me if you have questions. > > cds > > On 3/16/2012 6:03 PM, dia...@aptron.com wrote: > > I swear I wrote a new version of LIST.READU at one time where I dealt > > with this and listed the file where the item was locked, but I can't > > find it anywhere. And now, of course, I'm obsessed with finding it. If > > I find it I'll post it. -Dianne > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Better yet, write an i-descriptor-friendly function to extract STATUS & FILEINFO info, then use it in DICT VOC I-descripters to use with SELECT & LIST directly. On 3/16/2012 5:00 PM, LeRoy Dreyfuss wrote: A program that uses either the FILEINFO() function or the STATUS statement will produce what you need, and should work cross-platform. Select against the VOC and filter out what you don't need, i.e. remote files, Q-pointers etc. Regards, LeRoy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Diane - Here's a short LIST.READU envelope that replaces dev/inode with filenames. Look up these UV-supplied tools that tie device & Inode to the filename: ACCOUNT.FILE.STATS LIST.FILE.STATS STAT.FILE UNIVERSE.STAT.FILE It relies on regularly running ACCOUNT.FILE.STATS to keep STAT.FILE up to date. I added an index to UV's vanilla STAT.FILE and use it to extract the filename. See lines 3 & 30: 01: PROGRAM SHOW.READU 02: * Abbreviated LIST.READU, but with filenames replacing device/inode. 03: * Relies on indexed I-desc DICT STAT.FILE INODE.DEV: FILEINODE:".":FILEDEV 04: 05: $COPYRIGHT (c) 2012 Charles D. Stevenson. Permission to use with attribution granted. 06: $OPTIONS DEFAULT 07: 08: SENTENCE.OPTS = @SENTENCE[' ',2, 999 ] 09: BEGIN CASE 10: CASE NOT( LEN( SENTENCE.OPTS )) ; * usual case 11: EXECUTE 'LIST.READU EVERY' CAPTURING LRDU 12: LOOP ; * ignore Group lock section 13: UNTIL REMOVE( LRDU, MORE) = "Active Record Locks:" 14: WHILE MORE 15: REPEAT 16: CRT "Active Record Locks:" 17: CASE SENTENCE.OPTS = "SIMPLE" ; * LIST.READU's default 18: EXECUTE 'LIST.READU' CAPTURING LRDU 19: CASE @TRUE ; l * any valid LIST.READU syntax 20: EXECUTE 'LIST.READU ': SENTENCE.OPTS CAPTURING LRDU 21: END CASE 22: OPEN 'STAT.FILE' TO F.STAT ELSE STOP 201, 'STAT.FILE' 23: MORE = @TRUE 24: LOOP WHILE MORE 25: LINE = REMOVE( LRDU, MORE ) 26: TRIMMED = TRIM( LINE ) 27: DEV = TRIMMED[ ' ', 1, 1 ] 28: INODE = TRIMMED[ ' ', 2, 1 ] 29: IF LEN( DEV ) ! LEN( INODE ) THEN 30: SELECTINDEX 'INODE.DEV', INODE:'.':DEV FROM F.STAT TO 9 31: READNEXT STAT.ID FROM 9 THEN 32:READV FILENAME FROM F.STAT, STAT.ID, 1 THEN 33: LINE[1,29] = FILENAME '29.L#29' 34:END 35: END 36: END 37: CRT LINE 38: REPEAT 39: RETURN 40:END Catalogue it & run as a verb. Contact me if you have questions. cds On 3/16/2012 6:03 PM, dia...@aptron.com wrote: I swear I wrote a new version of LIST.READU at one time where I dealt with this and listed the file where the item was locked, but I can't find it anywhere. And now, of course, I'm obsessed with finding it. If I find it I'll post it. -Dianne ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Only if you run it on the device to which that inode refers. If you run it on another device, you won't get a valid response. In order to know how to get *to* the device in question, you have to already know to what account it refers. That's circular. The point is, in the List Locks you do not know the account to which a device refers, or the account to which an inode refers. All you know is, the device and the inode. So how do you know how to access the device on which to run the process, when all you have is the device number, and you do not know in what account to run your process? -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 5:25 pm Subject: Re: [U2] Turn a device and inode into file name *I* can assume because in our environment there is one production ccount on one device. I wasn't suggesting that this specific utility ould be of any use in any other environments, only that the underlying S-level command could be used in a similar way to translate an inode nto a file name. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 5:14 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name he lock table spans all accounts. o list the file associated with any particular lock, you have to span ll devices, not just a device. ou can't assume that you know the account in which a locked inode esides. -Original Message- rom: John Hester o: U2 Users List ent: Fri, Mar 16, 2012 5:10 pm ubject: Re: [U2] Turn a device and inode into file name f you execute "ls -i" from within UV, it's going to list the files in e directory where the account you're sitting in resides. My code ample isn't written to be able to switch devices because that's of no e to me in the context of listing locked production files in our vironment. If you want to write a utility that executes "ls -i" on ny evice, that's fairly trivial and there are numerous ways you could o t. Just write some code to get the correct path into a variable by atever means you prefer and tack it on to the end of the command. John Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Friday, March 16, 2012 4:47 PM : u2-users@listserver.u2ug.org bject: Re: [U2] Turn a device and inode into file name he provided code does not specify a device, so how can you select a vice even if you know it? doesn't seem to be changing devices -Original Message- om: John Hester : U2 Users List nt: Fri, Mar 16, 2012 4:41 pm bject: Re: [U2] Turn a device and inode into file name t works fine if you have multiple devices because you can only run it inst one account and one device at a time. "ls -i" doesn't span ectory hierarchies or devices. You do at least have to know what vice he file in question is on, but if you don't know that there's no ol hat will reliably work for you. ohn ---Original Message- m: u2-users-boun...@listserver.u2ug.org ilto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson t: Friday, March 16, 2012 3:43 PM u2-users@listserver.u2ug.org ject: Re: [U2] Turn a device and inode into file name This only works f ou have a single device, since the inode is not nique cross-device, nly nique on a device -Original Message----- m: John Hester U2 Users List t: Fri, Mar 16, 2012 3:25 pm ject: Re: [U2] Turn a device and inode into file name have a utility amed FLIST.READU that replaces the inode from the ndard LIST.READU utput with the file name. It uses "ls -i", so it's ited to files in he account you run the command from, though. Works e for us because ll of our users work out of the same account. This he relevant part of he code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' s also pretty resource intensive because it re-lists the entire count r every inode. Probably not much of an issue if your hardware fairly w. hn --Original Message----- : u2-users-boun...@listserver.u2ug.org lto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson : Friday, March 16, 2012 12:24 PM u2-users@listserver.u2ug.org ect: [U2] Turn a device and inode into file name nyone have an easy ay o do this? he past I've run a batch routine to just query each and every niverse e for it's inode and device and build a table of these Every week s like a great amount of overkill to me. could also mod the CREATE-FILE command to sniff it and make an xref ry ut suggestions? is NOT for the case where you know the file and want
Re: [U2] Turn a device and inode into file name
*I* can assume because in our environment there is one production account on one device. I wasn't suggesting that this specific utility would be of any use in any other environments, only that the underlying OS-level command could be used in a similar way to translate an inode into a file name. -John -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 5:14 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Turn a device and inode into file name The lock table spans all accounts. To list the file associated with any particular lock, you have to span all devices, not just a device. You can't assume that you know the account in which a locked inode resides. -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 5:10 pm Subject: Re: [U2] Turn a device and inode into file name If you execute "ls -i" from within UV, it's going to list the files in he directory where the account you're sitting in resides. My code xample isn't written to be able to switch devices because that's of no se to me in the context of listing locked production files in our nvironment. If you want to write a utility that executes "ls -i" on ny device, that's fairly trivial and there are numerous ways you could o it. Just write some code to get the correct path into a variable by hatever means you prefer and tack it on to the end of the command. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 4:47 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name he provided code does not specify a device, so how can you select a evice even if you know it? t doesn't seem to be changing devices -Original Message- rom: John Hester o: U2 Users List ent: Fri, Mar 16, 2012 4:41 pm ubject: Re: [U2] Turn a device and inode into file name t works fine if you have multiple devices because you can only run it ainst one account and one device at a time. "ls -i" doesn't span rectory hierarchies or devices. You do at least have to know what vice the file in question is on, but if you don't know that there's no ol that will reliably work for you. John Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Friday, March 16, 2012 3:43 PM : u2-users@listserver.u2ug.org bject: Re: [U2] Turn a device and inode into file name This only works f you have a single device, since the inode is not nique cross-device, nly unique on a device -Original Message- om: John Hester : U2 Users List nt: Fri, Mar 16, 2012 3:25 pm bject: Re: [U2] Turn a device and inode into file name have a utility named FLIST.READU that replaces the inode from the ndard LIST.READU output with the file name. It uses "ls -i", so it's ited to files in the account you run the command from, though. Works e for us because all of our users work out of the same account. This he relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' 's also pretty resource intensive because it re-lists the entire count or every inode. Probably not much of an issue if your hardware fairly ew. ohn ---Original Message----- m: u2-users-boun...@listserver.u2ug.org ilto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson t: Friday, March 16, 2012 12:24 PM u2-users@listserver.u2ug.org ject: [U2] Turn a device and inode into file name nyone have an easy ay to do this? the past I've run a batch routine to just query each and every niverse le for it's inode and device and build a table of these Every week ms like a great amount of overkill to me. could also mod the CREATE-FILE command to sniff it and make an xref ry but y suggestions? s is NOT for the case where you know the file and want to find the ode nd device It's for the case where you know the inode and device ly) and want to find the file. Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp:/
Re: [U2] Turn a device and inode into file name
The lock table spans all accounts. To list the file associated with any particular lock, you have to span all devices, not just a device. You can't assume that you know the account in which a locked inode resides. -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 5:10 pm Subject: Re: [U2] Turn a device and inode into file name If you execute "ls -i" from within UV, it's going to list the files in he directory where the account you're sitting in resides. My code xample isn't written to be able to switch devices because that's of no se to me in the context of listing locked production files in our nvironment. If you want to write a utility that executes "ls -i" on ny device, that's fairly trivial and there are numerous ways you could o it. Just write some code to get the correct path into a variable by hatever means you prefer and tack it on to the end of the command. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 4:47 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name he provided code does not specify a device, so how can you select a evice even if you know it? t doesn't seem to be changing devices -Original Message- rom: John Hester o: U2 Users List ent: Fri, Mar 16, 2012 4:41 pm ubject: Re: [U2] Turn a device and inode into file name t works fine if you have multiple devices because you can only run it ainst one account and one device at a time. "ls -i" doesn't span rectory hierarchies or devices. You do at least have to know what vice the file in question is on, but if you don't know that there's no ol that will reliably work for you. John Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Friday, March 16, 2012 3:43 PM : u2-users@listserver.u2ug.org bject: Re: [U2] Turn a device and inode into file name This only works f you have a single device, since the inode is not nique cross-device, nly unique on a device -Original Message----- om: John Hester : U2 Users List nt: Fri, Mar 16, 2012 3:25 pm bject: Re: [U2] Turn a device and inode into file name have a utility named FLIST.READU that replaces the inode from the ndard LIST.READU output with the file name. It uses "ls -i", so it's ited to files in the account you run the command from, though. Works e for us because all of our users work out of the same account. This he relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' 's also pretty resource intensive because it re-lists the entire count or every inode. Probably not much of an issue if your hardware fairly ew. ohn ---Original Message- m: u2-users-boun...@listserver.u2ug.org ilto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson t: Friday, March 16, 2012 12:24 PM u2-users@listserver.u2ug.org ject: [U2] Turn a device and inode into file name nyone have an easy ay to do this? the past I've run a batch routine to just query each and every niverse le for it's inode and device and build a table of these Every week ms like a great amount of overkill to me. could also mod the CREATE-FILE command to sniff it and make an xref ry but y suggestions? s is NOT for the case where you know the file and want to find the ode nd device It's for the case where you know the inode and device ly) and want to find the file. Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users Users mailing list us...@listserver.u2ug.org p://listserver.u2ug.org/mailman/listinfo/u2-users __ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
If you execute "ls -i" from within UV, it's going to list the files in the directory where the account you're sitting in resides. My code example isn't written to be able to switch devices because that's of no use to me in the context of listing locked production files in our environment. If you want to write a utility that executes "ls -i" on any device, that's fairly trivial and there are numerous ways you could do it. Just write some code to get the correct path into a variable by whatever means you prefer and tack it on to the end of the command. -John -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 4:47 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Turn a device and inode into file name The provided code does not specify a device, so how can you select a device even if you know it? It doesn't seem to be changing devices -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 4:41 pm Subject: Re: [U2] Turn a device and inode into file name It works fine if you have multiple devices because you can only run it gainst one account and one device at a time. "ls -i" doesn't span irectory hierarchies or devices. You do at least have to know what evice the file in question is on, but if you don't know that there's no ool that will reliably work for you. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 3:43 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name This only works if you have a single device, since the inode is not nique cross-device, only unique on a device -Original Message- rom: John Hester o: U2 Users List ent: Fri, Mar 16, 2012 3:25 pm ubject: Re: [U2] Turn a device and inode into file name have a utility named FLIST.READU that replaces the inode from the andard LIST.READU output with the file name. It uses "ls -i", so it's mited to files in the account you run the command from, though. Works ne for us because all of our users work out of the same account. This the relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' t's also pretty resource intensive because it re-lists the entire count for every inode. Probably not much of an issue if your hardware fairly new. John Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Friday, March 16, 2012 12:24 PM : u2-users@listserver.u2ug.org bject: [U2] Turn a device and inode into file name nyone have an easy way to do this? the past I've run a batch routine to just query each and every niverse ile for it's inode and device and build a table of these Every week ems like a great amount of overkill to me. u could also mod the CREATE-FILE command to sniff it and make an xref try but ny suggestions? is is NOT for the case where you know the file and want to find the ode and device It's for the case where you know the inode and device nly) and want to find the file. _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
The provided code does not specify a device, so how can you select a device even if you know it? It doesn't seem to be changing devices -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 4:41 pm Subject: Re: [U2] Turn a device and inode into file name It works fine if you have multiple devices because you can only run it gainst one account and one device at a time. "ls -i" doesn't span irectory hierarchies or devices. You do at least have to know what evice the file in question is on, but if you don't know that there's no ool that will reliably work for you. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 3:43 PM o: u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name This only works if you have a single device, since the inode is not nique cross-device, only unique on a device -Original Message- rom: John Hester o: U2 Users List ent: Fri, Mar 16, 2012 3:25 pm ubject: Re: [U2] Turn a device and inode into file name have a utility named FLIST.READU that replaces the inode from the andard LIST.READU output with the file name. It uses "ls -i", so it's mited to files in the account you run the command from, though. Works ne for us because all of our users work out of the same account. This the relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' t's also pretty resource intensive because it re-lists the entire count for every inode. Probably not much of an issue if your hardware fairly new. John Original Message- om: u2-users-boun...@listserver.u2ug.org ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson nt: Friday, March 16, 2012 12:24 PM : u2-users@listserver.u2ug.org bject: [U2] Turn a device and inode into file name nyone have an easy way to do this? the past I've run a batch routine to just query each and every niverse ile for it's inode and device and build a table of these Every week ems like a great amount of overkill to me. u could also mod the CREATE-FILE command to sniff it and make an xref try but ny suggestions? is is NOT for the case where you know the file and want to find the ode and device It's for the case where you know the inode and device nly) and want to find the file. _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
It works fine if you have multiple devices because you can only run it against one account and one device at a time. "ls -i" doesn't span directory hierarchies or devices. You do at least have to know what device the file in question is on, but if you don't know that there's no tool that will reliably work for you. -John -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 3:43 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Turn a device and inode into file name This only works if you have a single device, since the inode is not unique cross-device, only unique on a device -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 3:25 pm Subject: Re: [U2] Turn a device and inode into file name I have a utility named FLIST.READU that replaces the inode from the tandard LIST.READU output with the file name. It uses "ls -i", so it's imited to files in the account you run the command from, though. Works ine for us because all of our users work out of the same account. This s the relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' It's also pretty resource intensive because it re-lists the entire ccount for every inode. Probably not much of an issue if your hardware s fairly new. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 12:24 PM o: u2-users@listserver.u2ug.org ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every niverse file for it's inode and device and build a table of these Every week eems like a great amount of overkill to me. ou could also mod the CREATE-FILE command to sniff it and make an xref ntry but Any suggestions? his is NOT for the case where you know the file and want to find the node and device It's for the case where you know the inode and device only) and want to find the file. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Oops I misread your reply. So you select all the files and run this, and you loop that on every account I suppose. How do you deal with files which are not referenced as "F" types ? -Original Message- From: Buss, Troy (Logitek Systems) (Logitek Systems) To: U2 Users List Sent: Fri, Mar 16, 2012 3:47 pm Subject: Re: [U2] Turn a device and inode into file name We use the following subroutine. Pass in the filename in variable FNAME. In he mainline is 'THIS.ACCOUNT' and of course the F.FILESTATS.XREF file variable. We then use this information in our expanded record locks display so that we can how real file names. UPDATE.XREF: *;* RT "Building item lock xref... ": PEN FNAME TO F.CHECK ELSE CRT "CANNOT OPEN: ":FNAME RETURN ND TATUS STATUS.INFO FROM F.CHECK THEN DEVICE = STATUS.INFO<11> XREF.ITEM = AM:THIS.ACCOUNT:"*":FNAME WRITE XREF.ITEM ON F.FILESTATS.XREF, DEVICE ND LOSE F.CHECK ETURN * Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Friday, March 16, 2012 12:24 PM o: u2-users@listserver.u2ug.org ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every Universe file or it's inode and device and build a table of these _ canned by IBM Email Security Management Services powered by MessageLabs. For ore information please visit http://www.ers.ibm.com This email is intended only for the use of the party to which it is addressed nd may contain information that is privileged, confidential, or protected by aw. If you are not the intended recipient you are hereby notified that any issemination, copying or distribution of the email or its contents is strictly rohibited. If you have received this message in error, please notify us mmediately, by replying to the message and deleting it from your computer. WARNING: Internet communications are not assured to be secure or clear of naccuracies as information could be intercepted, corrupted, lost, destroyed, rrive late or incomplete, or contain viruses. Therefore, we do not accept esponsibility for any errors or omissions that are present in this email, or ny attachment, that have arisen as a result of e-mail transmission. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
In my case, you do not know the filename. The only thing you know is the Inode and Device. The task is to *find* the filename based on knowing only the Inode and Device -Original Message- From: Buss, Troy (Logitek Systems) (Logitek Systems) To: U2 Users List Sent: Fri, Mar 16, 2012 3:47 pm Subject: Re: [U2] Turn a device and inode into file name We use the following subroutine. Pass in the filename in variable FNAME. In he mainline is 'THIS.ACCOUNT' and of course the F.FILESTATS.XREF file variable. We then use this information in our expanded record locks display so that we can how real file names. UPDATE.XREF: *;* RT "Building item lock xref... ": PEN FNAME TO F.CHECK ELSE CRT "CANNOT OPEN: ":FNAME RETURN ND TATUS STATUS.INFO FROM F.CHECK THEN DEVICE = STATUS.INFO<11> XREF.ITEM = AM:THIS.ACCOUNT:"*":FNAME WRITE XREF.ITEM ON F.FILESTATS.XREF, DEVICE ND LOSE F.CHECK ETURN * Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Friday, March 16, 2012 12:24 PM o: u2-users@listserver.u2ug.org ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every Universe file or it's inode and device and build a table of these _ canned by IBM Email Security Management Services powered by MessageLabs. For ore information please visit http://www.ers.ibm.com This email is intended only for the use of the party to which it is addressed nd may contain information that is privileged, confidential, or protected by aw. If you are not the intended recipient you are hereby notified that any issemination, copying or distribution of the email or its contents is strictly rohibited. If you have received this message in error, please notify us mmediately, by replying to the message and deleting it from your computer. WARNING: Internet communications are not assured to be secure or clear of naccuracies as information could be intercepted, corrupted, lost, destroyed, rrive late or incomplete, or contain viruses. Therefore, we do not accept esponsibility for any errors or omissions that are present in this email, or ny attachment, that have arisen as a result of e-mail transmission. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
I swear I wrote a new version of LIST.READU at one time where I dealt with this and listed the file where the item was locked, but I can't find it anywhere. And now, of course, I'm obsessed with finding it. If I find it I'll post it. -Dianne Quoting Wjhonson : > > It seems like an "on the fly" scan across all possible filesystems would be > really slow. > I can't see how you can escape having a cross reference that gets rebuilt > periodically. > No one is going to want to wait a minute in interactive mode for a response. > No one else has encountered the issue that you can't tell what file a lock is > being set on? > Some people can tell from the key I suppose, at time, but many files can > share a similar key. > It seems odd to me, that after twenty years, we still have this issue in > Universe. > > > > -Original Message- > From: George Gallen > To: U2 Users List > Sent: Fri, Mar 16, 2012 1:46 pm > Subject: Re: [U2] Turn a device and inode into file name > > > As far as I understood, no, they are unique only to their device, so you > could > ave multiple files > ith the same inode in different filesystems. > > Original Message- > rom: u2-users-boun...@listserver.u2ug.org > [mailto:u2-users-boun...@listserver.u2ug.org] > n Behalf Of Wjhonson > ent: Friday, March 16, 2012 4:44 PM > o: donr_w...@yahoo.com; u2-users@listserver.u2ug.org > ubject: Re: [U2] Turn a device and inode into file name > Are inodes unique across all devices? I was under the impression that they > were > ot, and therefore you need both for a unique correspondence > > -----Original Message- > rom: Don Robinson > o: U2 Users List > ent: Fri, Mar 16, 2012 12:58 pm > ubject: Re: [U2] Turn a device and inode into file name > > ry "ls -li |grep inode#" in the directory where the file is likley to be or > s -liR / |grep inode#" to look everythere. > ou may need root permissions to check some files. > O warranty! > on Robinson > rom: Wjhonson > : u2-users@listserver.u2ug.org > nt: Friday, March 16, 2012 3:23 PM > bject: [U2] Turn a device and inode into file name > nyone have an easy way to do this? > the past I've run a batch routine to just query each and every Universe file > > r it's inode and device and build a table of these > very week > ems like a great amount of overkill to me. > u could also mod the CREATE-FILE command to sniff it and make an xref entry > t > ny suggestions? > is is NOT for the case where you know the file and want to find the inode and > > vice > 's for the case where you know the inode and device (only) and want to find > e file. > _ > -Users mailing list > -us...@listserver.u2ug.org > tp://listserver.u2ug.org/mailman/listinfo/u2-users > _ > -Users mailing list > -us...@listserver.u2ug.org > tp://listserver.u2ug.org/mailman/listinfo/u2-users > ___ > 2-Users mailing list > 2-us...@listserver.u2ug.org > ttp://listserver.u2ug.org/mailman/listinfo/u2-users > __ > 2-Users mailing list > 2-us...@listserver.u2ug.org > ttp://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
We use the following subroutine. Pass in the filename in variable FNAME. In the mainline is 'THIS.ACCOUNT' and of course the F.FILESTATS.XREF file variable. We then use this information in our expanded record locks display so that we can show real file names. UPDATE.XREF: *;* * CRT "Building item lock xref... ": * OPEN FNAME TO F.CHECK ELSE CRT "CANNOT OPEN: ":FNAME RETURN END * STATUS STATUS.INFO FROM F.CHECK THEN DEVICE = STATUS.INFO<11> XREF.ITEM = AM:THIS.ACCOUNT:"*":FNAME WRITE XREF.ITEM ON F.FILESTATS.XREF, DEVICE END * CLOSE F.CHECK * RETURN * -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 12:24 PM To: u2-users@listserver.u2ug.org Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these _ Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of the email or its contents is strictly prohibited. If you have received this message in error, please notify us immediately, by replying to the message and deleting it from your computer. WARNING: Internet communications are not assured to be secure or clear of inaccuracies as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this email, or any attachment, that have arisen as a result of e-mail transmission. _ ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
This only works if you have a single device, since the inode is not unique cross-device, only unique on a device -Original Message- From: John Hester To: U2 Users List Sent: Fri, Mar 16, 2012 3:25 pm Subject: Re: [U2] Turn a device and inode into file name I have a utility named FLIST.READU that replaces the inode from the tandard LIST.READU output with the file name. It uses "ls -i", so it's imited to files in the account you run the command from, though. Works ine for us because all of our users work out of the same account. This s the relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' It's also pretty resource intensive because it re-lists the entire ccount for every inode. Probably not much of an issue if your hardware s fairly new. -John -Original Message- rom: u2-users-boun...@listserver.u2ug.org mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson ent: Friday, March 16, 2012 12:24 PM o: u2-users@listserver.u2ug.org ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every niverse file for it's inode and device and build a table of these Every week eems like a great amount of overkill to me. ou could also mod the CREATE-FILE command to sniff it and make an xref ntry but Any suggestions? his is NOT for the case where you know the file and want to find the node and device It's for the case where you know the inode and device only) and want to find the file. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
The file could be in any account, so you'd have to expand this to select every file in every account -Original Message- From: LeRoy Dreyfuss To: U2 Users List Sent: Fri, Mar 16, 2012 3:00 pm Subject: Re: [U2] Turn a device and inode into file name A program that uses either the FILEINFO() function or the STATUS statement will roduce what you need, and should work cross-platform. Select against the VOC nd filter out what you don't need, i.e. remote files, Q-pointers etc. Regards, LeRoy ent from my iPhone 4 On Mar 16, 2012, at 3:23 PM, Wjhonson wrote: > Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe ile for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry ut Any suggestions? This is NOT for the case where you know the file and want to find the inode nd device It's for the case where you know the inode and device (only) and want to find he file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
I have a utility named FLIST.READU that replaces the inode from the standard LIST.READU output with the file name. It uses "ls -i", so it's limited to files in the account you run the command from, though. Works fine for us because all of our users work out of the same account. This is the relevant part of the code: INODE.NO = TRIM(READU.ARRAY) EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME IF FILENAME<1,1,1> # '' THEN FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8' It's also pretty resource intensive because it re-lists the entire account for every inode. Probably not much of an issue if your hardware is fairly new. -John -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 12:24 PM To: u2-users@listserver.u2ug.org Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
A program that uses either the FILEINFO() function or the STATUS statement will produce what you need, and should work cross-platform. Select against the VOC and filter out what you don't need, i.e. remote files, Q-pointers etc. Regards, LeRoy Sent from my iPhone 4 On Mar 16, 2012, at 3:23 PM, Wjhonson wrote: > > Anyone have an easy way to do this? > In the past I've run a batch routine to just query each and every Universe > file for it's inode and device and build a table of these > > Every week > Seems like a great amount of overkill to me. > You could also mod the CREATE-FILE command to sniff it and make an xref entry > but > > Any suggestions? > This is NOT for the case where you know the file and want to find the inode > and device > It's for the case where you know the inode and device (only) and want to find > the file. > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Just thinking, you could also add a modification time to the find, (if your doing xrefs), and only Reindex those files that have been changed (or created) since the last time you ran it? If you Use the device and inode as key in your xref, it will overwrite any deleted files where the inode Is re-used. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Friday, March 16, 2012 5:23 PM To: U2 Users List Subject: Re: [U2] Turn a device and inode into file name I did a couple tests using: find (device) -xdev -inode # -print And it wasn't too much of a delay (instant to few seconds) George Other than that I just ran the following (for xref method) cd /data2 ; find . -depth -ls | awk '{print $1,$11}' > /tmp/inodelist and it ran fairly fast, so if you were to create a xref, cron could probably run that every 30 mins without taking up too much processing time. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
I did a couple tests using: find (device) -xdev -inode # -print And it wasn't too much of a delay (instant to few seconds) George Other than that I just ran the following (for xref method) cd /data2 ; find . -depth -ls | awk '{print $1,$11}' > /tmp/inodelist and it ran fairly fast, so if you were to create a xref, cron could probably run that every 30 mins without taking up too much processing time. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 5:03 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Turn a device and inode into file name It seems like an "on the fly" scan across all possible filesystems would be really slow. I can't see how you can escape having a cross reference that gets rebuilt periodically. No one is going to want to wait a minute in interactive mode for a response. No one else has encountered the issue that you can't tell what file a lock is being set on? Some people can tell from the key I suppose, at time, but many files can share a similar key. It seems odd to me, that after twenty years, we still have this issue in Universe. -Original Message- From: George Gallen To: U2 Users List Sent: Fri, Mar 16, 2012 1:46 pm Subject: Re: [U2] Turn a device and inode into file name As far as I understood, no, they are unique only to their device, so you could ave multiple files ith the same inode in different filesystems. Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Friday, March 16, 2012 4:44 PM o: donr_w...@yahoo.com; u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name Are inodes unique across all devices? I was under the impression that they were ot, and therefore you need both for a unique correspondence -Original Message- rom: Don Robinson o: U2 Users List ent: Fri, Mar 16, 2012 12:58 pm ubject: Re: [U2] Turn a device and inode into file name ry "ls -li |grep inode#" in the directory where the file is likley to be or s -liR / |grep inode#" to look everythere. ou may need root permissions to check some files. O warranty! on Robinson rom: Wjhonson : u2-users@listserver.u2ug.org nt: Friday, March 16, 2012 3:23 PM bject: [U2] Turn a device and inode into file name nyone have an easy way to do this? the past I've run a batch routine to just query each and every Universe file r it's inode and device and build a table of these very week ems like a great amount of overkill to me. u could also mod the CREATE-FILE command to sniff it and make an xref entry t ny suggestions? is is NOT for the case where you know the file and want to find the inode and vice 's for the case where you know the inode and device (only) and want to find e file. _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
It seems like an "on the fly" scan across all possible filesystems would be really slow. I can't see how you can escape having a cross reference that gets rebuilt periodically. No one is going to want to wait a minute in interactive mode for a response. No one else has encountered the issue that you can't tell what file a lock is being set on? Some people can tell from the key I suppose, at time, but many files can share a similar key. It seems odd to me, that after twenty years, we still have this issue in Universe. -Original Message- From: George Gallen To: U2 Users List Sent: Fri, Mar 16, 2012 1:46 pm Subject: Re: [U2] Turn a device and inode into file name As far as I understood, no, they are unique only to their device, so you could ave multiple files ith the same inode in different filesystems. Original Message- rom: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Wjhonson ent: Friday, March 16, 2012 4:44 PM o: donr_w...@yahoo.com; u2-users@listserver.u2ug.org ubject: Re: [U2] Turn a device and inode into file name Are inodes unique across all devices? I was under the impression that they were ot, and therefore you need both for a unique correspondence -Original Message- rom: Don Robinson o: U2 Users List ent: Fri, Mar 16, 2012 12:58 pm ubject: Re: [U2] Turn a device and inode into file name ry "ls -li |grep inode#" in the directory where the file is likley to be or s -liR / |grep inode#" to look everythere. ou may need root permissions to check some files. O warranty! on Robinson rom: Wjhonson : u2-users@listserver.u2ug.org nt: Friday, March 16, 2012 3:23 PM bject: [U2] Turn a device and inode into file name nyone have an easy way to do this? the past I've run a batch routine to just query each and every Universe file r it's inode and device and build a table of these very week ems like a great amount of overkill to me. u could also mod the CREATE-FILE command to sniff it and make an xref entry t ny suggestions? is is NOT for the case where you know the file and want to find the inode and vice 's for the case where you know the inode and device (only) and want to find e file. _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users _ -Users mailing list -us...@listserver.u2ug.org tp://listserver.u2ug.org/mailman/listinfo/u2-users ___ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
As far as I understood, no, they are unique only to their device, so you could have multiple files With the same inode in different filesystems. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 4:44 PM To: donr_w...@yahoo.com; u2-users@listserver.u2ug.org Subject: Re: [U2] Turn a device and inode into file name Are inodes unique across all devices? I was under the impression that they were not, and therefore you need both for a unique correspondence -Original Message- From: Don Robinson To: U2 Users List Sent: Fri, Mar 16, 2012 12:58 pm Subject: Re: [U2] Turn a device and inode into file name Try "ls -li |grep inode#" in the directory where the file is likley to be or ls -liR / |grep inode#" to look everythere. ou may need root permissions to check some files. O warranty! on Robinson From: Wjhonson o: u2-users@listserver.u2ug.org ent: Friday, March 16, 2012 3:23 PM ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every Universe file or it's inode and device and build a table of these Every week eems like a great amount of overkill to me. ou could also mod the CREATE-FILE command to sniff it and make an xref entry ut Any suggestions? his is NOT for the case where you know the file and want to find the inode and evice t's for the case where you know the inode and device (only) and want to find he file. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Are inodes unique across all devices? I was under the impression that they were not, and therefore you need both for a unique correspondence -Original Message- From: Don Robinson To: U2 Users List Sent: Fri, Mar 16, 2012 12:58 pm Subject: Re: [U2] Turn a device and inode into file name Try "ls -li |grep inode#" in the directory where the file is likley to be or ls -liR / |grep inode#" to look everythere. ou may need root permissions to check some files. O warranty! on Robinson From: Wjhonson o: u2-users@listserver.u2ug.org ent: Friday, March 16, 2012 3:23 PM ubject: [U2] Turn a device and inode into file name nyone have an easy way to do this? n the past I've run a batch routine to just query each and every Universe file or it's inode and device and build a table of these Every week eems like a great amount of overkill to me. ou could also mod the CREATE-FILE command to sniff it and make an xref entry ut Any suggestions? his is NOT for the case where you know the file and want to find the inode and evice t's for the case where you know the inode and device (only) and want to find he file. __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users __ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Try "ls -li |grep inode#" in the directory where the file is likley to be or "ls -liR / |grep inode#" to look everythere. You may need root permissions to check some files. NO warranty! Don Robinson From: Wjhonson To: u2-users@listserver.u2ug.org Sent: Friday, March 16, 2012 3:23 PM Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
[george@alpha]$ find . -depth -ls | awk '{print $1,$11}' | pg 16390568 ./IP.KEYS.HOLD/OVER.30 16390570 ./IP.KEYS.HOLD/.Type30 16390569 ./IP.KEYS.HOLD/DATA.30 16390567 ./IP.KEYS.HOLD 15795741 ./VME-ADV-FILE/OVER.30 15795743 ./VME-ADV-FILE/.Type30 15795742 ./VME-ADV-FILE/DATA.30 15795740 ./VME-ADV-FILE 16847470 ./RATE-SHEE000/OVER.30 16847472 ./RATE-SHEE000/.Type30 16847471 ./RATE-SHEE000/DATA.30 16847469 ./RATE-SHEE000 15738624 ./D_N&A0500-HOLD 15738846 ./D_BPA.SUMMA000 16847200 ./N&A0028/OVER.30 16847202 ./N&A0028/.Type30 16847201 ./N&A0028/DATA.30 16847199 ./N&A0028 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Friday, March 16, 2012 3:46 PM To: U2 Users List Subject: Re: [U2] Turn a device and inode into file name Or loop through "df" with 'cd filesystemname ; find . -ls -depth | awk "{print $x $y}"' where $x and $y are the Column numbers for the inode number and the filename Of course, this would be for unix only George ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Or loop through "df" with 'cd filesystemname ; find . -ls -depth | awk "{print $x $y}"' where $x and $y are the Column numbers for the inode number and the filename Of course, this would be for unix only George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Friday, March 16, 2012 3:37 PM To: U2 Users List Subject: Re: [U2] Turn a device and inode into file name What about doing a "df", then loop through each filesystem that is a universe directory, and run "ls -i" (looping through each directory) Then index the resulting ls's ? George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 3:24 PM To: u2-users@listserver.u2ug.org Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
What about doing a "df", then loop through each filesystem that is a universe directory, and run "ls -i" (looping through each directory) Then index the resulting ls's ? George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, March 16, 2012 3:24 PM To: u2-users@listserver.u2ug.org Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Turn a device and inode into file name
Hi, There is no trivial way to do this because a single inode may correspond to multiple file names if there are links. A useful trick if you run ACCOUNT.FILE.STATS from time to time is to look at the data file that it generates. This includes the inode numbers. Of course, a better solution is to write a little program to build a file that relates file names to inode numbers. You can then do queries against this. Or you could add a VOC entry that finds the inode number for each F-type entry and query against this. Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England +44 (0)1604-709200 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 16 March 2012 19:24 To: u2-users@listserver.u2ug.org Subject: [U2] Turn a device and inode into file name Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Turn a device and inode into file name
Anyone have an easy way to do this? In the past I've run a batch routine to just query each and every Universe file for it's inode and device and build a table of these Every week Seems like a great amount of overkill to me. You could also mod the CREATE-FILE command to sniff it and make an xref entry but Any suggestions? This is NOT for the case where you know the file and want to find the inode and device It's for the case where you know the inode and device (only) and want to find the file. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users