Darren J Moffat schrieb: > Garrett D'Amore wrote: >> >> While there has been some conversation, and it seems like folks are >> generally in favor of this proposal, I've not seen any actual +1s from >> any voting ARC members. Can I hear one please? > > Seems reasonable to me as specified, but see below. > >> Also, on the question of "parseable" pfiles output, I like the idea, >> but I think the answer is "not this case". As has been pointed out >> already, I don't think the changes described for this case make the >> output any more ambiguous than they already are. > > Agreed not this case, but I think the proposal of putting > offset: after the file name does actually make it harder > to parse the existing output of pfiles(1), since today you > can assume that the filename is on a line of its own. > > All the other non filename fields in the pfiles(1) output > are on a different line to the filename. So I'd highly recommend > that offset go on the same line as mode: or on its own line. > If that is done then an offset of 0 should be printed for > things that are seekable. >
Someone asked for sample pfiles output for something like inetd, to see how the 'filename' line looks for things other than regular files and how socket-specific things are handled in output. The one reply there was did not show all of this. Of course this is easy to obtain, but as an additional data point, this has various kinds of files/devices/sockets, so I have included it below. This shows that socket-specific attributes, options and 'sockname: ...' go on separate lines, between the general (stat) attributes and the filename (if any). It would probably be in that style to put 'offset:' onto a new line for seekable file attributes. - J?rg Here is the sample output: # pfiles `pgrep inetd` 394: /usr/lib/inet/inetd start Current rlimit: unlimited file descriptors 0: S_IFCHR mode:0666 dev:302,0 ino:6815752 uid:0 gid:3 rdev:13,2 O_RDONLY|O_LARGEFILE /devices/pseudo/mm at 0:null 1: S_IFREG mode:0644 dev:182,65538 ino:25225 uid:0 gid:0 size:686 O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE /var/svc/log/network-inetd:default.log 2: S_IFREG mode:0644 dev:182,65538 ino:25225 uid:0 gid:0 size:686 O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE /var/svc/log/network-inetd:default.log 3: S_IFIFO mode:0000 dev:300,0 ino:191 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK 4: S_IFDOOR mode:0444 dev:312,0 ino:49 uid:0 gid:0 size:0 O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[390] /var/run/name_service_door 5: S_IFDOOR mode:0777 dev:304,0 ino:0 uid:0 gid:0 size:0 O_RDWR FD_CLOEXEC door to svc.configd[9] 6: S_IFDOOR mode:0777 dev:304,0 ino:0 uid:0 gid:0 size:0 O_RDWR FD_CLOEXEC door to svc.configd[9] 7: S_IFIFO mode:0000 dev:300,0 ino:191 uid:0 gid:0 size:0 O_RDWR 8: S_IFCHR mode:0000 dev:302,0 ino:27698 uid:0 gid:0 rdev:152,3 O_RDWR FD_CLOEXEC /devices/pseudo/sysevent at 0:sysevent 9: S_IFCHR mode:0000 dev:302,0 ino:27697 uid:0 gid:0 rdev:152,4 O_RDWR FD_CLOEXEC /devices/pseudo/sysevent at 0:sysevent 10: S_IFDOOR mode:0777 dev:304,0 ino:0 uid:0 gid:0 size:0 O_RDWR FD_CLOEXEC door to inetd[394] 11: S_IFREG mode:0666 dev:305,1 ino:65539 uid:0 gid:0 size:0 O_RDWR|O_LARGEFILE /system/contract/process/template 12: S_IFSOCK mode:0666 dev:311,0 ino:16946 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK SOCK_STREAM SO_SNDBUF(16384),SO_RCVBUF(5120) sockname: AF_UNIX /var/run/.inetd.uds 13: S_IFCHR mode:0000 dev:302,0 ino:49649 uid:0 gid:0 rdev:10,23 O_RDWR /devices/pseudo/tl at 0:ticotsord 14: S_IFCHR mode:0000 dev:302,0 ino:55002 uid:0 gid:0 rdev:10,26 O_RDWR /devices/pseudo/tl at 0:ticots 15: S_IFCHR mode:0000 dev:302,0 ino:55003 uid:0 gid:0 rdev:10,29 O_RDWR /devices/pseudo/tl at 0:ticotsord 16: S_IFCHR mode:0000 dev:302,0 ino:55000 uid:0 gid:0 rdev:42,61 O_RDWR sockname: AF_INET 0.0.0.0 port: 48976 /devices/pseudo/tcp at 0:tcp 17: S_IFCHR mode:0000 dev:302,0 ino:54999 uid:0 gid:0 rdev:142,50 O_RDWR sockname: AF_INET6 :: port: 38537 /devices/pseudo/tcp6 at 0:tcp6 18: S_IFCHR mode:0000 dev:302,0 ino:54998 uid:0 gid:0 rdev:10,36 O_RDWR /devices/pseudo/tl at 0:ticotsord 19: S_IFSOCK mode:0666 dev:311,0 ino:11841 uid:0 gid:0 size:0 O_RDWR SOCK_STREAM SO_REUSEADDR,SO_SNDBUF(49152),SO_RCVBUF(49152) sockname: AF_INET6 :: port: 7008 20: S_IFSOCK mode:0666 dev:311,0 ino:36014 uid:0 gid:0 size:0 O_RDWR SOCK_DGRAM SO_REUSEADDR,SO_SNDBUF(57344),SO_RCVBUF(57344) sockname: AF_INET6 :: port: 69 -- Joerg Barfurth Phone: +49 40 23646662 Software Engineer mailto:joerg.barfurth at sun.com Desktop Technology Thin Client Software http://www.sun.com/software/sunray/ Sun Microsystems GmbH http://www.sun.com/software/javadesktopsystem/ Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Haering