Measure Reference Manual
Record Creation
OSS files are often opened within a parent process environment but accessed only in the context
of a child process that inherits the open. Similarly, a child process might not actually use all file
opens inherited from a parent process. To minimize the system impact of tracking OSS file opens
in Measure, counter records for OSS file opens are initiated on first significant use of the file, not
on the open of the file. These OSS APIs qualify as significant use:
send()open(O_TRUNC)accept()
sendmsg()read()fcntl(F_GETLK,F_SETLK,F_SETLKW)
sendto()recv()fsync()
write()recvfrom()ftruncate()
recvmsg()lseek()
When an OSS pipe or OSS FIFO file is created or opened the first time, the OSS file system creates
a data buffer for the OSS pipe or OSS FIFO FILE open in a specific CPU and also creates a FILE
entity record. This FILE entity will be deleted when all processes have closed the pipe or FIFO. All
processes using the pipe or FIFO will have a FILE entity counter record.
For Guardian file opens, you commonly see file records that are not used by a process during a
measurement. For OSS file opens, such opens do not produce a data record.
OSS Naming Conventions
A Measure FILE record identifies a file open object by its Guardian format name
($vol.subvol.fname). OSS file open objects might also have an OSS file pathname defined,
such as /work/files/fname. An additional identifier for OSS AF_INET and AF_INET6 sockets,
IP-ADDR, is an IP address-port combination specified in a quoted string with the port space-separated
from the address (for example, "123.45.67.8 90" or "3FFE:1200:215:1 64").
Except for OSS regular files, OSS file open types do not have a valid Guardian file name available
for use. For Measure use only, the OSS file system creates a Guardian file name for these file
opens for configuration, identification, and selection. These names are only for Measure record
selection and display. They cannot be used as targets of a FILE_OPEN_ call or otherwise applied
in commands that use a file name as a parameter. To form the name, the OSS file system uses the
device name of the process providing the resource followed by unique identifiers (qual1, qual2):
• The TCP/IP process name (user-defined) for AF_INET and AF_INET6 sockets
• The pipe server name ($ZPPnn) for pipes and ($ZPPNN) for FIFOs
• The local server ($ZPLS) for AF_UNIX sockets (pre-AF_UNIX R2)
• The local server ($ZLSnn) for unbound AF_UNIX sockets and ($ZLSNN) for bound AF_UNIX
sockets (AF_UNIX R2)
In all cases, a CRVSN/timestamp is appended to the file name to form a unique file name modifier,
represented as cccccc in the following list.
Depending on OSS file open type, the following file identifiers are present in the Measure file
record. If OSS journaling is enabled for a measurement, only OSS file pathnames for regular files,
FIFOs, and bound AF_UNIX sockets are journaled.
The pipe server and the local server (AF_UNIX R2) are really process groups, with one process
per CPU. The last two bytes of the process name (nn) is the CPU number where the individual
process resides. For example, the pipe server on a four-CPU system is a process group consisting
of processes, $ZPP00, $ZPP01, $ZPP02 and $ZPP03. To create the illusion of a single server
process for FIFOs and bound sockets, the File identifier that is displayed in the LIST FILE display
uses the process name, $ZPPNN, for the pipe server, and $ZLSNN for the local server for bound
228 Entities and Counters