3 fstrace dump - Dumps a trace log
7 B<fstrace dump> [B<-set> <I<set_name>>+] [-follow <I<log_name>>]
8 [B<-file> <I<output_filename>>]
9 [B<-sleep> <I<seconds_between_reads>>] [-help]
11 B<fstrace d> [B<-se> <I<set_name>>+] [B<-fo> <I<log_name>>] [-fi <I<output_filename>>]
12 [B<-sl> <I<seconds_between_reads>>] [B<-h>]
16 The fstrace dump command displays the current contents of the
17 B<cmfx> trace log on the standard output stream or writes it to the
18 file named by the B<-file> argument.
20 To write the log continuously to the standard output stream or to a file,
21 use the B<-follow> argument. By default, the log's
22 contents are written out every ten seconds and then automatically
23 cleared. To change the interval between writes, use the
28 This command produces output only if the cm event set is
29 active. To display or set the event set's state, use the
30 B<fstrace lsset> or B<fstrace setset> command
33 To make the output from this command maximally readable, the message
34 catalog file called B<afszcm.cat> must reside in the local
35 B</usr/vice/etc/C> directory. If necessary, copy the file to
36 that directory from the AFS Binary Distribution before activating
39 When the cm event set is active, a defined amount of kernel
40 memory (by default, 60 KB) is allocated for the B<cmfx> trace
41 log. As described on the introductory B<fstrace> reference
42 page, when the buffer is full, messages are overwritten in a circular fashion
43 (new messages overwrite the oldest ones). To allocate more kernel
44 memory for the log, use the B<fstrace setlog> command; to display
45 the log buffer's current size, use the B<fstrace lslog> command
46 with the B<-long> argument.
54 Names the event set for which to write out the associated trace
55 log. The only acceptable value is B<cm> (for which the
56 associated trace log is B<cmfx>). Provide either this argument
57 or the B<-log> argument, or omit both to write out the B<cmfx>
62 Names the trace log to write out continuously at a specified interval (by
63 default, every ten seconds; use the B<-sleep> argument to change
64 the interval). The log is cleared after each write operation.
66 The only acceptable value is cmfx. Provide either this
67 argument or the B<-set> argument, or omit both to write out the
68 B<cmfx> log by default.
72 Specifies the pathname of the file to which to write the trace log's
73 contents. It can be in AFS or on the local disk. Partial
74 pathnames are interpreted relative to the current working directory. If
75 this argument is omitted, the trace log appears on the standard output
80 Sets the number of seconds between writes of the trace log's contents
81 when it is dumped continuously. Provide the B<-follow> argument
82 along with this one. If this argument is omitted, the default interval
87 Prints the online help for this command. All other valid options
94 The output begins with a header specifying the date and time at which the
95 write operation began. If the B<-follow> argument is not
96 included, the header also reports the number of logs being dumped; it is
97 always C<1>, since there is only the B<cmfx> trace log.
98 The format of the header is as follows:
101 Date: I<starting_timestamp>
103 Contents of log cmfx:
105 Each subsequent message describes a Cache Manager operation in the
108 time I<timestamp>, pid I<pid>:I<event_message>
117 Specifies the time at which the Cache Manager performed the operation, as
118 the number of seconds since the dump began
123 Specifies the process ID of the process or thread associated with the
126 =item I<event_message
129 Is the message itself. They are generally meaningful only to
130 someone familiar with the AFS source code.
134 In addition, every 1024 seconds the fstrace command interpreter
135 writes a message that records the current clock time, in the following
138 time I<timestamp>, pid I<pid>: Current time: I<unix_time>
147 Is the number of seconds from the start of trace logging
152 Is the process ID number
157 Is the machine's clock time, represent in the standard UNIX time
158 format as the number of seconds since midnight on January 1, 1970.
162 Use this message to determine the actual clock time associated with each
163 log message. Determine the actual time as follows:
167 Locate the message of interest.
172 Search backward through the trace file for the closest current time
178 If the current time message's I<timestamp> is smaller than the
179 log message's I<timestamp>, subtract former from the latter.
180 If the current time message's I<timestamp> is larger than the log
181 message's I<timestamp>, add 1024 to the latter and subtract the
182 former from the result.
187 Add the resulting number to the current time message's
188 I<unix_time> to determine the log message's actual time.
191 If any of the data in the kernel trace buffer has been overwritten since
192 tracing was activated, the following message appears at the appropriate place
195 Log wrapped; data missing.
197 To reduce the likelihood of overwriting, use the fstrace setlog
198 command to increase the kernel buffer's size. To display the
199 current defined buffer size, use the B<fstrace lslog> command with the
202 The following message at the end of the log dump indicates that it is
205 AFS Trace Dump - Completed
209 The following command dumps the log associated with the cm event
210 set to the standard output stream.
212 # fstrace dump -set cm
214 Date: Tue Apr 7 10:54:57 1998
216 time 32.965783, pid 0: Tue Apr 7 10:45:52 1998
217 time 32.965783, pid 33657: Close 0x5c39ed8 flags 0x20
218 time 32.965897, pid 33657: Gn_close vp 0x5c39ed8 flags 0x20 (returns 0x0)
219 time 35.159854, pid 10891: Breaking callback for 5bd95e4 states 1024 (volume 0)
220 time 35.407081, pid 10891: Breaking callback for 5c0fadc states 1024 (volume 0)
224 time 71.440456, pid 33658: Lookup adp 0x5bbdcf0 name g3oCKs \
225 fid (756 4fb7e:588d240.2ff978a8.6)
226 time 71.440569, pid 33658: Returning code 2 from 19
227 time 71.440619, pid 33658: Gn_lookup vp 0x5bbdcf0 name g3oCKs (returns 0x2)
228 time 71.464989, pid 38267: Gn_open vp 0x5bbd000 flags 0x0 (returns 0x0)
229 AFS Trace Dump - Completed
231 The following command dumps the trace log associated with the cm
232 event set on the local machine to the file
233 B<cmfx.dump.file.1>, using the default interval
234 of 10 seconds between successive dumps:
236 # fstrace dump -follow cmfx -file cmfx.dump.file.1
238 =head1 PRIVILEGE REQUIRED
240 The issuer must be logged in as the local superuser root.
247 L<fstrace_setlog(1)>,
252 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
254 This documentation is covered by the IBM Public License Version 1.0. It was
255 converted from HTML to POD by software written by Chas Williams and Russ
256 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.