2005-12-08 12:14:33 +00:00
|
|
|
=head1 NAME
|
|
|
|
|
2007-11-11 22:54:56 +00:00
|
|
|
fstrace_dump - Dumps a trace log
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
2006-03-01 05:02:29 +00:00
|
|
|
=for html
|
|
|
|
<div class="synopsis">
|
|
|
|
|
2009-10-08 21:58:31 +01:00
|
|
|
B<fstrace dump> S<<< [B<-set> <I<set name>>+] >>>
|
|
|
|
S<<< [B<-follow> <I<log name>>] >>>
|
|
|
|
S<<< [B<-file> <I<output filename>>] >>>
|
|
|
|
S<<< [B<-sleep> <I<seconds between reads>>] >>>
|
2021-03-09 22:20:22 +00:00
|
|
|
S<<< [B<-debug>] >>>
|
2005-12-13 19:21:13 +00:00
|
|
|
[B<-help>]
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2009-10-08 21:58:31 +01:00
|
|
|
B<fstrace d> S<<< [B<-se> <I<set name>>+] >>>
|
|
|
|
S<<< [B<-fo> <I<log name>>] >>>
|
|
|
|
S<<< [B<-fi> <I<output filename>>] >>>
|
|
|
|
S<<< [B<-sl> <I<seconds between reads>>] >>>
|
2021-03-09 22:20:22 +00:00
|
|
|
S<<< [B<-d>] >>>
|
2005-12-13 19:21:13 +00:00
|
|
|
[B<-h>]
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2006-03-01 05:02:29 +00:00
|
|
|
=for html
|
|
|
|
</div>
|
|
|
|
|
2005-12-08 12:14:33 +00:00
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
The B<fstrace dump> command displays the current contents of the C<cmfx>
|
|
|
|
trace log on the standard output stream or writes it to the file named by
|
|
|
|
the B<-file> argument.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
To write the log continuously to the standard output stream or to a file,
|
2005-12-13 19:21:13 +00:00
|
|
|
use the B<-follow> argument. By default, the log's contents are written
|
|
|
|
out every ten seconds and then automatically cleared. To change the
|
2021-03-09 22:20:22 +00:00
|
|
|
interval between writes, use the B<-sleep> argument. To display the raw
|
|
|
|
format of each trace log entry, use the B<-debug> argument.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-09 14:48:56 +00:00
|
|
|
=head1 CAUTIONS
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
This command produces output only if the C<cm> event set is active. To
|
|
|
|
display or set the event set's state, use the B<fstrace lsset> or
|
|
|
|
B<fstrace setset> command respectively.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
To make the output from this command maximally readable, the message
|
2005-12-13 19:21:13 +00:00
|
|
|
catalog file called F<afszcm.cat> must reside in the local
|
|
|
|
F</usr/vice/etc/C> directory. If necessary, copy the file to that
|
|
|
|
directory from the AFS Binary Distribution before activating tracing.
|
|
|
|
|
|
|
|
When the C<cm> event set is active, a defined amount of kernel memory (by
|
|
|
|
default, 60 KB) is allocated for the C<cmfx> trace log. As described in
|
|
|
|
L<fstrace(8)>, when the buffer is full, messages are overwritten in a
|
|
|
|
circular fashion (new messages overwrite the oldest ones). To allocate
|
|
|
|
more kernel memory for the log, use the B<fstrace setlog> command; to
|
|
|
|
display the log buffer's current size, use the B<fstrace lslog> command
|
2005-12-08 12:14:33 +00:00
|
|
|
with the B<-long> argument.
|
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item B<-set> <I<set name>>+
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Names the event set for which to write out the associated trace log. The
|
|
|
|
only acceptable value is C<cm> (for which the associated trace log is
|
|
|
|
C<cmfx>). Provide either this argument or the B<-log> argument, or omit
|
|
|
|
both to write out the C<cmfx> log by default.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item B<-follow> <I<log name>>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
Names the trace log to write out continuously at a specified interval (by
|
2005-12-13 19:21:13 +00:00
|
|
|
default, every ten seconds; use the B<-sleep> argument to change the
|
|
|
|
interval). The log is cleared after each write operation.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
The only acceptable value is C<cmfx>. Provide either this argument or the
|
|
|
|
B<-set> argument, or omit both to write out the C<cmfx> log by default.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item B<-file> <I<output filename>>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
Specifies the pathname of the file to which to write the trace log's
|
2005-12-13 19:21:13 +00:00
|
|
|
contents. It can be in AFS or on the local disk. Partial pathnames are
|
|
|
|
interpreted relative to the current working directory. If this argument is
|
|
|
|
omitted, the trace log appears on the standard output stream.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item B<-sleep> <I<seconds between reads>>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Sets the number of seconds between writes of the trace log's contents when
|
|
|
|
it is dumped continuously. Provide the B<-follow> argument along with this
|
|
|
|
one. If this argument is omitted, the default interval is ten seconds.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2021-03-09 22:20:22 +00:00
|
|
|
=item B<-debug>
|
|
|
|
|
|
|
|
Specifies that each record in the trace log should be displayed in its raw
|
|
|
|
hex format as well as the normal decoded output.
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item B<-help>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Prints the online help for this command. All other valid options are
|
|
|
|
ignored.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 OUTPUT
|
|
|
|
|
|
|
|
The output begins with a header specifying the date and time at which the
|
2005-12-13 19:21:13 +00:00
|
|
|
write operation began. If the B<-follow> argument is not included, the
|
|
|
|
header also reports the number of logs being dumped; it is always C<1>,
|
|
|
|
since there is only the C<cmfx> trace log. The format of the header is as
|
|
|
|
follows:
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
AFS Trace Dump -
|
|
|
|
Date: I<starting_timestamp>
|
|
|
|
Found 1 logs.
|
|
|
|
Contents of log cmfx:
|
|
|
|
|
|
|
|
Each subsequent message describes a Cache Manager operation in the
|
|
|
|
following format:
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
time <timestamp>, pid <pid>:<event_message>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
where
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <timestamp>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
Specifies the time at which the Cache Manager performed the operation, as
|
2005-12-13 19:21:13 +00:00
|
|
|
the number of seconds since the dump began.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <pid>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
Specifies the process ID of the process or thread associated with the
|
2005-12-13 19:21:13 +00:00
|
|
|
message.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <event_message>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Is the message itself. They are generally meaningful only to someone
|
|
|
|
familiar with the AFS source code.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
In addition, every 1024 seconds the fstrace command interpreter writes a
|
|
|
|
message that records the current clock time, in the following format:
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
time <timestamp>, pid <pid>: Current time: <unix_time>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
where
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <timestamp>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Is the number of seconds from the start of trace logging.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <pid>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Is the process ID number.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=item <unix_time>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Is the machine's clock time, represent in the standard UNIX time format as
|
|
|
|
the number of seconds since midnight on January 1, 1970.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
Use this message to determine the actual clock time associated with each
|
|
|
|
log message. Determine the actual time as follows:
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
=over 4
|
|
|
|
|
2005-12-08 12:14:33 +00:00
|
|
|
=item *
|
|
|
|
|
|
|
|
Locate the message of interest.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
Search backward through the trace file for the closest current time
|
|
|
|
message.
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
If the current time message's timestamp is smaller than the log message's
|
|
|
|
timestamp, subtract former from the latter. If the current time message's
|
|
|
|
timestamp is larger than the log message's timestamp, add 1024 to the
|
|
|
|
latter and subtract the former from the result.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=item *
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
Add the resulting number to the current time message's <unix_time> to
|
|
|
|
determine the log message's actual time.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
If any of the data in the kernel trace buffer has been overwritten since
|
2005-12-13 19:21:13 +00:00
|
|
|
tracing was activated, the following message appears at the appropriate
|
|
|
|
place in the output:
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
Log wrapped; data missing.
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
To reduce the likelihood of overwriting, use the B<fstrace setlog> command
|
|
|
|
to increase the kernel buffer's size. To display the current defined
|
|
|
|
buffer size, use the B<fstrace lslog> command with the B<-long> argument.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
The following message at the end of the log dump indicates that it is
|
|
|
|
completed:
|
|
|
|
|
|
|
|
AFS Trace Dump - Completed
|
|
|
|
|
2006-02-27 20:46:25 +00:00
|
|
|
=back
|
|
|
|
|
2005-12-08 12:14:33 +00:00
|
|
|
=head1 EXAMPLES
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
The following command dumps the log associated with the cm event set to
|
|
|
|
the standard output stream.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
# fstrace dump -set cm
|
|
|
|
AFS Trace Dump -
|
|
|
|
Date: Tue Apr 7 10:54:57 1998
|
|
|
|
Found 1 logs.
|
|
|
|
time 32.965783, pid 0: Tue Apr 7 10:45:52 1998
|
2005-12-21 00:41:17 +00:00
|
|
|
time 32.965783, pid 33657: Close 0x5c39ed8 flags 0x20
|
|
|
|
time 32.965897, pid 33657: Gn_close vp 0x5c39ed8 flags 0x20 (returns 0x0)
|
2005-12-08 12:14:33 +00:00
|
|
|
time 35.159854, pid 10891: Breaking callback for 5bd95e4 states 1024 (volume 0)
|
|
|
|
time 35.407081, pid 10891: Breaking callback for 5c0fadc states 1024 (volume 0)
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.
|
|
|
|
time 71.440456, pid 33658: Lookup adp 0x5bbdcf0 name g3oCKs \
|
2005-12-21 00:41:17 +00:00
|
|
|
fid (756 4fb7e:588d240.2ff978a8.6)
|
|
|
|
time 71.440569, pid 33658: Returning code 2 from 19
|
|
|
|
time 71.440619, pid 33658: Gn_lookup vp 0x5bbdcf0 name g3oCKs (returns 0x2)
|
|
|
|
time 71.464989, pid 38267: Gn_open vp 0x5bbd000 flags 0x0 (returns 0x0)
|
2005-12-08 12:14:33 +00:00
|
|
|
AFS Trace Dump - Completed
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
The following command dumps the trace log associated with the cm event set
|
|
|
|
on the local machine to the file C<cmfx.dump.file.1>, using the default
|
|
|
|
interval of 10 seconds between successive dumps:
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
# fstrace dump -follow cmfx -file cmfx.dump.file.1
|
|
|
|
|
|
|
|
=head1 PRIVILEGE REQUIRED
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
The issuer must be logged in as the local superuser C<root>.
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2005-12-13 19:21:13 +00:00
|
|
|
L<afszcm.cat(5)>,
|
|
|
|
L<fstrace(8)>,
|
|
|
|
L<fstrace_lslog(8)>,
|
|
|
|
L<fstrace_setlog(8)>,
|
|
|
|
L<fstrace_lsset(8)>
|
2005-12-08 12:14:33 +00:00
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
|
|
|
|
|
|
|
|
This documentation is covered by the IBM Public License Version 1.0. It was
|
|
|
|
converted from HTML to POD by software written by Chas Williams and Russ
|
|
|
|
Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
|