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 <jhes...@momtex.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
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 <jhes...@momtex.com>
o: U2 Users List <u2-users@listserver.u2ug.org>
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 <jhes...@momtex.com>
: U2 Users List <u2-users@listserver.u2ug.org>
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 <jhes...@momtex.com>
 U2 Users List <u2-users@listserver.u2ug.org>
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<I,3>)
 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 to find the ode
d device It's for the case where you know the inode and device
y) and want to find the file.
___________________________________________
sers mailing list
s...@listserver.u2ug.org
://listserver.u2ug.org/mailman/listinfo/u2-users
___________________________________________
sers mailing list
s...@listserver.u2ug.org
://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
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

Reply via email to