DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

NAME

NAME file - print information about the file table entry

SYNOPSIS

file address
file+ address
File address

DESCRIPTION

The file macro takes one argument, the address of a file. It displays the file structure as defined in /usr/include/sys/file.h, and the vnode, strfiles and cred structures. (This macro has changed in 1.3, use File a)

The macro file+ prints the same information as the file macro, and sets up the nx command to automatically print the next file structure.

The File macro which was added to the 1.3 release prints a file structure, vnode information, stream information and the credential structure of a file.

To get the address of a file, first run the "files" macro using the address of a proc struct to list all the files the process has open.

Typical output looks like this:


 S> file D1295F00
 f_next     D1295300
 f_prev     D12A4A00
 f_flag     00000003  FREAD FWRITE
 f_count    0000000F
 f_vnode    D12A4C04
 f_offset   00000000
 f_cred     D1291580
 f_aiof     D1295F18
 f_aiob     D1295F18
 f_off      D1295F20
 f_slnk     D1295F20
 f_lck      D1295F24
 f_clcount  00000000
 f_clwant   00000000

 vnode
 [D12A4C04]  type 4: VCHR flag 0000:
 count   00002.  vfsmnt 00000000   ops D022D474  stream D12A4E00  locks 00000000
 rdev 00300000    vfsp D0285030  data D12A4C00   pages 00000000

 stream
 stream D12A4E00  iocwwait 0000  rerr 00000000   werr 00000000  pushcnt 00000003
 flag   04018082: RSLEEP STRISTTY SNDMREAD OLDNDELAY STRHOLD     sigflg 00000000:

 evflag 00000000:     pollevents 0000:
 sd_vnode     D12A4504:
 dev             12/00:
 sd_sidp      D124B680:
 sd_pgidp     D124EF20:
 sd_eventlist 00000000:

 queues D12A4400, D12A444C
 Downstream from queue D12A444C:
 queue    bsrv     idname   ptr   count cpu plumbing:sched:flag
 D12A444C 00000000 strwhead D12A4E00 00 UBND PROCSON USE
 D12A2D4C D12A444C ttcompat D12A2C00 00 UBND PROCSON WANTR USE
 D12A2F4C D12A444C ldterm   D12A2E00 00 UBND PROCSON WANTR USE
 D12A424C D12A444C ptem     D02FD7B8 00 UBND PROCSON WANTR USE
 D12A434C D12A444C pts      D02AD28C 00 UBND PROCSON WANTR USE
 Upstream from queue D12A4300:
 queue    bsrv     idname   ptr   count cpu plumbing:sched:flag
 D12A4300 00000000 pts      D02AD28C 00 UBND PROCSON WANTR READR USE
 D12A4200 D12A4300 ptem     D02FD7B8 00 UBND PROCSON WANTR READR USE
 D12A2F00 D12A4300 ldterm   D12A2E00 00 UBND PROCSON WANTR READR USE
 D12A2D00 D12A2F00 ttcompat D12A2C00 00 UBND PROCSON WANTR READR USE
 D12A4400 D12A2F00 strrhead D12A4E00 00 UBND PROCSON WANTR READR USE

 cred
 cr_uid   00000  cr_gid   00100  cr_ruid  00103  cr_rgid  00100
 cr_suid  00000  cr_sgid  00100
 cr_ref 01A  cr_ngroups  001  cr_groups   00000064
*NOTE* To see this same information in 1.3, use the File macro (note the capital F).

DEFINED IN

file.k

SEE ALSO

files, cred, streams, strfiles, strowner, vnode

APPENDIX A: Alphabetic Index of Macros