Dan Price wrote: > On Fri 13 Nov 2009 at 02:24PM, Garrett D'Amore - sun microsystems wrote: >> 63: S_IFREG mode:0600 dev:400,1 ino:254311 uid:23805 gid:10 size:24000 >> O_RDWR|O_APPEND|O_CREAT|O_LARGEFILE FD_CLOEXEC >> /home/dmick/.sh_history offset:24000 > > +1 from me. I have wanted this many times-- I'm only sorry I didn't > implement it years ago! My only question would be to Roger-- whether he > intended for the filename to live alone on a line, or could offer > guidance about where offset: should live. > > But I don't really know where else to stick this info. The first line > seems to be properties of the file. The next, properties of the way the > fd was opened (or fcntl'd). So, it's not obvious that either of these > lines would be right either. > > It would help to see an example of the output for some more exotic types > of things, such as sockets and doors-- I assume that for some of these, > this output is elided? How about a pfiles of, say, inetd? > > -dp >
Here are all the offsets from my inetd: /devices/pseudo/mm at 0:null offset:0 /var/svc/log/network-inetd:default.log offset:0 /var/svc/log/network-inetd:default.log offset:0 /devices/pseudo/sysevent at 0:sysevent offset:0 /devices/pseudo/sysevent at 0:sysevent offset:0 /devices/pseudo/tl at 0:ticotsord offset:0 /devices/pseudo/tl at 0:ticots offset:0 /devices/pseudo/tl at 0:ticotsord offset:0 /devices/pseudo/tcp at 0:tcp offset:0 /devices/pseudo/tcp6 at 0:tcp6 offset:0 /devices/pseudo/tl at 0:ticlts offset:0 /devices/pseudo/tl at 0:ticotsord offset:0 /devices/pseudo/tl at 0:ticotsord offset:0 /devices/pseudo/tl at 0:ticlts offset:0 /devices/pseudo/udp at 0:udp offset:0 /devices/pseudo/udp6 at 0:udp6 offset:0 /proc/1019/psinfo offset:0 so basically none of them are 'useful'. It's possible that the information that none of the devices increment a seek offset is itself useful, though, which is why I decided to output them rather than try to invent a heuristic for which dev types mattered and which didn't.