Improve demand-attach fileserver bos documentation
[openafs.git] / doc / xml / AdminGuide / auagd013.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="HDRWQ323">
3   <title>Monitoring and Auditing AFS Performance</title>
4
5   <indexterm>
6     <primary>scout program</primary>
7   </indexterm>
8
9   <indexterm>
10     <primary>monitoring</primary>
11
12     <secondary>file server processes with scout</secondary>
13   </indexterm>
14
15   <indexterm>
16     <primary>monitoring</primary>
17
18     <secondary>file server processes with afsmonitor</secondary>
19   </indexterm>
20
21   <indexterm>
22     <primary>monitoring</primary>
23
24     <secondary>Cache Manager processes with afsmonitor</secondary>
25   </indexterm>
26
27   <indexterm>
28     <primary>monitoring</primary>
29
30     <secondary>Cache Manager performance</secondary>
31   </indexterm>
32
33   <indexterm>
34     <primary>Cache Manager</primary>
35
36     <secondary>monitoring performance</secondary>
37   </indexterm>
38
39   <indexterm>
40     <primary>client machine</primary>
41
42     <secondary>monitoring performance</secondary>
43   </indexterm>
44
45   <indexterm>
46     <primary>file system</primary>
47
48     <secondary>monitoring activity</secondary>
49   </indexterm>
50
51   <para>AFS comes with three main monitoring tools: <itemizedlist>
52       <listitem>
53         <para>The <emphasis role="bold">scout</emphasis> program, which monitors and gathers statistics on File Server
54         performance.</para>
55       </listitem>
56
57       <listitem>
58         <para>The <emphasis role="bold">fstrace</emphasis> command suite, which traces Cache Manager operations in detail.</para>
59       </listitem>
60
61       <listitem>
62         <para>The <emphasis role="bold">afsmonitor</emphasis> program, which monitors and gathers statistics on both the File Server
63         and the Cache Manager.</para>
64       </listitem>
65     </itemizedlist></para>
66
67   <para>AFS also provides a tool for auditing AFS events on file server machines running AIX.</para>
68
69   <sect1 id="HDRWQ324">
70     <title>Summary of Instructions</title>
71
72     <para>This chapter explains how to perform the following tasks by using the indicated commands:</para>
73
74     <informaltable frame="none">
75       <tgroup cols="2">
76         <colspec colwidth="70*" />
77
78         <colspec colwidth="30*" />
79
80         <tbody>
81           <row>
82             <entry>Initialize the <emphasis role="bold">scout</emphasis> program</entry>
83
84             <entry><emphasis role="bold">scout</emphasis></entry>
85           </row>
86
87           <row>
88             <entry>Display information about a trace log</entry>
89
90             <entry><emphasis role="bold">fstrace lslog</emphasis></entry>
91           </row>
92
93           <row>
94             <entry>Display information about an event set</entry>
95
96             <entry><emphasis role="bold">fstrace lsset</emphasis></entry>
97           </row>
98
99           <row>
100             <entry>Change the size of a trace log</entry>
101
102             <entry><emphasis role="bold">fstrace setlog</emphasis></entry>
103           </row>
104
105           <row>
106             <entry>Set the state of an event set</entry>
107
108             <entry><emphasis role="bold">fstrace setset</emphasis></entry>
109           </row>
110
111           <row>
112             <entry>Dump contents of a trace log</entry>
113
114             <entry><emphasis role="bold">fstrace dump</emphasis></entry>
115           </row>
116
117           <row>
118             <entry>Clear a trace log</entry>
119
120             <entry><emphasis role="bold">fstrace clear</emphasis></entry>
121           </row>
122
123           <row>
124             <entry>Initialize the <emphasis role="bold">afsmonitor</emphasis> program</entry>
125
126             <entry><emphasis role="bold">afsmonitor</emphasis></entry>
127           </row>
128         </tbody>
129       </tgroup>
130     </informaltable>
131   </sect1>
132
133   <sect1 id="HDRWQ326">
134     <title>Using the scout Program</title>
135
136     <indexterm>
137       <primary>scout program</primary>
138
139       <secondary>features summarized</secondary>
140     </indexterm>
141
142     <para>The <emphasis role="bold">scout</emphasis> program monitors the status of the File Server process running on file server
143     machines. It periodically collects statistics from a specified set of File Server processes, displays them in a graphical
144     format, and alerts you if any of the statistics exceed a configurable threshold.</para>
145
146     <para>More specifically, the <emphasis role="bold">scout</emphasis> program includes the following features. <itemizedlist>
147         <listitem>
148           <para>You can monitor, from a single location, the File Server process on any number of server machines from the local and
149           foreign cells. The number is limited only by the size of the display window, which must be large enough to display the
150           statistics.</para>
151         </listitem>
152
153         <listitem>
154           <para>You can set a threshold for many of the statistics. When the value of a statistic exceeds the threshold, the
155           <emphasis role="bold">scout</emphasis> program highlights it (displays it in reverse video) to draw your attention to it.
156           If the value goes back under the threshold, the highlighting is deactivated. You control the thresholds, so highlighting
157           reflects what you consider to be a noteworthy situation. See <link linkend="HDRWQ332">Highlighting Significant
158           Statistics</link>.</para>
159         </listitem>
160
161         <listitem>
162           <para>The <emphasis role="bold">scout</emphasis> program alerts you to File Server process, machine, and network outages
163           by highlighting the name of each machine that does not respond to its probe, enabling you to respond more quickly.</para>
164         </listitem>
165
166         <listitem>
167           <para>You can set how often the <emphasis role="bold">scout</emphasis> program collects statistics from the File Server
168           processes.</para>
169         </listitem>
170       </itemizedlist></para>
171
172     <sect2 id="HDRWQ327">
173       <title>System Requirements</title>
174
175       <indexterm>
176         <primary>scout program</primary>
177
178         <secondary>requirements</secondary>
179       </indexterm>
180
181       <indexterm>
182         <primary>requirements</primary>
183
184         <secondary>scout program</secondary>
185       </indexterm>
186
187       <indexterm>
188         <primary>curses graphics utility</primary>
189
190         <secondary>scout program requirements</secondary>
191       </indexterm>
192
193       <indexterm>
194         <primary>scout program</primary>
195
196         <secondary>setting terminal type</secondary>
197       </indexterm>
198
199       <indexterm>
200         <primary>setting</primary>
201
202         <secondary>terminal type for scout</secondary>
203       </indexterm>
204
205       <indexterm>
206         <primary>terminal type</primary>
207
208         <secondary>setting for scout program</secondary>
209       </indexterm>
210
211       <indexterm>
212         <primary>dumb terminal</primary>
213
214         <secondary>use in scout program</secondary>
215       </indexterm>
216
217       <para>The <emphasis role="bold">scout</emphasis> program runs on any AFS client machine that has access to the <emphasis
218       role="bold">curses</emphasis> graphics package, which most UNIX distributions include as a standard utility. It can run on
219       both dumb terminals and under windowing systems that emulate terminals, but the output looks best on machines that support
220       reverse video and cursor addressing. For best results, set the TERM environment variable to the correct terminal type, or one
221       with characteristics similar to the actual ones. For machines running AIX, the recommended TERM setting is <emphasis
222       role="bold">vt100</emphasis>, assuming the terminal is similar to that. For other operating systems, the wider range of
223       acceptable values includes <emphasis role="bold">xterm</emphasis>, <emphasis role="bold">xterms</emphasis>, <emphasis
224       role="bold">vt100</emphasis>, <emphasis role="bold">vt200</emphasis>, and <emphasis role="bold">wyse85</emphasis>.</para>
225
226       <indexterm>
227         <primary>privilege</primary>
228
229         <secondary>required for scout program</secondary>
230       </indexterm>
231
232       <para>No privilege is required to run the <emphasis role="bold">scout</emphasis> program, so any user who can access the
233       directory where its binary resides (the <emphasis role="bold">/usr/afsws/bin</emphasis> directory in the conventional
234       configuration) can use it. The program's probes for collecting statistics do not impose a significant burden on the File
235       Server process, but you can restrict its use by placing the binary file in a directory with a more restrictive access control
236       list (ACL).</para>
237
238       <para>Multiple instances of the <emphasis role="bold">scout</emphasis> program can run on a single client machine, each over
239       its own dedicated connection (in its own window). It must run in the foreground, so the window in which it runs does not
240       accept further input except for an interrupt signal.</para>
241
242       <para>You can also run the <emphasis role="bold">scout</emphasis> program on several machines and view its output on a single
243       machine, by opening telnet connections to the other machines from the central one and initializing the program in each remote
244       window. In this case, you can include the <emphasis role="bold">-host</emphasis> flag to the <emphasis
245       role="bold">scout</emphasis> command to make the name of each remote machine appear in the <emphasis>banner line</emphasis> at
246       the top of the window displaying its output. See <link linkend="HDRWQ330">The Banner Line</link>.</para>
247     </sect2>
248
249     <sect2 id="HDRWQ328">
250       <title>Using the -basename argument to Specify a Domain Name</title>
251
252       <indexterm>
253         <primary>scout program</primary>
254
255         <secondary>basename</secondary>
256       </indexterm>
257
258       <indexterm>
259         <primary>basenames in scout program</primary>
260       </indexterm>
261
262       <para>As previously mentioned, the <emphasis role="bold">scout</emphasis> program can monitor the File Server process on any
263       number of file server machines. If all of the machines belong to the same cell, then their hostnames probably all have the
264       same domain name suffix, such as <emphasis role="bold">abc.com</emphasis> in the ABC Corporation cell. In this case, you can
265       use the <emphasis role="bold">-basename</emphasis> argument to the <emphasis role="bold">scout</emphasis> command, which has
266       several advantages: <itemizedlist>
267           <listitem>
268             <para>You can omit the domain name suffix as you enter each file server machine's name on the command line. The
269             <emphasis role="bold">scout</emphasis> program automatically appends the domain name to each machine's name, resulting
270             in a fully-qualified hostname. You can omit the domain name suffix even when you don't include the <emphasis
271             role="bold">-basename</emphasis> argument, but in that case correct resolution of the name depends on the state of your
272             cell's naming service at the time of connection.</para>
273           </listitem>
274
275           <listitem>
276             <para>The machine names are more likely to fit in the appropriate column of the display without having to be truncated
277             (for more on truncating names in the display column, see <link linkend="HDRWQ331">The Statistics Display
278             Region</link>).</para>
279           </listitem>
280
281           <listitem>
282             <para>The domain name appears in the banner line at the top of the display window to indicate the name of the cell you
283             are monitoring.</para>
284           </listitem>
285         </itemizedlist></para>
286     </sect2>
287
288     <sect2 id="HDRWQ329">
289       <title>The Layout of the scout Display</title>
290
291       <indexterm>
292         <primary>scout program</primary>
293
294         <secondary>display layout</secondary>
295       </indexterm>
296
297       <indexterm>
298         <primary>display layout in scout program window</primary>
299       </indexterm>
300
301       <para>The <emphasis role="bold">scout</emphasis> program can display statistics either in a dedicated window or on a plain
302       screen if a windowing environment is not available. For best results, use a window or screen that can print in reverse video
303       and do cursor addressing.</para>
304
305       <para>The <emphasis role="bold">scout</emphasis> program screen has three main regions: the <emphasis>banner line</emphasis>,
306       the <emphasis>statistics display region</emphasis> and the <emphasis>probe/message</emphasis> line. This section describes
307       their contents, and graphic examples appear in <link linkend="HDRWQ336">Example Commands and Displays</link>.</para>
308
309       <sect3 id="HDRWQ330">
310         <title>The Banner Line</title>
311
312         <indexterm>
313           <primary>scout program</primary>
314
315           <secondary>banner line</secondary>
316         </indexterm>
317
318         <indexterm>
319           <primary>banner line on the scout program screen</primary>
320         </indexterm>
321
322         <para>By default, the string <computeroutput>scout</computeroutput> appears in the banner line at the top of the window or
323         screen, to indicate that the <emphasis role="bold">scout</emphasis> program is running. You can display two additional types
324         of information by include the appropriate option on the command line: <itemizedlist>
325             <listitem>
326               <para>Include the <emphasis role="bold">-host</emphasis> flag to display the local machine's name in the banner line.
327               This is particularly useful when you are running the <emphasis role="bold">scout</emphasis> program on several
328               machines but displaying the results on a single machine.</para>
329
330               <para>For example, the following banner line appears when you run the <emphasis role="bold">scout</emphasis> program
331               on the machine <emphasis role="bold">client1.abc.com</emphasis> and use the<emphasis role="bold">-host</emphasis>
332               flag:</para>
333
334               <programlisting>
335    [client1.abc.com] scout
336 </programlisting>
337             </listitem>
338
339             <listitem>
340               <para>Include the <emphasis role="bold">-basename</emphasis> argument to display the specified cell domain name in the
341               banner line. For further discussion, see <link linkend="HDRWQ328">Using the -basename argument to Specify a Domain
342               Name</link>.</para>
343
344               <para>For example, if you specify a value of <emphasis role="bold">abc.com</emphasis> for the <emphasis
345               role="bold">-basename</emphasis> argument, the banner line reads:</para>
346
347               <programlisting>
348    scout for abc.com
349 </programlisting>
350             </listitem>
351           </itemizedlist></para>
352       </sect3>
353
354       <sect3 id="HDRWQ331">
355         <title>The Statistics Display Region</title>
356
357         <indexterm>
358           <primary>scout program</primary>
359
360           <secondary>statistics displayed</secondary>
361         </indexterm>
362
363         <indexterm>
364           <primary>statistics display by scout program</primary>
365         </indexterm>
366
367         <para>The statistics display region occupies most of the window and is divided into six columns. The following list
368         describes them as they appear from left to right in the window. <variablelist>
369             <varlistentry>
370               <term><computeroutput>Conn</computeroutput></term>
371
372               <listitem>
373                 <indexterm>
374                   <primary>Conn statistic from scout program</primary>
375                 </indexterm>
376
377                 <para>Displays the number of RPC connections open between the File Server process and client machines. This number
378                 normally equals or exceeds the number in the fourth <computeroutput>Ws</computeroutput> column. It can exceed the
379                 number in that column because each user on the machine can have more than one connection open at once, and one
380                 client machine can handle several users.</para>
381               </listitem>
382             </varlistentry>
383
384             <varlistentry>
385               <term><computeroutput>Fetch</computeroutput></term>
386
387               <listitem>
388                 <indexterm>
389                   <primary>Fetch statistic from scout program</primary>
390                 </indexterm>
391
392                 <para>Displays the number of fetch-type RPCs (fetch data, fetch access list, and fetch status) that the File Server
393                 process has received from client machines since it started. It resets to zero when the File Server process
394                 restarts.</para>
395               </listitem>
396             </varlistentry>
397
398             <varlistentry>
399               <term><computeroutput>Store</computeroutput></term>
400
401               <listitem>
402                 <indexterm>
403                   <primary>Store statistic from scout program</primary>
404                 </indexterm>
405
406                 <para>Displays the number of store-type RPCs (store data, store access list, and store status) that the File Server
407                 process has received from client machines since it started. It resets to zero when the File Server process
408                 restarts.</para>
409               </listitem>
410             </varlistentry>
411
412             <varlistentry>
413               <term><computeroutput>Ws</computeroutput></term>
414
415               <listitem>
416                 <indexterm>
417                   <primary>active</primary>
418
419                   <secondary>clients statistic from scout program</secondary>
420                 </indexterm>
421
422                 <indexterm>
423                   <primary>client machines statistic from scout program</primary>
424                 </indexterm>
425
426                 <indexterm>
427                   <primary>Ws statistic from scout program</primary>
428                 </indexterm>
429
430                 <para>Displays the number of client machines (workstations) that have communicated with the File Server process
431                 within the last 15 minutes (such machines are termed <emphasis>active</emphasis>). This number is likely to be
432                 smaller than the number in the <computeroutput>Conn</computeroutput>) column because a single client machine can
433                 have several connections open to one File Server process.</para>
434               </listitem>
435             </varlistentry>
436
437             <varlistentry>
438               <term><emphasis role="bold">[Unlabeled column]</emphasis></term>
439
440               <listitem>
441                 <para>Displays the name of the file server machine on which the File Server process is running. It is 12 characters
442                 wide. Longer names are truncated and an asterisk (<computeroutput>*</computeroutput>) appears as the last character
443                 in the name. If all machines have the same domain name suffix, you can use the <emphasis
444                 role="bold">-basename</emphasis> argument to decrease the need for truncation; see <link linkend="HDRWQ328">Using
445                 the -basename argument to Specify a Domain Name</link>.</para>
446               </listitem>
447             </varlistentry>
448
449             <varlistentry>
450               <term><computeroutput>Disk attn</computeroutput></term>
451
452               <listitem>
453                 <indexterm>
454                   <primary>disk partition</primary>
455
456                   <secondary>monitoring usage of</secondary>
457                 </indexterm>
458
459                 <indexterm>
460                   <primary>monitoring</primary>
461
462                   <secondary>disk usage with scout program</secondary>
463                 </indexterm>
464
465                 <indexterm>
466                   <primary>scout program</primary>
467
468                   <secondary>monitoring disk usage</secondary>
469                 </indexterm>
470
471                 <indexterm>
472                   <primary>Disk attn statistic from scout program</primary>
473                 </indexterm>
474
475                 <para>Displays the number of kilobyte blocks available on up to 26 of the file server machine's AFS server
476                 (<emphasis role="bold">/vicep</emphasis>) partitions. The display for each partition has the following format:
477                 <programlisting>
478    partition_letter:free_blocks
479 </programlisting></para>
480
481                 <para>For example, <computeroutput>a:8949</computeroutput> indicates that partition <emphasis
482                 role="bold">/vicepa</emphasis> has 8,949 KB free. If the window is not wide enough for all partition entries to
483                 appear on a single line, the <emphasis role="bold">scout</emphasis> program automatically stacks the partition
484                 entries into subcolumns within the sixth column.</para>
485
486                 <para>The label on the <computeroutput>Disk attn</computeroutput> column indicates the threshold value at which
487                 entries in the column become highlighted. By default, the <emphasis role="bold">scout</emphasis> program highlights
488                 a partition that is over 95% full, in which case the label is as follows:</para>
489
490                 <programlisting>
491    Disk attn: &gt; 95% used
492 </programlisting>
493
494                 <para>For more on this threshold and its effect on highlighting, see <link linkend="HDRWQ332">Highlighting
495                 Significant Statistics</link>.</para>
496               </listitem>
497             </varlistentry>
498           </variablelist></para>
499
500         <para>For all columns except the fifth (file server machine name), you can use the <emphasis
501         role="bold">-attention</emphasis> argument to set a threshold value above which the <emphasis role="bold">scout</emphasis>
502         program highlights the statistic. By default, only values in the fifth and sixth columns ever become highlighted. For
503         instructions on using the <emphasis role="bold">-attention</emphasis> argument, see <link linkend="HDRWQ332">Highlighting
504         Significant Statistics</link>.</para>
505       </sect3>
506
507       <sect3 id="Header_368">
508         <title>The Probe Reporting Line</title>
509
510         <indexterm>
511           <primary>scout program</primary>
512
513           <secondary>probe reporting line</secondary>
514         </indexterm>
515
516         <indexterm>
517           <primary>message line in scout program display</primary>
518         </indexterm>
519
520         <para>The bottom line of the display indicates how many times the <emphasis role="bold">scout</emphasis> program has probed
521         the File Server processes for statistics. The statistics gathered in the latest probe appear in the statistics display
522         region. By default, the <emphasis role="bold">scout</emphasis> program probes the File Servers every 60 seconds, but you can
523         use the <emphasis role="bold">-frequency</emphasis> argument to specify a different probe frequency.</para>
524       </sect3>
525     </sect2>
526
527     <sect2 id="HDRWQ332">
528       <title>Highlighting Significant Statistics</title>
529
530       <indexterm>
531         <primary>scout program</primary>
532
533         <secondary>highlighting in</secondary>
534       </indexterm>
535
536       <indexterm>
537         <primary>highlighting statistics in scout display</primary>
538
539         <secondary>use of reverse video</secondary>
540       </indexterm>
541
542       <indexterm>
543         <primary>scout program</primary>
544
545         <secondary>reverse video</secondary>
546       </indexterm>
547
548       <indexterm>
549         <primary>reverse video</primary>
550
551         <secondary>use in scout program display</secondary>
552       </indexterm>
553
554       <para>To draw your attention to a statistic that currently exceed a threshold value, the <emphasis
555       role="bold">scout</emphasis> program displays it in reverse video (highlights it). You can set the threshold value for most
556       statistics, and so determine which values are worthy of special attention and which are normal.</para>
557
558       <sect3 id="HDRWQ333">
559         <title>Highlighting Server Outages</title>
560
561         <indexterm>
562           <primary>outages</primary>
563
564           <secondary>monitoring with scout program</secondary>
565         </indexterm>
566
567         <indexterm>
568           <primary>scout program</primary>
569
570           <secondary>outages, monitoring</secondary>
571         </indexterm>
572
573         <indexterm>
574           <primary>monitoring</primary>
575
576           <secondary>outages with scout program</secondary>
577         </indexterm>
578
579         <indexterm>
580           <primary>File Server</primary>
581
582           <secondary>monitoring with scout program</secondary>
583         </indexterm>
584
585         <indexterm>
586           <primary>file server machine</primary>
587
588           <secondary>monitoring outages of</secondary>
589         </indexterm>
590
591         <para>The only column in which you cannot control highlighting is the fifth, which identifies the file server machine for
592         which statistics are displayed in the other columns. The <emphasis role="bold">scout</emphasis> program uses highlighting in
593         this column to indicate that the File Server process on a machine fails to respond to its probe, and automatically blanks
594         out the other columns. Failure to respond to the probe can indicate a File Server process, file server machine, or network
595         outage, so the highlighting draws your attention to a situation that is probably interrupting service to users.</para>
596
597         <para>When the File Server process once again responds to the probes, its name appears normally and statistics reappear in
598         the other columns. If all machine names become highlighted at once, a possible network outage has disrupted the connection
599         between the file server machines and the client machine running the <emphasis role="bold">scout</emphasis> program.</para>
600       </sect3>
601
602       <sect3 id="Header_371">
603         <title>Highlighting for Extreme Statistic Values</title>
604
605         <para>To set the threshold value for one or more of the five statistics-displaying columns, use the <emphasis
606         role="bold">-attention</emphasis> argument. The threshold value applies to all File Server processes you are monitoring (you
607         cannot set different thresholds for different machines). For details, see the syntax description in <link
608         linkend="HDRWQ335">To start the scout program</link>.</para>
609
610         <para>It is not possible to change the threshold values for a running <emphasis role="bold">scout</emphasis> program. Stop
611         the current program and start a new one. Also, the <emphasis role="bold">scout</emphasis> program does not retain threshold
612         values across restarts, so you must specify all thresholds every time you start the program.</para>
613       </sect3>
614     </sect2>
615
616     <sect2 id="HDRWQ334">
617       <title>Resizing the scout Display</title>
618
619       <indexterm>
620         <primary>scout program</primary>
621
622         <secondary>display, resizing</secondary>
623       </indexterm>
624
625       <indexterm>
626         <primary>window</primary>
627
628         <secondary>resizing scout display</secondary>
629       </indexterm>
630
631       <indexterm>
632         <primary>resizing</primary>
633
634         <secondary>scout display</secondary>
635       </indexterm>
636
637       <para>Do not resize the display window while the <emphasis role="bold">scout</emphasis> program is running. Increasing the
638       size does no harm, but the <emphasis role="bold">scout</emphasis> program does not necessarily adjust to the new dimensions.
639       Decreasing the display's width can disturb column alignment, making the display harder to read. With any type of resizing, the
640       <emphasis role="bold">scout</emphasis> program does not adjust the display in any way until it displays the results of the
641       next probe.</para>
642
643       <para>To resize the display effectively, stop the <emphasis role="bold">scout</emphasis> program, resize the window and then
644       restart the program. Even in this case, the <emphasis role="bold">scout</emphasis> program's response depends on the accuracy
645       of the information it receives from the display environment. Testing during development has shown that the display environment
646       does not reliably provide information about window resizing. If you use the X windowing system, issuing the following sequence
647       of commands before starting the <emphasis role="bold">scout</emphasis> program (or placing them in the shell initialization
648       file) sometimes makes it adjust properly to resizing.</para>
649
650       <programlisting>
651    % <emphasis role="bold">set noglob</emphasis>
652    % <emphasis role="bold">eval '/usr/bin/X11/resize'</emphasis> 
653    % <emphasis role="bold">unset noglob</emphasis>
654 </programlisting>
655
656       <indexterm>
657         <primary>starting</primary>
658
659         <secondary>scout program</secondary>
660       </indexterm>
661
662       <indexterm>
663         <primary>scout program</primary>
664
665         <secondary>starting</secondary>
666       </indexterm>
667
668       <indexterm>
669         <primary>initializing</primary>
670
671         <secondary>scout program</secondary>
672       </indexterm>
673
674       <indexterm>
675         <primary>scout program</primary>
676
677         <secondary>command syntax</secondary>
678       </indexterm>
679
680       <indexterm>
681         <primary>commands</primary>
682
683         <secondary>scout</secondary>
684       </indexterm>
685     </sect2>
686
687     <sect2 id="HDRWQ335">
688       <title>To start the scout program</title>
689
690       <orderedlist>
691         <listitem>
692           <para>Open a dedicated command shell. If necessary, adjust it to the appropriate size.</para>
693         </listitem>
694
695         <listitem>
696           <para>Issue the <emphasis role="bold">scout</emphasis> command to start the program. <programlisting>
697    % <emphasis role="bold">scout</emphasis>  [<emphasis role="bold">initcmd</emphasis>]  <emphasis role="bold">-server</emphasis> &lt;<replaceable>FileServer name(s) to monitor</replaceable>&gt;+  \
698             [<emphasis role="bold">-basename</emphasis> &lt;<replaceable>base server name</replaceable>&gt;]  \
699             [<emphasis role="bold">-frequency</emphasis> &lt;<replaceable>poll frequency, in seconds</replaceable>&gt;] [<emphasis
700                 role="bold">-host</emphasis>]  \
701             [<emphasis role="bold">-attention</emphasis> &lt;<replaceable>specify attention (highlighting) level</replaceable>&gt;+]  \
702             [<emphasis role="bold">-debug</emphasis> &lt;<replaceable>turn debugging output on to the named file</replaceable>&gt;]
703 </programlisting></para>
704
705           <para>where <variablelist>
706               <varlistentry>
707                 <term><emphasis role="bold">initcmd</emphasis></term>
708
709                 <listitem>
710                   <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
711                   ignored.</para>
712                 </listitem>
713               </varlistentry>
714
715               <varlistentry>
716                 <term><emphasis role="bold">-server</emphasis></term>
717
718                 <listitem>
719                   <para>Identifies each File Server process to monitor, by naming the file server machine it is running on. Provide
720                   fully-qualified hostnames unless the <emphasis role="bold">-basename</emphasis> argument is used. In that case,
721                   specify only the initial part of each machine name, omitting the domain name suffix common to all the machine
722                   names.</para>
723                 </listitem>
724               </varlistentry>
725
726               <varlistentry>
727                 <term><emphasis role="bold">-basename</emphasis></term>
728
729                 <listitem>
730                   <para>Specifies the domain name suffix common to all of the file server machines named by the <emphasis
731                   role="bold">-server</emphasis> argument. For discussion of this argument's effects, see <link
732                   linkend="HDRWQ328">Using the -basename argument to Specify a Domain Name</link>.</para>
733
734                   <para>Do not include the period that separates the domain suffix from the initial part of the machine name, but do
735                   include any periods that occur within the suffix itself. (For example, in the ABC Corporation cell, the proper
736                   value is <emphasis role="bold">abc.com</emphasis>, not <emphasis role="bold">.abc.com</emphasis>.)</para>
737                 </listitem>
738               </varlistentry>
739
740               <varlistentry>
741                 <term><emphasis role="bold">-frequency</emphasis></term>
742
743                 <listitem>
744                   <para>Sets the frequency, in seconds, of the <emphasis role="bold">scout</emphasis> program's probes to File
745                   Server processes. Specify an integer greater than 0 (zero). The default is 60 seconds.</para>
746                 </listitem>
747               </varlistentry>
748
749               <varlistentry>
750                 <term><emphasis role="bold">-host</emphasis></term>
751
752                 <listitem>
753                   <para>Displays the name of the machine that is running the <emphasis role="bold">scout</emphasis> program in the
754                   display window's banner line. By default, no machine name is displayed.</para>
755                 </listitem>
756               </varlistentry>
757
758               <varlistentry>
759                 <term><emphasis role="bold">-attention</emphasis></term>
760
761                 <listitem>
762                   <para>Defines the threshold value at which to highlight one or more statistics. You can provide the pairs of
763                   statistic and threshold in any order, separating each pair and the parts of each pair with one or more spaces. The
764                   following list defines the syntax for each statistic.<variablelist>
765                       <indexterm>
766                         <primary>scout program</primary>
767
768                         <secondary>attention levels, setting</secondary>
769                       </indexterm>
770
771                       <indexterm>
772                         <primary>highlighting statistics in scout display</primary>
773
774                         <secondary>setting thresholds</secondary>
775                       </indexterm>
776
777                       <indexterm>
778                         <primary>thresholds for statistics in scout display</primary>
779
780                         <secondary>setting</secondary>
781                       </indexterm>
782
783                       <varlistentry>
784                         <term><emphasis role="bold">conn connections</emphasis></term>
785
786                         <listitem>
787                           <para>Highlights the value in the <computeroutput>Conn</computeroutput> (first) column when the number of
788                           connections that the File Server has open to client machines exceeds the connections value. The
789                           highlighting deactivates when the value goes back below the threshold. There is no default
790                           threshold.</para>
791                         </listitem>
792                       </varlistentry>
793
794                       <varlistentry>
795                         <term><emphasis role="bold">fetch fetch_RPCs</emphasis></term>
796
797                         <listitem>
798                           <para>Highlights the value in the <computeroutput>Fetch</computeroutput> (second) column when the number
799                           of fetch RPCs that clients have made to the File Server process exceeds the fetch_RPCs value. The
800                           highlighting deactivates only when the File Server process restarts, at which time the value returns to
801                           zero. There is no default threshold.</para>
802                         </listitem>
803                       </varlistentry>
804
805                       <varlistentry>
806                         <term><emphasis role="bold">store store_RPCs</emphasis></term>
807
808                         <listitem>
809                           <para>Highlights the value in the <computeroutput>Store</computeroutput> (third) column when the number of
810                           store RPCs that clients have made to the File Server process exceeds the store_RPCs value. The
811                           highlighting deactivates only when the File Server process restarts, at which time the value returns to
812                           zero. There is no default threshold.</para>
813                         </listitem>
814                       </varlistentry>
815
816                       <varlistentry>
817                         <term><emphasis role="bold">ws active_clients</emphasis></term>
818
819                         <listitem>
820                           <para>Highlights the value in the <computeroutput>Ws</computeroutput> (fourth) column when the number of
821                           active client machines (those that have contacted the File Server in the last 15 minutes) exceeds the
822                           active_clients value. The highlighting deactivates when the value goes back below the threshold. There is
823                           no default threshold.</para>
824                         </listitem>
825                       </varlistentry>
826
827                       <varlistentry>
828                         <term><emphasis role="bold">disk percent_full % or disk min_blocks</emphasis></term>
829
830                         <listitem>
831                           <para>Highlights the value for a partition in the <computeroutput>Disk attn</computeroutput> (sixth)
832                           column when either the amount of disk space used exceeds the percentage indicated by thepercent_full
833                           value, or the number of free KB blocks is less than the min_blocks value. The highlighting deactivates
834                           when the value goes back below the percent_full threshold or above the min_blocks threshold.</para>
835
836                           <para>The value you specify appears in the header of the sixth column following the string
837                           <computeroutput>Disk attn</computeroutput>. The default threshold is 95% full.</para>
838
839                           <para>Acceptable values for percent_full are the integers from the range <emphasis
840                           role="bold">0</emphasis> (zero) to <emphasis role="bold">99</emphasis>, and you must include the percent
841                           sign to distinguish this statistic from a min_blocks value..</para>
842                         </listitem>
843                       </varlistentry>
844                     </variablelist></para>
845
846                   <para>The following example sets the threshold for the <computeroutput>Conn</computeroutput> column to 100, for
847                   the <computeroutput>Ws</computeroutput> column to 50, and for the <computeroutput>Disk attn</computeroutput>
848                   column to 75%. There is no threshold for the <computeroutput>Fetch</computeroutput> and
849                   <computeroutput>Store</computeroutput> columns.</para>
850
851                   <para><emphasis role="bold">-attention conn 100 ws 50 disk 75%</emphasis></para>
852
853                   <para>The following example has the same affect as the previous one except that it sets the threshold for the Disk
854                   attn column to 5000 free KB blocks:</para>
855
856                   <para><emphasis role="bold">-attention disk 5000 ws 50 conn 100</emphasis></para>
857                 </listitem>
858               </varlistentry>
859
860               <varlistentry>
861                 <term><emphasis role="bold">-debug</emphasis></term>
862
863                 <listitem>
864                   <para>Enables debugging output and directs it into the specified file. Partial pathnames are interpreted relative
865                   to the current working directory. By default, no debugging output is produced.</para>
866                 </listitem>
867               </varlistentry>
868             </variablelist></para>
869         </listitem>
870       </orderedlist>
871     </sect2>
872
873     <sect2 id="Header_374">
874       <title>To stop the scout program</title>
875
876       <indexterm>
877         <primary>scout program</primary>
878
879         <secondary>stopping</secondary>
880       </indexterm>
881
882       <orderedlist>
883         <listitem>
884           <para>Enter <emphasis role="bold">Ctrl-c</emphasis> in the display window. This is the proper interrupt signal even if the
885           general interrupt signal in your environment is different.</para>
886         </listitem>
887       </orderedlist>
888     </sect2>
889
890     <sect2 id="HDRWQ336">
891       <title>Example Commands and Displays</title>
892
893       <indexterm>
894         <primary>scout program</primary>
895
896         <secondary>examples (command and display)</secondary>
897       </indexterm>
898
899       <indexterm>
900         <primary>examples</primary>
901
902         <secondary>scout program display</secondary>
903       </indexterm>
904
905       <para>This section presents examples of the <emphasis role="bold">scout</emphasis> program, combining different arguments and
906       illustrating the screen displays that result.</para>
907
908       <para>In the first example, an administrator in the ABC Corporation issues the <emphasis role="bold">scout</emphasis> command
909       without providing any optional arguments or flags. She includes the <emphasis role="bold">-server</emphasis> argument because
910       she is providing multiple machine names. She chooses to specify on the initial part of each machine's name even though she has
911       not used the <emphasis role="bold">-basename</emphasis> argument, relying on the cell's name service to obtain the
912       fully-qualified name that the <emphasis role="bold">scout</emphasis> program requires for establishing a connection.</para>
913
914       <programlisting>
915    % <emphasis role="bold">scout -server fs1 fs2</emphasis> 
916 </programlisting>
917
918       <para><link linkend="FIGWQ337">Figure 2</link> depicts the resulting display. Notice first that the machine names in the fifth
919       (unlabeled) column appear in the format the administrator used on the command line. Now consider the second line in the
920       display region, where the machine name <computeroutput>fs2</computeroutput> appears in the fifth column. The
921       <computeroutput>Conn</computeroutput> and <computeroutput>Ws</computeroutput> columns together show that machine <emphasis
922       role="bold">fs2</emphasis> has 144 RPC connections open to 44 client machines, demonstrating that multiple connections per
923       client machine are possible. The <computeroutput>Fetch</computeroutput> column shows that client machines have made 2,734,278
924       fetch RPCs to machine <emphasis role="bold">fs2</emphasis> since the File Server process last started and the
925       <computeroutput>Store</computeroutput> column shows that they have made 34,066 store RPCs.</para>
926
927       <para>Six partition entries appear in the <computeroutput>Disk attn</computeroutput> column, marked
928       <computeroutput>a</computeroutput> through <computeroutput>f</computeroutput> (for <emphasis role="bold">/vicepa</emphasis>
929       through <emphasis role="bold">/vicepf</emphasis>). They appear on three lines in two subcolumns because of the width of the
930       window; if the window is wider, there are more subcolumns. Four of the partition entries (<computeroutput>a</computeroutput>,
931       <computeroutput>c</computeroutput>, <computeroutput>d</computeroutput>, and <computeroutput>e</computeroutput>) appear in
932       reverse video to indicate that they are more than 95% full (the threshold value that appears in the <computeroutput>Disk
933       attn</computeroutput> header).</para>
934
935       <figure id="FIGWQ337" label="2">
936         <title>First example scout display</title>
937
938         <mediaobject>
939           <imageobject>
940             <imagedata fileref="scout1.png" scale="50" />
941           </imageobject>
942         </mediaobject>
943       </figure>
944
945       <para><emphasis role="bold"> </emphasis></para>
946
947       <para>In the second example, the administrator uses more of the <emphasis role="bold">scout</emphasis> program's optional
948       arguments. <itemizedlist>
949           <listitem>
950             <para>She provides the machine names in the same form as in Example 1, but this time she also uses the <emphasis
951             role="bold">-basename</emphasis> argument to specify their domain name suffix, <emphasis role="bold">abc.com</emphasis>.
952             This implies that the <emphasis role="bold">scout</emphasis> program does not need the name service to expand the names
953             to fully-qualified hostnames, but the name service still converts the hostnames to IP addresses.</para>
954           </listitem>
955
956           <listitem>
957             <para>She uses the <emphasis role="bold">-host</emphasis> flag to display in the banner line the name of the client
958             machine where the <emphasis role="bold">scout</emphasis> program is running.</para>
959           </listitem>
960
961           <listitem>
962             <para>She uses the <emphasis role="bold">-frequency</emphasis> argument to changes the probing frequency from its
963             default of once per minute to once every five seconds.</para>
964           </listitem>
965
966           <listitem>
967             <para>She uses the <emphasis role="bold">-attention</emphasis> argument to changes the highlighting threshold for
968             partitions to a 5000 KB minimum rather than the default of 95% full.</para>
969           </listitem>
970         </itemizedlist></para>
971
972       <programlisting>
973    % <emphasis role="bold">scout -server fs1 fs2 -basename abc.com -host -frequency 5 -attention disk 5000</emphasis> 
974 </programlisting>
975
976       <para>The use of optional arguments results in several differences between <link linkend="FIGWQ338">Figure 3</link> and <link
977       linkend="FIGWQ337">Figure 2</link>. First, because the <emphasis role="bold">-host</emphasis> flag is included, the banner
978       line displays the name of the machine running the <emphasis role="bold">scout</emphasis> process as
979       <computeroutput>[client52]</computeroutput> along with the basename <computeroutput>abc.com</computeroutput> specified with
980       the <emphasis role="bold">-basename</emphasis> argument.</para>
981
982       <para>Another difference is that two rather than four of machine <emphasis role="bold">fs2</emphasis>'s partitions appear in
983       reverse video, even though their values are almost the same as in <link linkend="FIGWQ337">Figure 2</link>. This is because
984       the administrator changed the highlight threshold to a 5000 block minimum, as also reflected in the <computeroutput>Disk
985       attn</computeroutput> column's header. And while machine <emphasis role="bold">fs2</emphasis>'s partitions <emphasis
986       role="bold">/vicepa</emphasis> and <emphasis role="bold">/vicepd</emphasis> are still 95% full, they have more than 5000 free
987       blocks left; partitions <emphasis role="bold">/vicepc</emphasis> and <emphasis role="bold">/vicepe</emphasis> are highlighted
988       because they have fewer than 5000 blocks free.</para>
989
990       <para>Note also the result of changing the probe frequency, reflected in the probe reporting line at the bottom left corner of
991       the display. Both this example and the previous one represent a time lapse of one minute after the administrator issues the
992       <emphasis role="bold">scout</emphasis> command. In this example, however, the <emphasis role="bold">scout</emphasis> program
993       has probed the File Server processes 12 times as opposed to once</para>
994
995       <figure id="FIGWQ338" label="3">
996         <title>Second example scout display</title>
997
998         <mediaobject>
999           <imageobject>
1000             <imagedata fileref="scout2.png" scale="50" />
1001           </imageobject>
1002         </mediaobject>
1003       </figure>
1004
1005       <para><emphasis role="bold"> </emphasis></para>
1006
1007       <para>In <link linkend="FIGWQ339">Figure 4</link>, an administrator in the State University cell monitors three of that cell's
1008       file server machines. He uses the <emphasis role="bold">-basename</emphasis> argument to specify the <emphasis
1009       role="bold">stateu.edu</emphasis> domain name.</para>
1010
1011       <programlisting>
1012    % <emphasis role="bold">scout -server server2 server3 server4 -basename stateu.edu</emphasis> 
1013 </programlisting>
1014
1015       <figure id="FIGWQ339" label="4">
1016         <title>Third example scout display</title>
1017
1018         <mediaobject>
1019           <imageobject>
1020             <imagedata fileref="scout3.png" scale="50" />
1021           </imageobject>
1022         </mediaobject>
1023       </figure>
1024
1025       <para><emphasis role="bold"> </emphasis></para>
1026
1027       <para><link linkend="FIGWQ340">Figure 5</link> illustrates three of the <emphasis role="bold">scout</emphasis> program's
1028       features. First, you can monitor file server machines from different cells in a single display: <emphasis
1029       role="bold">fs1.abc.com</emphasis>, <emphasis role="bold">server3.stateu.edu</emphasis>, and <emphasis
1030       role="bold">sv7.def.com</emphasis>. Because the machines belong to different cells, it is not possible to provide the
1031       <emphasis role="bold">-basename</emphasis> argument.</para>
1032
1033       <para>Second, it illustrates how the display must truncate machine names that do not fit in the fifth column, using an
1034       asterisk at the end of the name to show that it is shortened.</para>
1035
1036       <para>Third, it illustrates what happens when the <emphasis role="bold">scout</emphasis> process cannot reach a File Server
1037       process, in this case the one on the machine <emphasis role="bold">sv7.def.com</emphasis>: it highlights the machine name and
1038       blanks out the values in the other columns.</para>
1039
1040       <figure id="FIGWQ340" label="5">
1041         <title>Fourth example scout display</title>
1042
1043         <mediaobject>
1044           <imageobject>
1045             <imagedata fileref="scout4.png" scale="50" />
1046           </imageobject>
1047         </mediaobject>
1048       </figure>
1049     </sect2>
1050   </sect1>
1051
1052   <sect1 id="HDRWQ341">
1053     <title>Using the fstrace Command Suite</title>
1054
1055     <para>This section describes the <emphasis role="bold">fstrace</emphasis> commands that system administrators employ to trace
1056     Cache Manager activity for debugging purposes. It assumes the reader is familiar with the Cache Manager concepts described in
1057     <link linkend="HDRWQ387">Administering Client Machines and the Cache Manager</link>.</para>
1058
1059     <para>The <emphasis role="bold">fstrace</emphasis> command suite monitors the internal activity of the Cache Manager and enables
1060     you to record, or trace, its operations in detail. The operations, which are termed <emphasis>events</emphasis>, comprise the
1061     <emphasis role="bold">cm</emphasis> <emphasis>event set</emphasis>. Examples of <emphasis role="bold">cm</emphasis> events are
1062     fetching files and looking up information for a listing of files and subdirectories using the UNIX <emphasis
1063     role="bold">ls</emphasis> command.</para>
1064
1065     <para>Following are the <emphasis role="bold">fstrace</emphasis> commands and their respective functions: <itemizedlist>
1066         <listitem>
1067           <para>The <emphasis role="bold">fstrace apropos</emphasis> command provides a short description of commands.</para>
1068         </listitem>
1069
1070         <listitem>
1071           <para>The <emphasis role="bold">fstrace clear</emphasis> command clears the trace log.</para>
1072         </listitem>
1073
1074         <listitem>
1075           <para>The <emphasis role="bold">fstrace dump</emphasis> command dumps the contents of the trace log.</para>
1076         </listitem>
1077
1078         <listitem>
1079           <para>The <emphasis role="bold">fstrace help</emphasis> command provides a description and syntax for commands.</para>
1080         </listitem>
1081
1082         <listitem>
1083           <para>The <emphasis role="bold">fstrace lslog</emphasis> command lists information about the trace log.</para>
1084         </listitem>
1085
1086         <listitem>
1087           <para>The <emphasis role="bold">fstrace lsset</emphasis> command lists information about the event set.</para>
1088         </listitem>
1089
1090         <listitem>
1091           <para>The <emphasis role="bold">fstrace setlog</emphasis> command changes the size of the trace log.</para>
1092         </listitem>
1093
1094         <listitem>
1095           <para>The <emphasis role="bold">fstrace setset</emphasis> command sets the state of the event set.</para>
1096         </listitem>
1097       </itemizedlist></para>
1098
1099     <sect2 id="HDRWQ342">
1100       <title>About the fstrace Command Suite</title>
1101
1102       <para>The <emphasis role="bold">fstrace</emphasis> command suite replaces and greatly expands the functionality formerly
1103       provided by the <emphasis role="bold">fs debug</emphasis> command. Its intended use is to aid in diagnosis of specific Cache
1104       Manager problems, such as client machine hangs, cache consistency problems, clock synchronization errors, and failures to
1105       access a volume or AFS file. Therefore, it is best not to keep <emphasis role="bold">fstrace</emphasis> logging enabled at all
1106       times, unlike the logging for AFS server processes.</para>
1107
1108       <para>Most of the messages in the trace log correspond to low-level Cache Manager operations. It is likely that only personnel
1109       familiar with the AFS source code can interpret them. If you have an AFS source license, you can attempt to interpret the
1110       trace yourself, or work with the AFS Product Support group to resolve the underlying problems. If you do not have an AFS
1111       source license, it is probably more efficient to contact the AFS Product Support group immediately in case of problems. They
1112       can instruct you to activate <emphasis role="bold">fstrace</emphasis> tracing if appropriate.</para>
1113
1114       <para>The log can grow in size very quickly; this can use valuable disk space if you are writing to a file in the local file
1115       space. Additionally, if the size of the log becomes too large, it can become difficult to parse the results for pertinent
1116       information.</para>
1117
1118       <indexterm>
1119         <primary>cmfx trace log (fstrace)</primary>
1120       </indexterm>
1121
1122       <indexterm>
1123         <primary>trace log from (fstrace)</primary>
1124
1125         <secondary>cmfx</secondary>
1126       </indexterm>
1127
1128       <para>When AFS tracing is enabled, each time a <emphasis role="bold">cm</emphasis> event occurs, a message is written to the
1129       trace log, <emphasis role="bold">cmfx</emphasis>. To diagnose a problem, read the output of the trace log and analyze the
1130       operations executed by the Cache Manager. The default size of the trace log is 60 KB, but you can increase or decrease
1131       it.</para>
1132
1133       <indexterm>
1134         <primary>cm event set (fstrace)</primary>
1135       </indexterm>
1136
1137       <indexterm>
1138         <primary>event set (fstrace)</primary>
1139
1140         <secondary>cm</secondary>
1141       </indexterm>
1142
1143       <para>To use the <emphasis role="bold">fstrace</emphasis> command suite, you must first enable tracing and reserve, or
1144       allocate, space for the trace log with the <emphasis role="bold">fstrace setset</emphasis> command. With this command, you can
1145       set the <emphasis role="bold">cm</emphasis> event set to one of three states to enable or disable tracing for the event set
1146       and to allocate or deallocate space for the trace log in the kernel: <variablelist>
1147           <indexterm>
1148             <primary>active</primary>
1149
1150             <secondary>state of fstrace event set</secondary>
1151           </indexterm>
1152
1153           <indexterm>
1154             <primary>inactive (state of fstrace event set)</primary>
1155           </indexterm>
1156
1157           <indexterm>
1158             <primary>dormant (state of fstrace event set)</primary>
1159           </indexterm>
1160
1161           <varlistentry>
1162             <term><computeroutput>active</computeroutput></term>
1163
1164             <listitem>
1165               <para>Enables tracing for the event set and allocates space for the trace log.</para>
1166             </listitem>
1167           </varlistentry>
1168
1169           <varlistentry>
1170             <term><computeroutput>inactive</computeroutput></term>
1171
1172             <listitem>
1173               <para>Temporarily disables tracing for the event set; however, the event set continues to allocate space occupied by
1174               the log to which it sends data.</para>
1175             </listitem>
1176           </varlistentry>
1177
1178           <varlistentry>
1179             <term><computeroutput>dormant</computeroutput></term>
1180
1181             <listitem>
1182               <para>Disables tracing for the event set; furthermore, the event set releases the space occupied by the log to which
1183               it sends data. When the <emphasis role="bold">cm</emphasis> event set that sends data to the <emphasis
1184               role="bold">cmfx</emphasis> trace log is in this state, the space allocated for that log is freed or
1185               deallocated.</para>
1186             </listitem>
1187           </varlistentry>
1188         </variablelist></para>
1189
1190       <indexterm>
1191         <primary>persistent fstrace event set or trace log</primary>
1192       </indexterm>
1193
1194       <indexterm>
1195         <primary>trace log (fstrace)</primary>
1196
1197         <secondary>persistence</secondary>
1198       </indexterm>
1199
1200       <indexterm>
1201         <primary>event set (fstrace)</primary>
1202
1203         <secondary>persistence</secondary>
1204       </indexterm>
1205
1206       <para>Both event sets and trace logs can be designated as <emphasis>persistent</emphasis>, which prevents accidental resetting
1207       of an event set's state or clearing of a trace log. The designation is made as the kernel is compiled and cannot be
1208       changed.</para>
1209
1210       <para>If an event set such as <emphasis role="bold">cm</emphasis> is persistent, you can change its state only by including
1211       the <emphasis role="bold">-set</emphasis> argument to the <emphasis role="bold">fstrace setset</emphasis> command. (That is,
1212       you cannot change its state along with the state of all other event sets by issuing the <emphasis role="bold">fstrace
1213       setset</emphasis> command with no arguments.) Similarly, if a trace log such as <emphasis role="bold">cmfx</emphasis> is
1214       persistent, you can clear it only by including either the <emphasis role="bold">-set</emphasis> or <emphasis
1215       role="bold">-log</emphasis> argument to the <emphasis role="bold">fstrace clear</emphasis> command (you cannot clear it along
1216       with all other trace logs by issuing the <emphasis role="bold">fstrace clear</emphasis> command with no arguments.)</para>
1217
1218       <para>When a problem occurs, set the <emphasis role="bold">cm</emphasis> event set to active using the <emphasis
1219       role="bold">fstrace setset</emphasis> command. When tracing is enabled on a busy AFS client, the volume of events being
1220       recorded is significant; therefore, when you are diagnosing problems, restrict AFS activity as much as possible to minimize
1221       the amount of extraneous tracing in the log. Because tracing can have a negative impact on system performance, leave <emphasis
1222       role="bold">cm</emphasis> tracing in the dormant state when you are not diagnosing problems.</para>
1223
1224       <para>If a problem is reproducible, clear the <emphasis role="bold">cmfx</emphasis> trace log with the <emphasis
1225       role="bold">fstrace clear</emphasis> command and reproduce the problem. If the problem is not easily reproduced, keep the
1226       state of the event set active until the problem recurs.</para>
1227
1228       <para>To view the contents of the trace log and analyze the <emphasis role="bold">cm</emphasis> events, use the <emphasis
1229       role="bold">fstrace dump</emphasis> command to copy the content lines of the trace log to standard output (stdout) or to a
1230       file.</para>
1231
1232       <note>
1233         <para>If a particular command or process is causing problems, determine its process id (PID). Search the output of the
1234         <emphasis role="bold">fstrace dump</emphasis> command for the PID to find only those lines associated with the
1235         problem.</para>
1236       </note>
1237     </sect2>
1238
1239     <sect2 id="HDRWQ343">
1240       <title>Requirements for Using the fstrace Command Suite</title>
1241
1242       <indexterm>
1243         <primary>privilege</primary>
1244
1245         <secondary>required for fstrace commands</secondary>
1246       </indexterm>
1247
1248       <indexterm>
1249         <primary>fstrace commands</primary>
1250
1251         <secondary>privilege requirements</secondary>
1252       </indexterm>
1253
1254       <para>Except for the <emphasis role="bold">fstrace help</emphasis> and <emphasis role="bold">fstrace apropos</emphasis>
1255       commands, which require no privilege, issuing the <emphasis role="bold">fstrace</emphasis> commands requires that the issuer
1256       be logged in as the local superuser <emphasis role="bold">root</emphasis> on the local client machine. Before issuing an
1257       <emphasis role="bold">fstrace</emphasis> command, verify that you have the necessary privilege.</para>
1258
1259       <para>The Cache Manager catalog must be in place so that logging can occur. The <emphasis role="bold">fstrace</emphasis>
1260       command suite uses the standard UNIX catalog utilities. The default location is <emphasis
1261       role="bold">/usr/vice/etc/C/afszcm.cat</emphasis>. It can be placed in another directory by placing the file elsewhere and
1262       using the proper NLSPATH and LANG environment variables.</para>
1263     </sect2>
1264
1265     <sect2 id="Header_379">
1266       <title>Using fstrace Commands Effectively</title>
1267
1268       <para>To use <emphasis role="bold">fstrace</emphasis> commands most effectively, configure them as indicated: <itemizedlist>
1269           <listitem>
1270             <para>Store the <emphasis role="bold">fstrace</emphasis> binary in a local disk directory.</para>
1271           </listitem>
1272
1273           <listitem>
1274             <para>When you dump the <emphasis role="bold">fstrace</emphasis> log to a file, direct it to one on the local
1275             disk.</para>
1276           </listitem>
1277
1278           <listitem>
1279             <para>The trace can grow large in just a few minutes. Before attempting to dump the log to a local file, verify that you
1280             have enough room. Be particularly careful if you are using disk quotas on partitions in the local file system.</para>
1281           </listitem>
1282
1283           <listitem>
1284             <para>Attempt to limit Cache Manager activity on the AFS client machine other than the problem operation. This reduces
1285             the amount of extraneous data in the trace.</para>
1286           </listitem>
1287
1288           <listitem>
1289             <para>Activate the <emphasis role="bold">fstrace</emphasis> log for the shortest possibly period of time. If possible
1290             activate the trace immediately before performing the problem operation, deactivate it as soon as the operation
1291             completes, and dump the trace log to a file immediately.</para>
1292           </listitem>
1293
1294           <listitem>
1295             <para>If possible, obtain UNIX process ID (PID) of the command or program that initiates the problematic operation. This
1296             enables the person analyzing the trace log to search it for messages associated with the PID.</para>
1297           </listitem>
1298         </itemizedlist></para>
1299     </sect2>
1300
1301     <sect2 id="HDRWQ344">
1302       <title>Activating the Trace Log</title>
1303
1304       <para>To start Cache Manager tracing on an AFS client machine, you must first configure <itemizedlist>
1305           <listitem>
1306             <para>The <emphasis role="bold">cmfx</emphasis> kernel trace log using the <emphasis role="bold">fstrace
1307             setlog</emphasis> command</para>
1308           </listitem>
1309
1310           <listitem>
1311             <para>The <emphasis role="bold">cm</emphasis> event set using the <emphasis role="bold">fstrace setset</emphasis>
1312             command</para>
1313           </listitem>
1314         </itemizedlist></para>
1315
1316       <para>The <emphasis role="bold">fstrace setlog</emphasis> command sets the size of the <emphasis role="bold">cmfx</emphasis>
1317       kernel trace log in kilobytes. The trace log occupies 60 kilobytes of kernel by default. If the trace log already exists, it
1318       is cleared when this command is issued and a new log of the given size is created. Otherwise, a new log of the desired size is
1319       created.</para>
1320
1321       <para>The <emphasis role="bold">fstrace setset</emphasis> command sets the state of the <emphasis role="bold">cm</emphasis>
1322       kernel event set. The state of the <emphasis role="bold">cm</emphasis> event set determines whether information on the events
1323       in that event set is logged.</para>
1324
1325       <para>After establishing kernel tracing on the AFS client machine, you can check the state of the event set and the size of
1326       the kernel buffer allocated for the trace log. To display information about the state of the <emphasis
1327       role="bold">cm</emphasis> event set, issue the <emphasis role="bold">fstrace lsset</emphasis> command. To display information
1328       about the <emphasis role="bold">cmfx</emphasis> trace log, use the <emphasis role="bold">fstrace lslog</emphasis> command. See
1329       the instructions in <link linkend="HDRWQ346">Displaying the State of a Trace Log or Event Set</link>.</para>
1330
1331       <indexterm>
1332         <primary>fstrace commands</primary>
1333
1334         <secondary>setlog</secondary>
1335       </indexterm>
1336
1337       <indexterm>
1338         <primary>commands</primary>
1339
1340         <secondary>fstrace setlog</secondary>
1341       </indexterm>
1342
1343       <indexterm>
1344         <primary>trace log (fstrace)</primary>
1345
1346         <secondary>configuring</secondary>
1347       </indexterm>
1348
1349       <indexterm>
1350         <primary>configuring</primary>
1351
1352         <secondary>trace log (fstrace)</secondary>
1353       </indexterm>
1354     </sect2>
1355
1356     <sect2 id="Header_381">
1357       <title>To configure the trace log</title>
1358
1359       <orderedlist>
1360         <listitem>
1361           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1362           the <emphasis role="bold">su</emphasis> command. <programlisting>
1363    % <emphasis role="bold">su root</emphasis>
1364    Password: &lt;<replaceable>root_password</replaceable>&gt;
1365 </programlisting></para>
1366         </listitem>
1367
1368         <listitem>
1369           <para>Issue the <emphasis role="bold">fstrace setlog</emphasis> command to set the size of the <emphasis
1370           role="bold">cmfx</emphasis> kernel trace log. <programlisting>
1371    # <emphasis role="bold">fstrace setlog</emphasis>  [<emphasis role="bold">-log</emphasis> &lt;<replaceable>log_name</replaceable>&gt;+]  <emphasis
1372                 role="bold">-buffersize</emphasis> &lt;<replaceable>1-kilobyte_units</replaceable>&gt;
1373 </programlisting></para>
1374         </listitem>
1375       </orderedlist>
1376
1377       <para>The following example sets the size of the <emphasis role="bold">cmfx</emphasis> trace log to 80 KB.</para>
1378
1379       <programlisting>
1380    # <emphasis role="bold">fstrace setlog cmfx 80</emphasis> 
1381 </programlisting>
1382
1383       <indexterm>
1384         <primary>fstrace commands</primary>
1385
1386         <secondary>setset</secondary>
1387       </indexterm>
1388
1389       <indexterm>
1390         <primary>commands</primary>
1391
1392         <secondary>fstrace setset</secondary>
1393       </indexterm>
1394
1395       <indexterm>
1396         <primary>event set (fstrace)</primary>
1397
1398         <secondary>setting</secondary>
1399       </indexterm>
1400
1401       <indexterm>
1402         <primary>setting</primary>
1403
1404         <secondary>event set (fstrace)</secondary>
1405       </indexterm>
1406     </sect2>
1407
1408     <sect2 id="HDRWQ345">
1409       <title>To set the event set</title>
1410
1411       <orderedlist>
1412         <listitem>
1413           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1414           the <emphasis role="bold">su</emphasis> command. <programlisting>
1415    % <emphasis role="bold">su root</emphasis>
1416    Password: &lt;<replaceable>root_password</replaceable>&gt;
1417 </programlisting></para>
1418         </listitem>
1419
1420         <listitem>
1421           <para>Issue the <emphasis role="bold">fstrace setset</emphasis> command to set the state of event sets. <programlisting>
1422    % <emphasis role="bold">fstrace setset</emphasis> [<emphasis role="bold">-set</emphasis> &lt;<replaceable>set_name</replaceable>&gt;+] [<emphasis
1423                 role="bold">-active</emphasis>] [<emphasis role="bold">-inactive</emphasis>]  \
1424                     [<emphasis role="bold">-dormant</emphasis>] 
1425 </programlisting></para>
1426         </listitem>
1427       </orderedlist>
1428
1429       <para>The following example activates the <emphasis role="bold">cm</emphasis> event set.</para>
1430
1431       <programlisting>
1432    # <emphasis role="bold">fstrace setset cm -active</emphasis>
1433 </programlisting>
1434     </sect2>
1435
1436     <sect2 id="HDRWQ346">
1437       <title>Displaying the State of a Trace Log or Event Set</title>
1438
1439       <para>An event set must be in the <emphasis>active state</emphasis> to be included in the trace log. To display an event set's
1440       state, use the <emphasis role="bold">fstrace lsset</emphasis> command. To set its state, issue the <emphasis
1441       role="bold">fstrace setset</emphasis> command as described in <link linkend="HDRWQ345">To set the event set</link>.</para>
1442
1443       <para>To display size and allocation information for the trace log, issue the <emphasis role="bold">fstrace
1444       lslog</emphasis>command with the <emphasis role="bold">-long</emphasis> argument.</para>
1445
1446       <indexterm>
1447         <primary>fstrace commands</primary>
1448
1449         <secondary>lsset</secondary>
1450       </indexterm>
1451
1452       <indexterm>
1453         <primary>commands</primary>
1454
1455         <secondary>fstrace lsset</secondary>
1456       </indexterm>
1457
1458       <indexterm>
1459         <primary>event set (fstrace)</primary>
1460
1461         <secondary>displaying state</secondary>
1462       </indexterm>
1463
1464       <indexterm>
1465         <primary>displaying</primary>
1466
1467         <secondary>state of event set (fstrace)</secondary>
1468       </indexterm>
1469     </sect2>
1470
1471     <sect2 id="Header_384">
1472       <title>To display the state of an event set</title>
1473
1474       <orderedlist>
1475         <listitem>
1476           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1477           the <emphasis role="bold">su</emphasis> command. <programlisting>
1478    % <emphasis role="bold">su root</emphasis>
1479    Password: &lt;<replaceable>root_password</replaceable>&gt;
1480 </programlisting></para>
1481         </listitem>
1482
1483         <listitem>
1484           <para>Issue the <emphasis role="bold">fstrace lsset</emphasis> command to display the available event set and its state.
1485           <programlisting>
1486    # <emphasis role="bold">fstrace lsset</emphasis>  [<emphasis role="bold">-set</emphasis> &lt;<replaceable>set_name</replaceable>&gt;+]
1487 </programlisting></para>
1488         </listitem>
1489       </orderedlist>
1490
1491       <para>The following example displays the event set and its state on the local machine.</para>
1492
1493       <programlisting>
1494    # <emphasis role="bold">fstrace lsset cm</emphasis>
1495    Available sets:
1496    cm active
1497 </programlisting>
1498
1499       <para>The output from this command lists the event set and its states. The three event states for the <emphasis
1500       role="bold">cm</emphasis> event set are: <variablelist>
1501           <varlistentry>
1502             <term><emphasis role="bold">active</emphasis></term>
1503
1504             <listitem>
1505               <para>Tracing is enabled.</para>
1506             </listitem>
1507           </varlistentry>
1508
1509           <varlistentry>
1510             <term><emphasis role="bold">inactive</emphasis></term>
1511
1512             <listitem>
1513               <para>Tracing is disabled, but space is still allocated for the corresponding trace log (<emphasis
1514               role="bold">cmfx</emphasis>).</para>
1515             </listitem>
1516           </varlistentry>
1517
1518           <varlistentry>
1519             <term><emphasis role="bold">dormant</emphasis></term>
1520
1521             <listitem>
1522               <para>Tracing is disabled, and space is no longer allocated for the corresponding trace log (<emphasis
1523               role="bold">cmfx</emphasis>).Disables tracing for the event set.</para>
1524             </listitem>
1525           </varlistentry>
1526         </variablelist></para>
1527
1528       <indexterm>
1529         <primary>fstrace commands</primary>
1530
1531         <secondary>lslog</secondary>
1532       </indexterm>
1533
1534       <indexterm>
1535         <primary>commands</primary>
1536
1537         <secondary>fstrace lslog</secondary>
1538       </indexterm>
1539
1540       <indexterm>
1541         <primary>trace log (fstrace)</primary>
1542
1543         <secondary>displaying state</secondary>
1544       </indexterm>
1545
1546       <indexterm>
1547         <primary>displaying</primary>
1548
1549         <secondary>state of trace log (fstrace)</secondary>
1550       </indexterm>
1551     </sect2>
1552
1553     <sect2 id="Header_385">
1554       <title>To display the log size</title>
1555
1556       <orderedlist>
1557         <listitem>
1558           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1559           the <emphasis role="bold">su</emphasis> command. <programlisting>
1560    % <emphasis role="bold">su root</emphasis>
1561    Password: &lt;<replaceable>root_password</replaceable>&gt;
1562 </programlisting></para>
1563         </listitem>
1564
1565         <listitem>
1566           <para>Issue the <emphasis role="bold">fstrace lslog</emphasis> command to display information about the kernel trace log.
1567           <programlisting>
1568    # <emphasis role="bold">fstrace lslog</emphasis>  [<emphasis role="bold">-set</emphasis> &lt;<replaceable>set_name</replaceable>&gt;+]  [<emphasis
1569                 role="bold">-log</emphasis> &lt;<replaceable>log_name</replaceable>&gt;]  [<emphasis role="bold">-long</emphasis>] 
1570 </programlisting></para>
1571         </listitem>
1572       </orderedlist>
1573
1574       <para>The following example uses the <emphasis role="bold">-long</emphasis> flag to display additional information about the
1575       <emphasis role="bold">cmfx</emphasis> trace log.</para>
1576
1577       <programlisting>
1578    # <emphasis role="bold">fstrace lslog cmfx -long</emphasis>
1579    Available logs:
1580    cmfx : 60 kbytes (allocated)
1581 </programlisting>
1582
1583       <para>The output from this command lists information on the trace log. When issued without the <emphasis
1584       role="bold">-long</emphasis> flag, the <emphasis role="bold">fstrace lslog</emphasis> command lists only the name of the log.
1585       When issued with the <emphasis role="bold">-long</emphasis> flag, the <emphasis role="bold">fstrace lslog</emphasis> command
1586       lists the log, the size of the log in kilobytes, and the allocation state of the log.</para>
1587
1588       <para>There are two allocation states for the kernel trace log: <variablelist>
1589           <varlistentry>
1590             <term><computeroutput>allocated</computeroutput></term>
1591
1592             <listitem>
1593               <para>Space is reserved for the log in the kernel. This indicates that the event set that writes to this log is either
1594               <emphasis>active</emphasis> (tracing is enabled for the event set) or <emphasis>inactive</emphasis> (tracing is
1595               temporarily disabled for the event set); however, the event set continues to reserve space occupied by the log to
1596               which it sends data.</para>
1597             </listitem>
1598           </varlistentry>
1599
1600           <varlistentry>
1601             <term><computeroutput>unallocated</computeroutput></term>
1602
1603             <listitem>
1604               <para>Space is not reserved for the log in the kernel. This indicates that the event set that writes to this log is
1605               <emphasis>dormant</emphasis> (tracing is disabled for the event set); furthermore, the event set releases the space
1606               occupied by the log to which it sends data.</para>
1607             </listitem>
1608           </varlistentry>
1609         </variablelist></para>
1610     </sect2>
1611
1612     <sect2 id="HDRWQ347">
1613       <title>Dumping and Clearing the Trace Log</title>
1614
1615       <para>After the Cache Manager operation you want to trace is complete, use the <emphasis role="bold">fstrace dump</emphasis>
1616       command to dump the trace log to the standard output stream or to the file named by the <emphasis role="bold">-file</emphasis>
1617       argument. Or, to dump the trace log continuously, use the <emphasis role="bold">-follow</emphasis> argument (combine it with
1618       the <emphasis role="bold">-file</emphasis> argument if desired). To halt continuous dumping, press an interrupt signal such as
1619       &lt;<emphasis role="bold">Ctrl-c</emphasis>&gt;.</para>
1620
1621       <para>To clear a trace log when you no longer need the data in it, issue the <emphasis role="bold">fstrace clear</emphasis>
1622       command. (The <emphasis role="bold">fstrace setlog</emphasis> command also clears an existing trace log automatically when you
1623       use it to change the log's size.)</para>
1624
1625       <indexterm>
1626         <primary>fstrace commands</primary>
1627
1628         <secondary>dump</secondary>
1629       </indexterm>
1630
1631       <indexterm>
1632         <primary>commands</primary>
1633
1634         <secondary>fstrace dump</secondary>
1635       </indexterm>
1636
1637       <indexterm>
1638         <primary>trace log (fstrace)</primary>
1639
1640         <secondary>dumping</secondary>
1641       </indexterm>
1642
1643       <indexterm>
1644         <primary>displaying</primary>
1645
1646         <secondary>contents of trace log (fstrace)</secondary>
1647       </indexterm>
1648
1649       <indexterm>
1650         <primary>dumping</primary>
1651
1652         <secondary>trace log contents (fstrace)</secondary>
1653       </indexterm>
1654     </sect2>
1655
1656     <sect2 id="Header_387">
1657       <title>To dump the contents of a trace log</title>
1658
1659       <orderedlist>
1660         <listitem>
1661           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1662           the <emphasis role="bold">su</emphasis> command. <programlisting>
1663    % <emphasis role="bold">su root</emphasis>
1664    Password: &lt;<replaceable>root_password</replaceable>&gt;
1665 </programlisting></para>
1666         </listitem>
1667
1668         <listitem>
1669           <para>Issue the <emphasis role="bold">fstrace dump</emphasis> command to dump trace logs. <programlisting>
1670    # <emphasis role="bold">fstrace dump</emphasis> [<emphasis role="bold">-set</emphasis> &lt;<replaceable>set_name</replaceable>&gt;+]  [<emphasis
1671                 role="bold">-follow</emphasis> &lt;<replaceable>log_name</replaceable>&gt;]  \
1672                   [<emphasis role="bold">-file</emphasis> &lt;<replaceable>output_filename</replaceable>&gt;]  \
1673                   [<emphasis role="bold">-sleep</emphasis> &lt;<replaceable>seconds_between_reads</replaceable>&gt;]
1674 </programlisting></para>
1675         </listitem>
1676       </orderedlist>
1677
1678       <para>At the beginning of the output of each dump is a header specifying the date and time at which the dump began. The number
1679       of logs being dumped is also displayed if the <emphasis role="bold">-follow</emphasis> argument is not specified. The header
1680       appears as follows:</para>
1681
1682       <programlisting>
1683    AFS Trace Dump --
1684    Date: date time
1685    Found n logs.
1686 </programlisting>
1687
1688       <para>where <emphasis>date</emphasis> is the starting date of the trace log dump, <emphasis>time</emphasis> is the starting
1689       time of the trace log dump, and <emphasis>n</emphasis> specifies the number of logs found by the <emphasis role="bold">fstrace
1690       dump</emphasis> command.</para>
1691
1692       <para>The following is an example of trace log dump header:</para>
1693
1694       <programlisting>
1695    AFS Trace Dump --
1696    Date: Fri Apr 16 10:44:38 1999
1697    Found 1 logs.
1698 </programlisting>
1699
1700       <para>The contents of the log follow the header and are comprised of messages written to the log from an active event set. The
1701       messages written to the log contain the following three components: <itemizedlist>
1702           <listitem>
1703             <para>The timestamp associated with the message (number of seconds from an arbitrary start point)</para>
1704           </listitem>
1705
1706           <listitem>
1707             <para>The process ID or thread ID associated with the message</para>
1708           </listitem>
1709
1710           <listitem>
1711             <para>The message itself</para>
1712           </listitem>
1713         </itemizedlist></para>
1714
1715       <para>A trace log message is formatted as follows:</para>
1716
1717       <programlisting>
1718    time timestamp, pid pid:event message
1719 </programlisting>
1720
1721       <para>where <emphasis>timestamp</emphasis> is the number of seconds from an arbitrary start point, <emphasis>pid</emphasis> is
1722       the process ID number of the Cache Manager event, and <emphasis>event message</emphasis> is the Cache Manager event which
1723       corresponds with a function in the AFS source code.</para>
1724
1725       <para>The following is an example of a dumped trace log message:</para>
1726
1727       <programlisting>
1728    time 749.641274, pid 3002:Returning code 2 from 19
1729 </programlisting>
1730
1731       <para>For the messages in the trace log to be most readable, the Cache Manager catalog file needs to be installed on the local
1732       disk of the client machine; the conventional location is <emphasis role="bold">/usr/vice/etc/C/afszcm.cat</emphasis>. Log
1733       messages that begin with the string <computeroutput>raw op</computeroutput>, like the following, indicate that the catalog is
1734       not installed.</para>
1735
1736       <programlisting>
1737    raw op 232c, time 511.916288, pid 0
1738    p0:Fri Apr 16 10:36:31 1999
1739 </programlisting>
1740
1741       <para>Every 1024 seconds, a current time message is written to each log. This message has the following format:</para>
1742
1743       <programlisting>
1744    time timestamp, pid pid: Current time: unix_time
1745 </programlisting>
1746
1747       <para>where timestamp is the number of seconds from an arbitrary start point, pid is the process ID number, and unix_time is
1748       the standard time format since January 1, 1970.</para>
1749
1750       <para>The current time message can be used to determine the actual time associated with each log message. Determine the actual
1751       time as follows: <orderedlist>
1752           <listitem>
1753             <para>Locate the log message whose actual time you want to determine.</para>
1754           </listitem>
1755
1756           <listitem>
1757             <para>Search backward through the dump record until you come to a current time message.</para>
1758           </listitem>
1759
1760           <listitem>
1761             <para>If the current time message's <emphasis>timestamp</emphasis> is smaller than the log message's
1762             <emphasis>timestamp</emphasis>, subtract the former from the latter. If the current time message's
1763             <emphasis>timestamp</emphasis> is larger than the log message's <emphasis>timestamp</emphasis>, add 1024 to the latter
1764             and subtract the former from the result.</para>
1765           </listitem>
1766
1767           <listitem>
1768             <para>Add the resulting number to the current time message's <emphasis>unix_time</emphasis> to determine the log
1769             message's actual time.</para>
1770           </listitem>
1771         </orderedlist></para>
1772
1773       <para>Because log data is stored in a finite, circular buffer, some of the data can be overwritten before being read. If this
1774       happens, the following message appears at the appropriate place in the dump:</para>
1775
1776       <programlisting>
1777    Log wrapped; data missing.
1778 </programlisting>
1779
1780       <note>
1781         <para>If this message appears in the middle of a dump, which can happen under a heavy work load, it indicates that not all
1782         of the log data is being written to the log or some data is being overwritten. Increasing the size of the log with the
1783         <emphasis role="bold">fstrace setlog</emphasis> command can alleviate this problem.</para>
1784       </note>
1785
1786       <indexterm>
1787         <primary>fstrace commands</primary>
1788
1789         <secondary>clear</secondary>
1790       </indexterm>
1791
1792       <indexterm>
1793         <primary>commands</primary>
1794
1795         <secondary>fstrace clear</secondary>
1796       </indexterm>
1797
1798       <indexterm>
1799         <primary>trace log (fstrace)</primary>
1800
1801         <secondary>clearing contents</secondary>
1802       </indexterm>
1803
1804       <indexterm>
1805         <primary>clearing</primary>
1806
1807         <secondary>contents of trace log (fstrace)</secondary>
1808       </indexterm>
1809
1810       <indexterm>
1811         <primary>removing</primary>
1812
1813         <secondary>trace log contents (fstrace)</secondary>
1814       </indexterm>
1815     </sect2>
1816
1817     <sect2 id="Header_388">
1818       <title>To clear the contents of a trace log</title>
1819
1820       <orderedlist>
1821         <listitem>
1822           <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1823           the <emphasis role="bold">su</emphasis> command. <programlisting>
1824    % <emphasis role="bold">su root</emphasis>
1825    Password: &lt;<replaceable>root_password</replaceable>&gt;
1826 </programlisting></para>
1827         </listitem>
1828
1829         <listitem>
1830           <para>Issue the <emphasis role="bold">fstrace clear</emphasis> command to clear logs by log name or by event set.
1831           <programlisting>
1832    # <emphasis role="bold">fstrace clear</emphasis>  [<emphasis role="bold">-set</emphasis> &lt;<replaceable>set_name</replaceable>&gt;+]  [<emphasis
1833                 role="bold">-log</emphasis> &lt;<replaceable>log_name</replaceable>&gt;+]
1834 </programlisting></para>
1835         </listitem>
1836       </orderedlist>
1837
1838       <para>The following example clears the <emphasis role="bold">cmfx</emphasis> log used by the <emphasis
1839       role="bold">cm</emphasis> event set on the local machine.</para>
1840
1841       <programlisting>
1842    # <emphasis role="bold">fstrace clear cm</emphasis>
1843 </programlisting>
1844
1845       <para>The following example also clears the <emphasis role="bold">cmfx</emphasis> log on the local machine.</para>
1846
1847       <programlisting>
1848    # <emphasis role="bold">fstrace clear cmfx</emphasis>
1849 </programlisting>
1850
1851       <indexterm>
1852         <primary>fstrace commands</primary>
1853
1854         <secondary>example of use</secondary>
1855       </indexterm>
1856     </sect2>
1857
1858     <sect2 id="HDRWQ348">
1859       <title>Examples of fstrace Commands</title>
1860
1861       <para>This section contains an extensive example of the use of the <emphasis role="bold">fstrace</emphasis> command suite,
1862       which is useful for gathering a detailed trace of Cache Manager activity when you are working with AFS Product Support to
1863       diagnose a problem. The Product Support representative can guide you in choosing appropriate parameter settings for the
1864       trace.</para>
1865
1866       <para>Before starting the kernel trace log, try to isolate the Cache Manager on the AFS client machine that is experiencing
1867       the problem accessing the file. If necessary, instruct users to move to another machine so as to minimize the Cache Manager
1868       activity on this machine. To minimize the amount of unrelated AFS activity recorded in the trace log, place both the <emphasis
1869       role="bold">fstrace</emphasis> binary and the dump file must reside on the local disk, not in AFS. You must be logged in as
1870       the local superuser <emphasis role="bold">root</emphasis> to issue <emphasis role="bold">fstrace</emphasis> commands.</para>
1871
1872       <para>Before starting a kernel trace, issue the <emphasis role="bold">fstrace lsset</emphasis> command to check the state of
1873       the <emphasis role="bold">cm</emphasis> event set.</para>
1874
1875       <programlisting>
1876    # <emphasis role="bold">fstrace lsset cm</emphasis>
1877 </programlisting>
1878
1879       <para>If tracing has not been enabled previously or if tracing has been turned off on the client machine, the following output
1880       is displayed:</para>
1881
1882       <programlisting>
1883    Available sets:
1884    cm inactive
1885 </programlisting>
1886
1887       <para>If tracing has been turned off and kernel memory is not allocated for the trace log on the client machine, the following
1888       output is displayed:</para>
1889
1890       <programlisting>
1891    Available sets:
1892    cm inactive (dormant)
1893 </programlisting>
1894
1895       <para>If the current state of the <emphasis role="bold">cm</emphasis> event set is <computeroutput>inactive</computeroutput>
1896       or <computeroutput>inactive (dormant)</computeroutput>, turn on kernel tracing by issuing the <emphasis role="bold">fstrace
1897       setset</emphasis> command with the <emphasis role="bold">-active</emphasis> flag.</para>
1898
1899       <programlisting>
1900    # <emphasis role="bold">fstrace setset cm -active</emphasis>
1901 </programlisting>
1902
1903       <para>If tracing is enabled currently on the client machine, the following output is displayed:</para>
1904
1905       <programlisting>
1906    Available sets:
1907    cm active
1908 </programlisting>
1909
1910       <para>If tracing is enabled currently, you do not need to use the <emphasis role="bold">fstrace setset</emphasis> command. Do
1911       issue the <emphasis role="bold">fstrace clear</emphasis> command to clear the contents of any existing trace log, removing
1912       prior traces that are not related to the current problem.</para>
1913
1914       <programlisting>
1915    # <emphasis role="bold">fstrace clear cm</emphasis>
1916 </programlisting>
1917
1918       <para>After checking on the state of the event set, issue the <emphasis role="bold">fstrace lslog</emphasis> command with the
1919       <emphasis role="bold">-long</emphasis> flag to check the current state and size of the kernel trace log .</para>
1920
1921       <programlisting>
1922    # <emphasis role="bold">fstrace lslog cmfx -long</emphasis>
1923 </programlisting>
1924
1925       <para>If tracing has not been enabled previously or the <emphasis role="bold">cm</emphasis> event set was set to
1926       <computeroutput>active</computeroutput> or <computeroutput>inactive</computeroutput> previously, output similar to the
1927       following is displayed:</para>
1928
1929       <programlisting>
1930    Available logs:
1931    cmfx : 60 kbytes (allocated)
1932 </programlisting>
1933
1934       <para>The <emphasis role="bold">fstrace</emphasis> tracing utility allocates 60 kilobytes of memory to the trace log by
1935       default. You can increase or decrease the amount of memory allocated to the kernel trace log by setting it with the <emphasis
1936       role="bold">fstrace setlog</emphasis> command. The number specified with the <emphasis role="bold">-buffersize</emphasis>
1937       argument represents the number of kilobytes allocated to the kernel trace log. If you increase the size of the kernel trace
1938       log to 100 kilobytes, issue the following command.</para>
1939
1940       <programlisting>
1941    # <emphasis role="bold">fstrace setlog cmfx</emphasis> 100
1942 </programlisting>
1943
1944       <para>After ensuring that the kernel trace log is configured for your needs, you can set up a file into which you can dump the
1945       kernel trace log. For example, create a dump file with the name <emphasis role="bold">cmfx.dump.file.1</emphasis> using the
1946       following <emphasis role="bold">fstrace dump</emphasis> command. Issue the command as a continuous process by adding the
1947       <emphasis role="bold">-follow</emphasis> and <emphasis role="bold">-sleep</emphasis> arguments. Setting the <emphasis
1948       role="bold">-sleep</emphasis> argument to <emphasis>10</emphasis> dumps output from the kernel trace log to the file every 10
1949       seconds.</para>
1950
1951       <programlisting>
1952    # <emphasis role="bold">fstrace dump -follow</emphasis> cmfx <emphasis role="bold">-file</emphasis> cmfx.dump.file.1 <emphasis
1953           role="bold">-sleep</emphasis> 10
1954    AFS Trace Dump -
1955       Date: Fri Apr 16 10:54:57 1999
1956    Found 1 logs.
1957    time 32.965783, pid 0: Fri Apr 16 10:45:52 1999
1958    time 32.965783, pid 33657: Close 0x5c39ed8 flags 0x20 
1959    time 32.965897, pid 33657: Gn_close vp 0x5c39ed8 flags 0x20 (returns
1960    0x0) 
1961    time 35.159854, pid 10891: Breaking callback for 5bd95e4 states 1024
1962    (volume 0)
1963    time 35.407081, pid 10891: Breaking callback for 5c0fadc states 1024
1964    (volume 0)
1965        .                         .
1966        .                         .
1967        .                         .
1968    time 71.440456, pid 33658: Lookup adp 0x5bbdcf0 name g3oCKs fid (756
1969    4fb7e:588d240.2ff978a8.6) 
1970    time 71.440569, pid 33658: Returning code 2 from 19 
1971    time 71.440619, pid 33658: Gn_lookup vp 0x5bbdcf0 name g3oCKs (returns
1972    0x2) 
1973    time 71.464989, pid 38267: Gn_open vp 0x5bbd000 flags 0x0 (returns 0x
1974    0) 
1975    AFS Trace Dump - Completed
1976 </programlisting>
1977     </sect2>
1978   </sect1>
1979
1980   <sect1 id="HDRWQ349">
1981     <title>Using the afsmonitor Program</title>
1982
1983     <indexterm>
1984       <primary>afsmonitor program</primary>
1985
1986       <secondary>features summarized</secondary>
1987     </indexterm>
1988
1989     <para>The <emphasis role="bold">afsmonitor</emphasis> program enables you to monitor the status and performance of specified
1990     File Server and Cache Manager processes by gathering statistical information. Among its other uses, the <emphasis
1991     role="bold">afsmonitor</emphasis> program can be used to fine-tune Cache Manager configuration and load balance File
1992     Servers.</para>
1993
1994     <para>The <emphasis role="bold">afsmonitor</emphasis> program enables you to perform the following tasks. <itemizedlist>
1995         <listitem>
1996           <para>Monitor any number of File Server and Cache Manager processes on any number of machines (in both local and foreign
1997           cells) from a single location.</para>
1998         </listitem>
1999
2000         <listitem>
2001           <para>Set threshold values for any monitored statistic. When the value of a statistic exceeds the threshold, the <emphasis
2002           role="bold">afsmonitor</emphasis> program highlights it to draw your attention. You can set threshold levels that apply to
2003           every machine or only some.</para>
2004         </listitem>
2005
2006         <listitem>
2007           <para>Invoke programs or scripts automatically when a statistic exceeds its threshold.</para>
2008         </listitem>
2009       </itemizedlist></para>
2010
2011     <sect2 id="HDRWQ350">
2012       <title>Requirements for running the afsmonitor program</title>
2013
2014       <indexterm>
2015         <primary>afsmonitor program</primary>
2016
2017         <secondary>requirements for running</secondary>
2018       </indexterm>
2019
2020       <para>The following software must be accessible to a machine where the <emphasis role="bold">afsmonitor</emphasis> program is
2021       running: <itemizedlist>
2022           <listitem>
2023             <para>The AFS <emphasis role="bold">xstat</emphasis> libraries, which the <emphasis role="bold">afsmonitor</emphasis>
2024             program uses to gather data</para>
2025           </listitem>
2026
2027           <listitem>
2028             <para>The <emphasis role="bold">curses</emphasis> graphics package, which most UNIX distributions provide as a standard
2029             utility</para>
2030           </listitem>
2031         </itemizedlist></para>
2032
2033       <indexterm>
2034         <primary>curses graphics utility</primary>
2035
2036         <secondary>afsmonitor program</secondary>
2037       </indexterm>
2038
2039       <indexterm>
2040         <primary>xstat as requirement for running afsmonitor</primary>
2041       </indexterm>
2042
2043       <para>The <emphasis role="bold">afsmonitor</emphasis> screens format successfully both on so-called dumb terminals and in
2044       windowing systems that emulate terminals. For the output to looks its best, the display environment needs to support reverse
2045       video and cursor addressing. Set the TERM environment variable to the correct terminal type, or to a value that has
2046       characteristics similar to the actual terminal type. The display window or terminal must be at least 80 columns wide and 12
2047       lines long.</para>
2048
2049       <indexterm>
2050         <primary>afsmonitor program</primary>
2051
2052         <secondary>setting terminal type</secondary>
2053       </indexterm>
2054
2055       <indexterm>
2056         <primary>terminal type</primary>
2057
2058         <secondary>setting for afsmonitor</secondary>
2059       </indexterm>
2060
2061       <indexterm>
2062         <primary>dumb terminal</primary>
2063
2064         <secondary>use with afsmonitor</secondary>
2065       </indexterm>
2066
2067       <para>The <emphasis role="bold">afsmonitor</emphasis> program must run in the foreground, and in its own separate, dedicated
2068       window or terminal. The window or terminal is unavailable for any other activity as long as the <emphasis
2069       role="bold">afsmonitor</emphasis> program is running. Any number of instances of the <emphasis
2070       role="bold">afsmonitor</emphasis> program can run on a single machine, as long as each instance runs in its own dedicated
2071       window or terminal. Note that it can take up to three minutes to start an additional instance.</para>
2072
2073       <indexterm>
2074         <primary>privilege</primary>
2075
2076         <secondary>required for afsmonitor program</secondary>
2077       </indexterm>
2078
2079       <para>No privilege is required to run the <emphasis role="bold">afsmonitor</emphasis> program. By convention, it is installed
2080       in the <emphasis role="bold">/usr/afsws/bin</emphasis> directory, and anyone who can access the directory can monitor File
2081       Servers and Cache Managers. The probes through which the <emphasis role="bold">afsmonitor</emphasis> program collects
2082       statistics do not constitute a significant burden on the File Server or Cache Manager unless hundreds of people are running
2083       the program. If you wish to restrict its use, place the binary file in a directory available only to authorized users.</para>
2084     </sect2>
2085
2086     <sect2 id="Header_392">
2087       <title>The afsmonitor Output Screens</title>
2088
2089       <indexterm>
2090         <primary>afsmonitor program</primary>
2091
2092         <secondary>screen layout</secondary>
2093       </indexterm>
2094
2095       <para>The <emphasis role="bold">afsmonitor</emphasis> program displays its data on three screens: <itemizedlist>
2096           <listitem>
2097             <para><computeroutput>System Overview</computeroutput>: This screen appears automatically when the <emphasis
2098             role="bold">afsmonitor</emphasis> program initializes. It summarizes separately for File Servers and Cache Managers the
2099             number of machines being monitored and how many of them have <emphasis>alerts</emphasis> (statistics that have exceeded
2100             their thresholds). It then lists the hostname and number of alerts for each machine being monitored, indicating if
2101             appropriate that a process failed to respond to the last probe.</para>
2102           </listitem>
2103
2104           <listitem>
2105             <para><computeroutput>File Server</computeroutput>: This screen displays File Server statistics for each file server
2106             machine being monitored. It highlights statistics that have exceeded their thresholds, and identifies machines that
2107             failed to respond to the last probe.</para>
2108           </listitem>
2109
2110           <listitem>
2111             <para><computeroutput>Cache Managers</computeroutput>: This screen displays Cache Manager statistics for each client
2112             machine being monitored. It highlights statistics that have exceeded their thresholds, and identifies machines that
2113             failed to respond to the last probe.</para>
2114           </listitem>
2115         </itemizedlist></para>
2116
2117       <para>Fields at the corners of every screen display the following information: <itemizedlist>
2118           <listitem>
2119             <para>In the top left corner, the program name and version number.</para>
2120           </listitem>
2121
2122           <listitem>
2123             <para>In the top right corner, the screen name, current and total page numbers, and current and total column numbers.
2124             The page number (for example, <computeroutput>p. 1 of 3</computeroutput>) indicates the index of the current page and
2125             the total number of (vertical) pages over which data is displayed. The column number (for example, <computeroutput>c. 1
2126             of 235</computeroutput>) indicates the index of the current leftmost column and the total number of columns in which
2127             data appears. (The symbol <computeroutput>&gt;&gt;&gt;</computeroutput> indicates that there is additional data to the
2128             right; the symbol <computeroutput>&lt;&lt;&lt;</computeroutput> indicates that there is additional data to the
2129             left.)</para>
2130           </listitem>
2131
2132           <listitem>
2133             <para>In the bottom left corner, a list of the available commands. Enter the first letter in the command name to run
2134             that command. Only the currently possible options appear; for example, if there is only one page of data, the
2135             <computeroutput>next</computeroutput> and <computeroutput>prev</computeroutput> commands, which scroll the screen up and
2136             down respectively, do not appear. For descriptions of the commands, see the following section about navigating the
2137             display screens.</para>
2138           </listitem>
2139
2140           <listitem>
2141             <para>In the bottom right corner, the <computeroutput>probes</computeroutput> field reports how many times the program
2142             has probed File Servers (<computeroutput>fs</computeroutput>), Cache Managers (<computeroutput>cm</computeroutput>), or
2143             both. The counts for File Servers and Cache Managers can differ. The <computeroutput>freq</computeroutput> field reports
2144             how often the program sends probes.</para>
2145           </listitem>
2146         </itemizedlist></para>
2147
2148       <para><emphasis role="bold">Navigating the afsmonitor Display Screens</emphasis></para>
2149
2150       <para>As noted, the lower left hand corner of every display screen displays the names of the commands currently available for
2151       moving to alternate screens, which can either be a different type or display more statistics or machines of the current type.
2152       To execute a command, press the lowercase version of the first letter in its name. Some commands also have an uppercase
2153       version that has a somewhat different effect, as indicated in the following list. <variablelist>
2154           <varlistentry>
2155             <term><computeroutput>cm</computeroutput></term>
2156
2157             <listitem>
2158               <para>Switches to the <computeroutput>Cache Managers</computeroutput> screen. Available only on the
2159               <computeroutput>System Overview</computeroutput> and <computeroutput>File Servers</computeroutput> screens.</para>
2160             </listitem>
2161           </varlistentry>
2162
2163           <varlistentry>
2164             <term><computeroutput>fs</computeroutput></term>
2165
2166             <listitem>
2167               <para>Switches to the <computeroutput>File Servers</computeroutput> screen. Available only on the
2168               <computeroutput>System Overview</computeroutput> and the <computeroutput>Cache Managers</computeroutput>
2169               screens.</para>
2170             </listitem>
2171           </varlistentry>
2172
2173           <varlistentry>
2174             <term><computeroutput>left</computeroutput></term>
2175
2176             <listitem>
2177               <para>Scrolls horizontally to the left, to access the data columns situated to the left of the current set. Available
2178               when the <computeroutput>&lt;&lt;&lt;</computeroutput> symbol appears at the top left of the screen. Press uppercase
2179               <emphasis role="bold">L</emphasis> to scroll horizontally all the way to the left (to display the first set of data
2180               columns).</para>
2181             </listitem>
2182           </varlistentry>
2183
2184           <varlistentry>
2185             <term><computeroutput>next</computeroutput></term>
2186
2187             <listitem>
2188               <para>Scrolls down vertically to the next page of machine names. Available when there are two or more pages of
2189               machines and the final page is not currently displayed. Press uppercase <emphasis role="bold">N</emphasis> to scroll
2190               to the final page.</para>
2191             </listitem>
2192           </varlistentry>
2193
2194           <varlistentry>
2195             <term><computeroutput>oview</computeroutput></term>
2196
2197             <listitem>
2198               <para>Switches to the <computeroutput>System Overview</computeroutput> screen. Available only on the
2199               <computeroutput>Cache Managers</computeroutput> and <computeroutput>File Servers</computeroutput> screens.</para>
2200             </listitem>
2201           </varlistentry>
2202
2203           <varlistentry>
2204             <term><computeroutput>prev</computeroutput></term>
2205
2206             <listitem>
2207               <para>Scrolls up vertically to the previous page of machine names. Available when there are two or more pages of
2208               machines and the first page is not currently displayed. Press uppercase <emphasis role="bold">N</emphasis> to scroll
2209               to the first page.</para>
2210             </listitem>
2211           </varlistentry>
2212
2213           <varlistentry>
2214             <term><computeroutput>right</computeroutput></term>
2215
2216             <listitem>
2217               <para>Scrolls horizontally to the right, to access the data columns situated to the right of the current set. This
2218               command is available when the <computeroutput>&gt;&gt;&gt;</computeroutput> symbol appears at the upper right of the
2219               screen. Press uppercase <emphasis role="bold">R</emphasis> to scroll horizontally all the way to the right (to display
2220               the final set of data columns).</para>
2221             </listitem>
2222           </varlistentry>
2223         </variablelist></para>
2224     </sect2>
2225
2226     <sect2 id="Header_393">
2227       <title>The System Overview Screen</title>
2228
2229       <para>The <computeroutput>System Overview</computeroutput> screen appears automatically as the <emphasis
2230       role="bold">afsmonitor</emphasis> program initializes. This screen displays the status of as many File Server and Cache
2231       Manager processes as can fit in the current window; scroll down to access additional information.</para>
2232
2233       <para>The information on this screen is split into File Server information on the left and Cache Manager information on the
2234       right. The header for each grouping reports two pieces of information: <itemizedlist>
2235           <listitem>
2236             <para>The number of machines on which the program is monitoring the indicated process</para>
2237           </listitem>
2238
2239           <listitem>
2240             <para>The number of alerts and the number of machines affected by them (an <emphasis>alert</emphasis> means that a
2241             statistic has exceeded its threshold or a process failed to respond to the last probe)</para>
2242           </listitem>
2243         </itemizedlist></para>
2244
2245       <para>A list of the machines being monitored follows. If there are any alerts on a machine, the number of them appears in
2246       square brackets to the left of the hostname. If a process failed to respond to the last probe, the letters
2247       <computeroutput>PF</computeroutput> (probe failure) appear in square brackets to the left of the hostname.</para>
2248
2249       <para>The following graphic is an example <computeroutput>System Overview</computeroutput> screen. The <emphasis
2250       role="bold">afsmonitor</emphasis> program is monitoring six File Servers and seven Cache Managers. The File Server process on
2251       host <emphasis role="bold">fs1.abc.com</emphasis> and the Cache Manager on host <emphasis role="bold">cli33.abc.com</emphasis>
2252       are each marked <computeroutput>[ 1]</computeroutput> to indicate that one threshold value is exceeded. The
2253       <computeroutput>[PF]</computeroutput> marker on host <emphasis role="bold">fs6.abc.com</emphasis> indicates that its File
2254       Server process did not respond to the last probe.</para>
2255
2256       <figure id="Figure_6" label="6">
2257         <title>The afsmonitor System Overview Screen</title>
2258
2259         <mediaobject>
2260           <imageobject>
2261             <imagedata fileref="overview.png" scale="50" />
2262           </imageobject>
2263         </mediaobject>
2264       </figure>
2265
2266       <para><emphasis role="bold"> </emphasis></para>
2267     </sect2>
2268
2269     <sect2 id="Header_394">
2270       <title>The File Servers Screen</title>
2271
2272       <para>The <computeroutput>File Servers</computeroutput> screen displays the values collected at the most recent probe for File
2273       Server statistics.</para>
2274
2275       <para>A summary line at the top of the screen (just below the standard program version and screen title blocks) specifies the
2276       number of monitored File Servers, the number of alerts, and the number of machines affected by the alerts.</para>
2277
2278       <para>The first column always displays the hostnames of the machines running the monitored File Servers.</para>
2279
2280       <para>To the right of the hostname column appear as many columns of statistics as can fit within the current width of the
2281       display screen or window; each column requires space for 10 characters. The name of the statistic appears at the top of each
2282       column. If the File Server on a machine did not respond to the most recent probe, a pair of dashes
2283       (<computeroutput>--</computeroutput>) appears in each column. If a value exceeds its configured threshold, it is highlighted
2284       in reverse video. If a value is too large to fit into the allotted column width, it overflows into the next row in the same
2285       column.</para>
2286
2287       <para>For a list of the available File Server statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program
2288       Statistics</link>.</para>
2289
2290       <para>The following graphic depicts the <computeroutput>File Servers</computeroutput> screen that follows the System Overview
2291       Screen example previously discussed; however, one additional server probe has been completed. In this example, the File Server
2292       process on <emphasis role="bold">fs1</emphasis> has exceeded the configured threshold for the number of performance calls
2293       received (the <emphasis role="bold">numPerfCalls</emphasis> statistic), and that field appears in reverse video. Host
2294       <emphasis role="bold">fs6</emphasis> did not respond to Probe 10, so dashes appear in all fields.</para>
2295
2296       <figure id="Figure_7" label="7">
2297         <title>The afsmonitor File Servers Screen</title>
2298
2299         <mediaobject>
2300           <imageobject>
2301             <imagedata fileref="fserver1.png" scale="50" />
2302           </imageobject>
2303         </mediaobject>
2304       </figure>
2305
2306       <para><emphasis role="bold"> </emphasis></para>
2307
2308       <para>Both the File Servers and Cache Managers screen (discussed in the following section) can display hundreds of columns of
2309       data and are therefore designed to scroll left and right. In the preceding graphic, the screen displays the leftmost screen
2310       and the screen title block shows that column 1 of 235 is displayed. The appearance of the
2311       <computeroutput>&gt;&gt;&gt;</computeroutput> symbol in the upper right hand corner of the screen and the <emphasis
2312       role="bold">right</emphasis> command in the command block indicate that additional data is available by scrolling right. (For
2313       information on the available statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program
2314       Statistics</link>.)</para>
2315
2316       <para>If the <emphasis role="bold">right</emphasis> command is executed, the screen looks something like the following
2317       example. Note that the horizontal scroll symbols now point both to the left (<computeroutput>&lt;&lt;&lt;</computeroutput>)
2318       and to the right (<computeroutput>&gt;&gt;&gt;</computeroutput>) and both the <emphasis role="bold">left</emphasis> and
2319       <emphasis role="bold">right</emphasis> commands appear, indicating that additional data is available by scrolling both left
2320       and right.</para>
2321
2322       <figure id="Figure_8" label="8">
2323         <title>The afsmonitor File Servers Screen Shifted One Page to the Right</title>
2324
2325         <mediaobject>
2326           <imageobject>
2327             <imagedata fileref="fserver2.png" scale="50" />
2328           </imageobject>
2329         </mediaobject>
2330       </figure>
2331
2332       <para><emphasis role="bold"> </emphasis></para>
2333     </sect2>
2334
2335     <sect2 id="Header_395">
2336       <title>The Cache Managers Screen</title>
2337
2338       <para>The <computeroutput>Cache Managers</computeroutput> screen displays the values collected at the most recent probe for
2339       Cache Manager statistics.</para>
2340
2341       <para>A summary line at the top of the screen (just below the standard program version and screen title blocks) specifies the
2342       number of monitored Cache Managers, the number of alerts, and the number of machines affected by the alerts.</para>
2343
2344       <para>The first column always displays the hostnames of the machines running the monitored Cache Managers.</para>
2345
2346       <para>To the right of the hostname column appear as many columns of statistics as can fit within the current width of the
2347       display screen or window; each column requires space for 10 characters. The name of the statistic appears at the top of each
2348       column. If the Cache Manager on a machine did not respond to the most recent probe, a pair of dashes
2349       (<computeroutput>--</computeroutput>) appears in each column. If a value exceeds its configured threshold, it is highlighted
2350       in reverse video. If a value is too large to fit into the allotted column width, it overflows into the next row in the same
2351       column.</para>
2352
2353       <para>For a list of the available Cache Manager statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program
2354       Statistics</link>.</para>
2355
2356       <para>The following graphic depicts a Cache Managers screen that follows the System Overview Screen previously discussed. In
2357       the example, the Cache Manager process on host <emphasis role="bold">cli33</emphasis> has exceeded the configured threshold
2358       for the number of cells it can contact (the <emphasis role="bold">numCellsContacted</emphasis> statistic), so that field
2359       appears in reverse video.</para>
2360
2361       <figure id="Figure_9" label="9">
2362         <title>The afsmonitor Cache Managers Screen</title>
2363
2364         <mediaobject>
2365           <imageobject>
2366             <imagedata fileref="cachmgr.png" scale="50" />
2367           </imageobject>
2368         </mediaobject>
2369       </figure>
2370
2371       <para><emphasis role="bold"> </emphasis></para>
2372     </sect2>
2373   </sect1>
2374
2375   <sect1 id="HDRWQ351">
2376     <title>Configuring the afsmonitor Program</title>
2377
2378     <indexterm>
2379       <primary>afsmonitor program</primary>
2380
2381       <secondary>creating configuration files for</secondary>
2382     </indexterm>
2383
2384     <indexterm>
2385       <primary>configuring</primary>
2386
2387       <secondary>afsmonitor program</secondary>
2388     </indexterm>
2389
2390     <para>To customize the <emphasis role="bold">afsmonitor</emphasis> program, create an ASCII-format configuration file and use
2391     the <emphasis role="bold">-config</emphasis> argument to name it. You can specify the following in the configuration file:
2392     <itemizedlist>
2393         <listitem>
2394           <para>The File Servers, Cache Managers, or both to monitor.</para>
2395         </listitem>
2396
2397         <listitem>
2398           <para>The statistics to display. By default, the display includes 271 statistics for File Servers and 570 statistics for
2399           Cache Managers. For information on the available statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor
2400           Program Statistics</link>.</para>
2401         </listitem>
2402
2403         <listitem>
2404           <para>The threshold values to set for statistics and a script or program to execute if a threshold is exceeded. By
2405           default, no threshold values are defined and no scripts or programs are executed.</para>
2406         </listitem>
2407       </itemizedlist></para>
2408
2409     <para>The following list describes the instructions that can appear in the configuration file: <variablelist>
2410         <varlistentry>
2411           <term><computeroutput>cm</computeroutput> <replaceable>hostname</replaceable></term>
2412
2413           <listitem>
2414             <para>Names a client machine for which to display Cache Manager statistics. The order of <emphasis
2415             role="bold">cm</emphasis> lines in the file determines the order in which client machines appear from top to bottom on
2416             the <computeroutput>System Overview</computeroutput> and <computeroutput>Cache Managers</computeroutput> output
2417             screens.</para>
2418           </listitem>
2419         </varlistentry>
2420
2421         <varlistentry>
2422           <term><computeroutput>fs</computeroutput> <replaceable>hostname</replaceable></term>
2423
2424           <listitem>
2425             <para>Names a file server machine for which to display File Server statistics. The order of <emphasis
2426             role="bold">fs</emphasis> lines in the file determines the order in which file server machines appear from top to bottom
2427             on the <computeroutput>System Overview</computeroutput> and <computeroutput>File Servers</computeroutput> output
2428             screens.</para>
2429           </listitem>
2430         </varlistentry>
2431
2432         <varlistentry>
2433           <term><computeroutput>thresh fs | cm <replaceable>field_name</replaceable> <replaceable>thresh_val</replaceable>
2434           [<replaceable>cmd_to_run</replaceable>] [<replaceable>arg1</replaceable>] . . .
2435           [<replaceable>argn</replaceable>]</computeroutput></term>
2436
2437           <listitem>
2438             <para>Assigns the threshold value thresh_val to the statistic field_name, for either a File Server statistic (<emphasis
2439             role="bold">fs</emphasis>) or a Cache Manager statistic (<emphasis role="bold">cm</emphasis>). The optional
2440             cmd_to_execute field names a binary or script to execute each time the value of the statistic changes from being below
2441             thresh_val to being at or above thresh_val. A change between two values that both exceed thresh_val does not retrigger
2442             the binary or script. The optional arg1 through argn fields are additional values that the <emphasis
2443             role="bold">afsmonitor</emphasis> program passes as arguments to the cmd_to_execute command. If any of them include one
2444             or more spaces, enclose the entire field in double quotes.</para>
2445
2446             <para>The parameters <emphasis role="bold">fs</emphasis>, <emphasis role="bold">cm</emphasis>, field_name,
2447             threshold_val, and arg1 through argn correspond to the values with the same name on the <emphasis
2448             role="bold">thresh</emphasis> line. The host_name parameter identifies the file server or client machine where the
2449             statistic has crossed the threshold, and the actual_val parameter is the actual value of field_name that equals or
2450             exceeds the threshold value.</para>
2451
2452             <para>Use the <emphasis role="bold">thresh</emphasis> line to set either a global threshold, which applies to all file
2453             server machines listed on <emphasis role="bold">fs</emphasis> lines or client machines listed on <emphasis
2454             role="bold">cm</emphasis> lines in the configuration file, or a machine-specific threshold, which applies to only one
2455             file server or client machine. <itemizedlist>
2456                 <listitem>
2457                   <para>To set a global threshold, place the <emphasis role="bold">thresh</emphasis> line before any of the
2458                   <emphasis role="bold">fs</emphasis> or <emphasis role="bold">cm</emphasis> lines in the file.</para>
2459                 </listitem>
2460
2461                 <listitem>
2462                   <para>To set a machine-specific threshold, place the <emphasis role="bold">thresh</emphasis> line below the
2463                   corresponding <emphasis role="bold">fs</emphasis> or <emphasis role="bold">cm</emphasis> line, and above any other
2464                   <emphasis role="bold">fs</emphasis> or <emphasis role="bold">cm</emphasis> lines. A machine-specific threshold
2465                   value always overrides the corresponding global threshold, if set. Do not place a <emphasis role="bold">thresh
2466                   fs</emphasis> line directly after a <emphasis role="bold">cm</emphasis> line or a <emphasis role="bold">thresh
2467                   cm</emphasis> line directly after a <emphasis role="bold">fs</emphasis> line.</para>
2468                 </listitem>
2469               </itemizedlist></para>
2470           </listitem>
2471         </varlistentry>
2472
2473         <varlistentry>
2474           <term><computeroutput>show fs | cm <replaceable>field/group/section</replaceable></computeroutput></term>
2475
2476           <listitem>
2477             <para>Specifies which individual statistic, group of statistics, or section of statistics to display on the
2478             <computeroutput>File Servers</computeroutput> screen (<emphasis role="bold">fs</emphasis>) or <computeroutput>Cache
2479             Managers</computeroutput> screen (<emphasis role="bold">cm</emphasis>) and the order in which to display them. The
2480             appendix of <emphasis role="bold">afsmonitor</emphasis> statistics in the <emphasis>OpenAFS Administration
2481             Guide</emphasis> specifies the group and section to which each statistic belongs. Include as many <emphasis
2482             role="bold">show</emphasis> lines as necessary to customize the screen display as desired, and place them anywhere in
2483             the file. The top-to-bottom order of the <emphasis role="bold">show</emphasis> lines in the configuration file
2484             determines the left-to-right order in which the statistics appear on the corresponding screen.</para>
2485
2486             <para>If there are no <emphasis role="bold">show</emphasis> lines in the configuration file, then the screens display
2487             all statistics for both Cache Managers and File Servers. Similarly, if there are no <emphasis role="bold">show
2488             fs</emphasis> lines, the <computeroutput>File Servers</computeroutput> screen displays all file server statistics, and
2489             if there are no <emphasis role="bold">show cm</emphasis> lines, the <computeroutput>Cache Managers</computeroutput>
2490             screen displays all client statistics.</para>
2491           </listitem>
2492         </varlistentry>
2493
2494         <varlistentry>
2495           <term><emphasis role="bold"># comments</emphasis></term>
2496
2497           <listitem>
2498             <para>Precedes a line of text that the <emphasis role="bold">afsmonitor</emphasis> program ignores because of the
2499             initial number (<emphasis role="bold">#</emphasis>) sign, which must appear in the very first column of the line.</para>
2500           </listitem>
2501         </varlistentry>
2502       </variablelist></para>
2503
2504     <para>For a list of the values that can appear in the field/group/section field of a <emphasis role="bold">show</emphasis>
2505     instruction, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program Statistics</link>.)</para>
2506
2507     <para>The following example illustrates a possible configuration file:</para>
2508
2509     <programlisting>
2510    thresh cm dlocalAccesses  1000000
2511    thresh cm dremoteAccesses  500000 handleDRemote
2512    thresh fs rx_maxRtt_Usec     1000
2513    cm client5
2514    cm client33
2515    cm client14
2516    thresh cm dlocalAccesses  2000000
2517    thresh cm vcacheMisses      10000
2518    cm client2
2519    fs fs3
2520    fs fs9
2521    fs fs5
2522    fs fs10
2523    show cm numCellsContacted
2524    show cm dlocalAccesses
2525    show cm dremoteAccesses
2526    show cm vcacheMisses
2527    show cm Auth_Stats_group
2528 </programlisting>
2529
2530     <para>Since the first three <emphasis role="bold">thresh</emphasis> instructions appear before any <emphasis
2531     role="bold">fs</emphasis> or <emphasis role="bold">cm</emphasis> instructions, they set global threshold values: <itemizedlist>
2532         <listitem>
2533           <para>All Cache Manager process in this file use <emphasis role="bold">1000000</emphasis> as the threshold for the
2534           <emphasis role="bold">dlocalAccesses</emphasis> statistic (except for the machine <emphasis role="bold">client2</emphasis>
2535           which uses an overriding value of <emphasis role="bold">2000000</emphasis>.)</para>
2536         </listitem>
2537
2538         <listitem>
2539           <para>All Cache Manager processes in this file use <emphasis role="bold">500000</emphasis> as the threshold value for the
2540           <emphasis role="bold">dremoteAccesses</emphasis> statistic; if that value is exceeded, the script <emphasis
2541           role="bold">handleDRemote</emphasis> is invoked.</para>
2542         </listitem>
2543
2544         <listitem>
2545           <para>All File Server processes in this file use <emphasis role="bold">1000</emphasis> as the threshold value for the
2546           <emphasis role="bold">rx_maxRtt_Usec</emphasis> statistic.</para>
2547         </listitem>
2548       </itemizedlist></para>
2549
2550     <para>The four <emphasis role="bold">cm</emphasis> instructions monitor the Cache Manager on the machines <emphasis
2551     role="bold">client5</emphasis>, <emphasis role="bold">client33</emphasis>, <emphasis role="bold">client14</emphasis>, and
2552     <emphasis role="bold">client2</emphasis>. The first three use all of the global threshold values.</para>
2553
2554     <para>The Cache Manager on <emphasis role="bold">client2</emphasis> uses the global threshold value for the <emphasis
2555     role="bold">dremoteAccesses</emphasis> statistic, but a different one for the <emphasis role="bold">dlocalAccesses</emphasis>
2556     statistic. Furthermore, <emphasis role="bold">client22</emphasis> is the only Cache Manager that uses the threshold set for the
2557     <emphasis role="bold">vcacheMisses</emphasis> statistic.</para>
2558
2559     <para>The <emphasis role="bold">fs</emphasis> instructions monitor the File Server on the machines <emphasis
2560     role="bold">fs3</emphasis>, <emphasis role="bold">fs9</emphasis>, <emphasis role="bold">fs5</emphasis>, and <emphasis
2561     role="bold">fs10</emphasis>. They all use the global threshold for the<emphasis role="bold">rx_maxRtt_Usec</emphasis>
2562     statistic.</para>
2563
2564     <para>Because there are no <emphasis role="bold">show fs</emphasis> instructions, the File Servers screen displays all File
2565     Server statistics. The Cache Managers screen displays only the statistics named in <emphasis role="bold">show cm</emphasis>
2566     instructions, ordering them from left to right. The <emphasis role="bold">Auth_Stats_group</emphasis> includes several
2567     statistics, all of which are displayed (<emphasis role="bold">curr_PAGs</emphasis>, <emphasis
2568     role="bold">curr_Records</emphasis>, <emphasis role="bold">curr_AuthRecords</emphasis>, <emphasis
2569     role="bold">curr_UnauthRecords</emphasis>, <emphasis role="bold">curr_MaxRecordsInPAG</emphasis>, <emphasis
2570     role="bold">curr_LongestChain</emphasis>, <emphasis role="bold">PAGCreations</emphasis>, <emphasis
2571     role="bold">TicketUpdates</emphasis>, <emphasis role="bold">HWM_PAGS</emphasis>, <emphasis role="bold">HWM_Records</emphasis>,
2572     <emphasis role="bold">HWM_MaxRecordsInPAG</emphasis>, and <emphasis role="bold">HWM_LongestChain</emphasis>).</para>
2573   </sect1>
2574
2575   <sect1 id="HDRWQ352">
2576     <title>Writing afsmonitor Statistics to a File</title>
2577
2578     <indexterm>
2579       <primary>afsmonitor program</primary>
2580
2581       <secondary>creating an output file</secondary>
2582     </indexterm>
2583
2584     <para>All of the statistical information collected and displayed by the <emphasis role="bold">afsmonitor</emphasis> program can
2585     be preserved by writing it to an output file. You can create an output file by using the <emphasis
2586     role="bold">-output</emphasis> argument when you startup the <emphasis role="bold">afsmonitor</emphasis> process. You can use
2587     the output file to track process performance over long periods of time and to apply post-processing techniques to further
2588     analyze system trends.</para>
2589
2590     <para>The <emphasis role="bold">afsmonitor</emphasis> program output file is a simple ASCII file that records the information
2591     reported by the File Server and Cache Manager screens. The output file has the following format:</para>
2592
2593     <programlisting>
2594    time   host_name <emphasis role="bold">CM</emphasis>|<emphasis role="bold">FS</emphasis>   list_of_measured_values
2595 </programlisting>
2596
2597     <para>and specifies the <emphasis>time</emphasis> at which the <emphasis>list_of_measured_values</emphasis> were gathered from
2598     the Cache Manager (<emphasis role="bold">CM</emphasis>) or File Server (<emphasis role="bold">FS</emphasis>) process housed on
2599     host_name. On those occasion where probes fail, the value <computeroutput>-1</computeroutput> is reported instead of the
2600     <emphasis>list_of_measured_values</emphasis>.</para>
2601
2602     <para>This file format provides several advantages: <itemizedlist>
2603         <listitem>
2604           <para>It can be viewed using a standard editor. If you intend to view this file frequently, use the <emphasis
2605           role="bold">-detailed</emphasis> flag with the <emphasis role="bold">-output</emphasis> argument. It formats the output
2606           file in a way that is easier to read.</para>
2607         </listitem>
2608
2609         <listitem>
2610           <para>It can be passed through filters to extract desired information using the standard set of UNIX tools.</para>
2611         </listitem>
2612
2613         <listitem>
2614           <para>It is suitable for long term storage of the <emphasis role="bold">afsmonitor</emphasis> program output.</para>
2615         </listitem>
2616       </itemizedlist></para>
2617
2618     <indexterm>
2619       <primary>afsmonitor program</primary>
2620
2621       <secondary>command syntax</secondary>
2622     </indexterm>
2623
2624     <indexterm>
2625       <primary>commands</primary>
2626
2627       <secondary>afsmonitor</secondary>
2628     </indexterm>
2629   </sect1>
2630
2631   <sect1 id="Header_398">
2632     <title>To start the afsmonitor Program</title>
2633
2634     <orderedlist>
2635       <listitem>
2636         <para>Open a separate command shell window or use a dedicated terminal for each instance of the <emphasis
2637         role="bold">afsmonitor</emphasis> program. This window or terminal must be devoted to the exclusive use of the <emphasis
2638         role="bold">afsmonitor</emphasis> process because the command cannot be run in the background.</para>
2639       </listitem>
2640
2641       <listitem>
2642         <para>Initialize the <emphasis role="bold">afsmonitor</emphasis> program. The message <computeroutput>afsmonitor Collecting
2643         Statistics...</computeroutput>, followed by the appearance of the <computeroutput>System Overview</computeroutput> screen,
2644         confirms a successful start. <programlisting>
2645    % <emphasis role="bold">afsmonitor</emphasis> [<emphasis role="bold">initcmd</emphasis>]  [<emphasis role="bold">-config</emphasis> &lt;<replaceable>configuration file</replaceable>&gt;]  \
2646                 [<emphasis role="bold">-frequency</emphasis> &lt;<replaceable>poll frequency, in seconds</replaceable>&gt;]  \
2647                 [<emphasis role="bold">-output</emphasis> &lt;<replaceable>storage file name</replaceable>&gt;] [<emphasis
2648               role="bold">-detailed</emphasis>]  \
2649                 [<emphasis role="bold">-debug</emphasis> &lt;<replaceable>turn debugging output on to the named file</replaceable>&gt;] \
2650                 [<emphasis role="bold">-fshosts</emphasis> &lt;<replaceable>list of file servers to monitor</replaceable>&gt;+]  \
2651                 [<emphasis role="bold">-cmhosts</emphasis> &lt;<replaceable>list of cache managers to monitor</replaceable>&gt;+]
2652    afsmonitor Collecting Statistics...
2653 </programlisting></para>
2654
2655         <para>where <variablelist>
2656             <varlistentry>
2657               <term><emphasis role="bold">initcmd</emphasis></term>
2658
2659               <listitem>
2660                 <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
2661                 ignored.</para>
2662               </listitem>
2663             </varlistentry>
2664
2665             <varlistentry>
2666               <term><emphasis role="bold">-config</emphasis></term>
2667
2668               <listitem>
2669                 <para>Specifies the pathname of an <emphasis role="bold">afsmonitor</emphasis> configuration file, which lists the
2670                 machines and statistics to monitor. Partial pathnames are interpreted relative to the current working directory.
2671                 Provide either this argument or one or both of the <emphasis role="bold">-fshosts</emphasis> and <emphasis
2672                 role="bold">-cmhosts</emphasis> arguments. You must use a configuration file to set thresholds or customize the
2673                 screen display. For instructions on creating the configuration file, see <link linkend="HDRWQ351">Configuring the
2674                 afsmonitor Program</link>.</para>
2675               </listitem>
2676             </varlistentry>
2677
2678             <varlistentry>
2679               <term><emphasis role="bold">-frequency</emphasis></term>
2680
2681               <listitem>
2682                 <para>Specifies how often to probe the File Server and Cache Manager processes, as a number of seconds. Acceptable
2683                 values range from <emphasis role="bold">1</emphasis> and <emphasis role="bold">86400</emphasis>; the default value
2684                 is <emphasis role="bold">60</emphasis>. This frequency applies to both File Server and Cache Manager probes;
2685                 however, File Server and Cache Manager probes are initiated and processed independent of each other. The actual
2686                 interval between probes to a host is the probe frequency plus the time needed by all hosts to respond to the
2687                 probe.</para>
2688               </listitem>
2689             </varlistentry>
2690
2691             <varlistentry>
2692               <term><emphasis role="bold">-output</emphasis></term>
2693
2694               <listitem>
2695                 <para>Specifies the name of an output file to which to write all of the statistical data. By default, no output file
2696                 is created. For information on this file, see <link linkend="HDRWQ352">Writing afsmonitor Statistics to a
2697                 File</link>.</para>
2698               </listitem>
2699             </varlistentry>
2700
2701             <varlistentry>
2702               <term><emphasis role="bold">-detailed</emphasis></term>
2703
2704               <listitem>
2705                 <para>Formats the output file named by the <emphasis role="bold">-output</emphasis> argument to be more easily
2706                 readable. The <emphasis role="bold">-output</emphasis> argument must be provided along with this flag.</para>
2707               </listitem>
2708             </varlistentry>
2709
2710             <varlistentry>
2711               <term><emphasis role="bold">-fshosts</emphasis></term>
2712
2713               <listitem>
2714                 <para>Identifies each File Server process to monitor by specifying the host it is running on. You can identify a
2715                 host using either its complete Internet-style host name or an abbreviation acceptable to the cell's naming service.
2716                 Combine this argument with the <emphasis role="bold">-cmhosts</emphasis> if you wish, but not the <emphasis
2717                 role="bold">-config</emphasis> argument.</para>
2718               </listitem>
2719             </varlistentry>
2720
2721             <varlistentry>
2722               <term><emphasis role="bold">-cmhosts</emphasis></term>
2723
2724               <listitem>
2725                 <para>Identifies each Cache Manager process to monitor by specifying the host it is running on. You can identify a
2726                 host using either its complete Internet-style host name or an abbreviation acceptable to the cell's naming service.
2727                 Combine this argument with the <emphasis role="bold">-fshosts</emphasis> if you wish, but not the <emphasis
2728                 role="bold">-config</emphasis> argument.</para>
2729               </listitem>
2730             </varlistentry>
2731           </variablelist></para>
2732       </listitem>
2733     </orderedlist>
2734   </sect1>
2735
2736   <sect1 id="Header_399">
2737     <title>To stop the afsmonitor program</title>
2738
2739     <indexterm>
2740       <primary>afsmonitor program</primary>
2741
2742       <secondary>stopping</secondary>
2743     </indexterm>
2744
2745     <para>To exit an <emphasis role="bold">afsmonitor</emphasis> program session, Enter the &lt;<emphasis
2746     role="bold">Ctrl-c</emphasis>&gt; interrupt signal or an uppercase <emphasis role="bold">Q</emphasis>.</para>
2747   </sect1>
2748
2749   <sect1 id="HDRWQ353">
2750     <title>The xstat Data Collection Facility</title>
2751
2752     <indexterm>
2753       <primary>xstat data collection facility</primary>
2754     </indexterm>
2755
2756     <indexterm>
2757       <primary>xstat data collection facility</primary>
2758
2759       <secondary>libxstat_fs.a library</secondary>
2760     </indexterm>
2761
2762     <indexterm>
2763       <primary>xstat data collection facility</primary>
2764
2765       <secondary>libxstat_cm.a library</secondary>
2766     </indexterm>
2767
2768     <indexterm>
2769       <primary>data collection</primary>
2770
2771       <secondary>with xstat data collection facility</secondary>
2772     </indexterm>
2773
2774     <indexterm>
2775       <primary>collecting</primary>
2776
2777       <secondary>data with xstat data collection facility</secondary>
2778     </indexterm>
2779
2780     <indexterm>
2781       <primary>File Server</primary>
2782
2783       <secondary>collecting data with xstat data collection facility</secondary>
2784     </indexterm>
2785
2786     <indexterm>
2787       <primary>Cache Manager</primary>
2788
2789       <secondary>collecting data with xstat data collection facility</secondary>
2790     </indexterm>
2791
2792     <indexterm>
2793       <primary>File Server</primary>
2794
2795       <secondary>xstat data collection facility libraries</secondary>
2796     </indexterm>
2797
2798     <indexterm>
2799       <primary>Cache Manager</primary>
2800
2801       <secondary>xstat data collection facility libraries</secondary>
2802     </indexterm>
2803
2804     <indexterm>
2805       <primary>libxstat_fs.a library</primary>
2806     </indexterm>
2807
2808     <indexterm>
2809       <primary>libxstat_cm.a library</primary>
2810     </indexterm>
2811
2812     <para>The <emphasis role="bold">afsmonitor</emphasis> program uses the <emphasis role="bold">xstat</emphasis> data collection
2813     facility to gather and calculate the data that it (the <emphasis role="bold">afsmonitor</emphasis> program) then uses to perform
2814     its function. You can also use the <emphasis role="bold">xstat</emphasis> facility to create your own data display programs. If
2815     you do, keep the following in mind. The File Server considers any program calling its RPC routines to be a Cache Manager;
2816     therefore, any program calling the File Server interface directly must export the Cache Manager's callback interface. The
2817     calling program must be capable of emulating the necessary callback state, and it must respond to periodic keep-alive messages
2818     from the File Server. In addition, a calling program must be able to gather the collected data.</para>
2819
2820     <para>The <emphasis role="bold">xstat</emphasis> facility consists of two C language libraries available to user-level
2821     applications: <itemizedlist>
2822         <listitem>
2823           <para><emphasis role="bold">/usr/afsws/lib/afs/libxstat_fs.a</emphasis> exports calls that gather information from one or
2824           more running File Server processes.</para>
2825         </listitem>
2826
2827         <listitem>
2828           <para><emphasis role="bold">/usr/afsws/lib/afs/libxstat_cm.a</emphasis> exports calls that collect information from one or
2829           more running Cache Managers.</para>
2830         </listitem>
2831       </itemizedlist></para>
2832
2833     <para>The libraries allow the caller to register <itemizedlist>
2834         <listitem>
2835           <para>A set of File Servers or Cache Managers to be examined.</para>
2836         </listitem>
2837
2838         <listitem>
2839           <para>The frequency with which the File Servers or Cache Managers are to be probed for data.</para>
2840         </listitem>
2841
2842         <listitem>
2843           <para>A user-specified routine to be called each time data is collected.</para>
2844         </listitem>
2845       </itemizedlist></para>
2846
2847     <para>The libraries handle all of the lightweight processes, callback interactions, and timing issues associated with the data
2848     collection. The user needs only to process the data as it arrives.</para>
2849
2850     <sect2 id="Header_401">
2851       <title>The libxstat Libraries</title>
2852
2853       <indexterm>
2854         <primary>libxstat_fs.a library</primary>
2855
2856         <secondary>routines</secondary>
2857       </indexterm>
2858
2859       <indexterm>
2860         <primary>libxstat_cm.a library</primary>
2861
2862         <secondary>routines</secondary>
2863       </indexterm>
2864
2865       <para>The <emphasis role="bold">libxstat_fs.a</emphasis> and <emphasis role="bold">libxstat_cm.a</emphasis> libraries handle
2866       the callback requirements and other complications associated with the collection of data from File Servers and Cache Managers.
2867       The user provides only the means of accumulating the desired data. Each <emphasis role="bold">xstat</emphasis> library
2868       implements three routines: <itemizedlist>
2869           <listitem>
2870             <para>Initialization (<emphasis role="bold">xstat_fs_Init</emphasis> and <emphasis role="bold">xstat_cm_Init</emphasis>)
2871             arranges the periodic collection and handling of data.</para>
2872           </listitem>
2873
2874           <listitem>
2875             <para>Immediate probe (<emphasis role="bold">xstat_fs_ForceProbeNow</emphasis> and <emphasis
2876             role="bold">xstat_cm_ForceProbeNow</emphasis>) forces the immediate collection of data, after which collection returns
2877             to its normal probe schedule.</para>
2878           </listitem>
2879
2880           <listitem>
2881             <para>Cleanup (<emphasis role="bold">xstat_fs_Cleanup</emphasis> and <emphasis role="bold">xstat_cm_Cleanup</emphasis>)
2882             terminates all connections and removes all traces of the data collection from memory.</para>
2883           </listitem>
2884         </itemizedlist></para>
2885
2886       <indexterm>
2887         <primary>File Server</primary>
2888
2889         <secondary>xstat data collections</secondary>
2890       </indexterm>
2891
2892       <indexterm>
2893         <primary>Cache Manager</primary>
2894
2895         <secondary>xstat data collections</secondary>
2896       </indexterm>
2897
2898       <indexterm>
2899         <primary>xstat data collection facility</primary>
2900
2901         <secondary>data collections</secondary>
2902       </indexterm>
2903
2904       <indexterm>
2905         <primary>libxstat_fs.a library</primary>
2906
2907         <secondary>data collections</secondary>
2908       </indexterm>
2909
2910       <indexterm>
2911         <primary>libxstat_cm.a library</primary>
2912
2913         <secondary>data collections</secondary>
2914       </indexterm>
2915
2916       <para>The File Server and Cache Manager each define data collections that clients can fetch. A data collection is simply a
2917       related set of numbers that can be collected as a unit. For example, the File Server and Cache Manager each define profiling
2918       and performance data collections. The profiling collections maintain counts of the number of times internal functions are
2919       called within servers, allowing bottleneck analysis to be performed. The performance collections record, among other things,
2920       internal disk I/O statistics for a File Server and cache effectiveness figures for a Cache Manager, allowing for performance
2921       analysis.</para>
2922
2923       <indexterm>
2924         <primary>xstat data collection facility</primary>
2925
2926         <secondary>obtaining more information</secondary>
2927       </indexterm>
2928
2929       <indexterm>
2930         <primary>libxstat_fs.a library</primary>
2931
2932         <secondary>obtaining more information</secondary>
2933       </indexterm>
2934
2935       <indexterm>
2936         <primary>libxstat_cm.a library</primary>
2937
2938         <secondary>obtaining more information</secondary>
2939       </indexterm>
2940
2941       <para>For a copy of the detailed specification which provides much additional usage information about the <emphasis
2942       role="bold">xstat</emphasis> facility, its libraries, and the routines in the libraries, contact AFS Product Support.</para>
2943     </sect2>
2944
2945     <sect2 id="Header_402">
2946       <title>Example xstat Commands</title>
2947
2948       <indexterm>
2949         <primary>xstat data collection facility</primary>
2950
2951         <secondary>example commands</secondary>
2952       </indexterm>
2953
2954       <indexterm>
2955         <primary>libxstat_fs.a library</primary>
2956
2957         <secondary>example command using</secondary>
2958       </indexterm>
2959
2960       <indexterm>
2961         <primary>libxstat_cm.a library</primary>
2962
2963         <secondary>example command using</secondary>
2964       </indexterm>
2965
2966       <indexterm>
2967         <primary>File Server</primary>
2968
2969         <secondary>xstat example commands</secondary>
2970       </indexterm>
2971
2972       <indexterm>
2973         <primary>Cache Manager</primary>
2974
2975         <secondary>xstat example commands</secondary>
2976       </indexterm>
2977
2978       <para>AFS comes with two low-level, example commands: <emphasis role="bold">xstat_fs_test</emphasis> and <emphasis
2979       role="bold">xstat_cm_test</emphasis>. The commands allow you to experiment with the <emphasis role="bold">xstat</emphasis>
2980       facility. They gather information and display the available data collections for a File Server or Cache Manager. They are
2981       intended merely to provide examples of the types of data that can be collected via <emphasis role="bold">xstat</emphasis>;
2982       they are not intended for use in the actual collection of data.</para>
2983
2984       <indexterm>
2985         <primary>commands</primary>
2986
2987         <secondary>xstat_fs_test</secondary>
2988       </indexterm>
2989
2990       <indexterm>
2991         <primary>libxstat_fs.a library</primary>
2992
2993         <secondary>xstat_fs_test example command</secondary>
2994       </indexterm>
2995
2996       <indexterm>
2997         <primary>File Server</primary>
2998
2999         <secondary>xstat_fs_test example command</secondary>
3000       </indexterm>
3001
3002       <indexterm>
3003         <primary>xstat data collection facility</primary>
3004
3005         <secondary>xstat_fs_test example command</secondary>
3006       </indexterm>
3007
3008       <sect3 id="Header_403">
3009         <title>To use the example xstat_fs_test command</title>
3010
3011         <orderedlist>
3012           <listitem>
3013             <para>Issue the example <emphasis role="bold">xstat_fs_test</emphasis> command to test the routines in the <emphasis
3014             role="bold">libxstat_fs.a</emphasis> library and display the data collections associated with the File Server process.
3015             The command executes in the foreground. <programlisting>
3016    % <emphasis role="bold">xstat_fs_test</emphasis> [<emphasis role="bold">initcmd</emphasis>]  \
3017                    <emphasis role="bold">-fsname</emphasis> &lt;<replaceable>File Server name(s) to monitor</replaceable>&gt;+  \
3018                    <emphasis role="bold">-collID</emphasis> &lt;<replaceable>Collection(s) to fetch</replaceable>&gt;+  [<emphasis
3019                   role="bold">-onceonly</emphasis>]  \
3020                    [<emphasis role="bold">-frequency</emphasis> &lt;<replaceable>poll frequency, in seconds</replaceable>&gt;]  \
3021                    [<emphasis role="bold">-period</emphasis> &lt;<replaceable>data collection time, in minutes</replaceable>&gt;] [<emphasis
3022                   role="bold">-debug</emphasis>] 
3023 </programlisting></para>
3024
3025             <para>where <variablelist>
3026                 <varlistentry>
3027                   <term><emphasis role="bold">xstat_fs_test</emphasis></term>
3028
3029                   <listitem>
3030                     <para>Must be typed in full.</para>
3031                   </listitem>
3032                 </varlistentry>
3033
3034                 <varlistentry>
3035                   <term><emphasis role="bold">initcmd</emphasis></term>
3036
3037                   <listitem>
3038                     <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
3039                     ignored.</para>
3040                   </listitem>
3041                 </varlistentry>
3042
3043                 <varlistentry>
3044                   <term><emphasis role="bold">-fsname</emphasis></term>
3045
3046                   <listitem>
3047                     <para>Is the Internet host name of each file server machine on which to monitor the File Server process.</para>
3048                   </listitem>
3049                 </varlistentry>
3050
3051                 <varlistentry>
3052                   <term><emphasis role="bold">-collID</emphasis></term>
3053
3054                   <listitem>
3055                     <para>Specifies each data collection to return. The indicated data collection defines the type and amount of
3056                     data the command is to gather about the File Server. Data is returned in the form of a predefined data structure
3057                     (refer to the specification documents referenced previously for more information about the data
3058                     structures).</para>
3059
3060                     <para>There are two acceptable values: <itemizedlist>
3061                         <listitem>
3062                           <para><emphasis role="bold">1</emphasis> reports various internal performance statistics related to the
3063                           File Server (for example, vnode cache entries and <emphasis role="bold">Rx</emphasis> protocol
3064                           activity).</para>
3065                         </listitem>
3066
3067                         <listitem>
3068                           <para><emphasis role="bold">2</emphasis> reports all of the internal performance statistics provided by
3069                           the <emphasis role="bold">1</emphasis> setting, plus some additional, detailed performance figures about
3070                           the File Server (for example, minimum, maximum, and cumulative statistics regarding File Server RPCs, how
3071                           long they take to complete, and how many succeed).</para>
3072                         </listitem>
3073                       </itemizedlist></para>
3074                   </listitem>
3075                 </varlistentry>
3076
3077                 <varlistentry>
3078                   <term><emphasis role="bold">-onceonly</emphasis></term>
3079
3080                   <listitem>
3081                     <para>Directs the command to gather statistics just one time. Omit this option to have the command continue to
3082                     probe the File Server for statistics every 30 seconds. If you omit this option, you can use the &lt;<emphasis
3083                     role="bold">Ctrl-c</emphasis>&gt; interrupt signal to halt the command at any time.</para>
3084                   </listitem>
3085                 </varlistentry>
3086
3087                 <varlistentry>
3088                   <term><emphasis role="bold">-frequency</emphasis></term>
3089
3090                   <listitem>
3091                     <para>Sets the frequency in seconds at which the program initiates probes to the File Server. If you omit this
3092                     argument, the default is 30 seconds.</para>
3093                   </listitem>
3094                 </varlistentry>
3095
3096                 <varlistentry>
3097                   <term><emphasis role="bold">-period</emphasis></term>
3098
3099                   <listitem>
3100                     <para>Sets how long the utility runs before exiting, as a number of minutes. If you omit this argument, the
3101                     default is 10 minutes.</para>
3102                   </listitem>
3103                 </varlistentry>
3104
3105                 <varlistentry>
3106                   <term><emphasis role="bold">-debug</emphasis></term>
3107
3108                   <listitem>
3109                     <para>Displays additional information as the command runs.</para>
3110                   </listitem>
3111                 </varlistentry>
3112               </variablelist></para>
3113           </listitem>
3114         </orderedlist>
3115
3116         <indexterm>
3117           <primary>commands</primary>
3118
3119           <secondary>xstat_cm_test</secondary>
3120         </indexterm>
3121
3122         <indexterm>
3123           <primary>libxstat_cm.a library</primary>
3124
3125           <secondary>xstat_cm_test example command</secondary>
3126         </indexterm>
3127
3128         <indexterm>
3129           <primary>Cache Manager</primary>
3130
3131           <secondary>xstat_cm_test example command</secondary>
3132         </indexterm>
3133
3134         <indexterm>
3135           <primary>xstat data collection facility</primary>
3136
3137           <secondary>xstat_cm_test example command</secondary>
3138         </indexterm>
3139       </sect3>
3140
3141       <sect3 id="Header_404">
3142         <title>To use the example xstat_cm_test command</title>
3143
3144         <orderedlist>
3145           <listitem>
3146             <para>Issue the example <emphasis role="bold">xstat_cm_test</emphasis> command to test the routines in the <emphasis
3147             role="bold">libxstat_cm.a</emphasis> library and display the data collections associated with the Cache Manager. The
3148             command executes in the foreground. <programlisting>
3149    % <emphasis role="bold">xstat_cm_test</emphasis> [<emphasis role="bold">initcmd</emphasis>]  \
3150                    <emphasis role="bold">-cmname</emphasis> &lt;<replaceable>Cache Manager name(s) to monitor</replaceable>&gt;+  \
3151                    <emphasis role="bold">-collID</emphasis> &lt;<replaceable>Collection(s) to fetch</replaceable>&gt;+ \
3152                    [<emphasis role="bold">-onceonly</emphasis>] [<emphasis role="bold">-frequency</emphasis> &lt;<replaceable>poll frequency, in seconds</replaceable>&gt;]  \
3153                    [<emphasis role="bold">-period</emphasis> &lt;<replaceable>data collection time, in minutes</replaceable>&gt;] [<emphasis
3154                   role="bold">-debug</emphasis>] 
3155 </programlisting></para>
3156
3157             <para>where <variablelist>
3158                 <varlistentry>
3159                   <term><emphasis role="bold">xstat_cm_test</emphasis></term>
3160
3161                   <listitem>
3162                     <para>Must be typed in full.</para>
3163                   </listitem>
3164                 </varlistentry>
3165
3166                 <varlistentry>
3167                   <term><emphasis role="bold">initcmd</emphasis></term>
3168
3169                   <listitem>
3170                     <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
3171                     ignored.</para>
3172                   </listitem>
3173                 </varlistentry>
3174
3175                 <varlistentry>
3176                   <term><emphasis role="bold">-cmname</emphasis></term>
3177
3178                   <listitem>
3179                     <para>Is the host name of each client machine on which to monitor the Cache Manager.</para>
3180                   </listitem>
3181                 </varlistentry>
3182
3183                 <varlistentry>
3184                   <term><emphasis role="bold">-collID</emphasis></term>
3185
3186                   <listitem>
3187                     <para>Specifies each data collection to return. The indicated data collection defines the type and amount of
3188                     data the command is to gather about the Cache Manager. Data is returned in the form of a predefined data
3189                     structure (refer to the specification documents referenced previously for more information about the data
3190                     structures).</para>
3191
3192                     <para>There are two acceptable values: <itemizedlist>
3193                         <listitem>
3194                           <para><emphasis role="bold">0</emphasis> provides profiling information about the numbers of times
3195                           different internal Cache Manager routines were called since the Cache manager was started.</para>
3196                         </listitem>
3197
3198                         <listitem>
3199                           <para><emphasis role="bold">1</emphasis> reports various internal performance statistics related to the
3200                           Cache manager (for example, statistics about how effectively the cache is being used and the quantity of
3201                           intracell and intercell data access).</para>
3202                         </listitem>
3203
3204                         <listitem>
3205                           <para><emphasis role="bold">2</emphasis> reports all of the internal performance statistics provided by
3206                           the <emphasis role="bold">1</emphasis> setting, plus some additional, detailed performance figures about
3207                           the Cache Manager (for example, statistics about the number of RPCs sent by the Cache Manager and how long
3208                           they take to complete; and statistics regarding things such as authentication, access, and PAG information
3209                           associated with data access).</para>
3210                         </listitem>
3211                       </itemizedlist></para>
3212                   </listitem>
3213                 </varlistentry>
3214
3215                 <varlistentry>
3216                   <term><emphasis role="bold">-onceonly</emphasis></term>
3217
3218                   <listitem>
3219                     <para>Directs the command to gather statistics just one time. Omit this option to have the command continue to
3220                     probe the Cache Manager for statistics every 30 seconds. If you omit this option, you can use the &lt;<emphasis
3221                     role="bold">Ctrl-c</emphasis>&gt; interrupt signal to halt the command at any time.</para>
3222                   </listitem>
3223                 </varlistentry>
3224
3225                 <varlistentry>
3226                   <term><emphasis role="bold">-frequency</emphasis></term>
3227
3228                   <listitem>
3229                     <para>Sets the frequency in seconds at which the program initiates probes to the Cache Manager. If you omit this
3230                     argument, the default is 30 seconds.</para>
3231                   </listitem>
3232                 </varlistentry>
3233
3234                 <varlistentry>
3235                   <term><emphasis role="bold">-period</emphasis></term>
3236
3237                   <listitem>
3238                     <para>Sets how long the utility runs before exiting, as a number of minutes. If you omit this argument, the
3239                     default is 10 minutes.</para>
3240                   </listitem>
3241                 </varlistentry>
3242
3243                 <varlistentry>
3244                   <term><emphasis role="bold">-debug</emphasis></term>
3245
3246                   <listitem>
3247                     <para>Displays additional information as the command runs.</para>
3248                   </listitem>
3249                 </varlistentry>
3250               </variablelist></para>
3251           </listitem>
3252         </orderedlist>
3253       </sect3>
3254     </sect2>
3255   </sect1>
3256
3257   <sect1 id="HDRWQ354">
3258     <title>Auditing AFS Events on AIX File Servers</title>
3259
3260     <indexterm>
3261       <primary>AFS</primary>
3262
3263       <secondary>auditing events on AIX server machines</secondary>
3264     </indexterm>
3265
3266     <indexterm>
3267       <primary>AIX</primary>
3268
3269       <secondary>auditing AFS events</secondary>
3270
3271       <tertiary>about</tertiary>
3272     </indexterm>
3273
3274     <indexterm>
3275       <primary>auditing AFS events on AIX server machines</primary>
3276     </indexterm>
3277
3278     <indexterm>
3279       <primary>events</primary>
3280
3281       <secondary>auditing AFS on AIX server machines</secondary>
3282     </indexterm>
3283
3284     <para>You can audit AFS events on AIX File Servers using an AFS mechanism that transfers audit information from AFS to the AIX
3285     auditing system. The following general classes of AFS events can be audited. For a complete list of specific AFS audit events,
3286     see <link linkend="HDRWQ620">Appendix D, AIX Audit Events</link>. <itemizedlist>
3287         <listitem>
3288           <para>Authentication and Identification Events</para>
3289         </listitem>
3290
3291         <listitem>
3292           <para>Security Events</para>
3293         </listitem>
3294
3295         <listitem>
3296           <para>Privilege Required Events</para>
3297         </listitem>
3298
3299         <listitem>
3300           <para>Object Creation and Deletion Events</para>
3301         </listitem>
3302
3303         <listitem>
3304           <para>Attribute Modification Events</para>
3305         </listitem>
3306
3307         <listitem>
3308           <para>Process Control Events</para>
3309         </listitem>
3310       </itemizedlist></para>
3311
3312     <note>
3313       <para>This section assumes familiarity with the AIX auditing system. For more information, see the <emphasis>AIX System
3314       Management Guide</emphasis> for the version of AIX you are using.</para>
3315     </note>
3316
3317     <sect2 id="Header_406">
3318       <title>Configuring AFS Auditing on AIX File Servers</title>
3319
3320       <para>The directory <emphasis role="bold">/usr/afs/local/audit</emphasis> contains three files that contain the information
3321       needed to configure AIX File Servers to audit AFS events: <itemizedlist>
3322           <listitem>
3323             <para>The <emphasis role="bold">events.sample</emphasis> file contains information on auditable AFS events. The contents
3324             of this file are integrated into the corresponding AIX events file (<emphasis
3325             role="bold">/etc/security/audit/events</emphasis>).</para>
3326           </listitem>
3327
3328           <listitem>
3329             <para>The <emphasis role="bold">config.sample</emphasis> file defines the six classes of AFS audit events and the events
3330             that make up each class. It also defines the classes of AFS audit events to audit for the File Server, which runs as the
3331             local superuser <emphasis role="bold">root</emphasis>. The contents of this file must be integrated into the
3332             corresponding AIX config file (<emphasis role="bold">/etc/security/audit/config</emphasis>).</para>
3333           </listitem>
3334
3335           <listitem>
3336             <para>The <emphasis role="bold">objects.sample</emphasis> file contains a list of information about audited files. You
3337             must only audit files in the local file space. The contents of this file must be integrated into the corresponding AIX
3338             objects file (<emphasis role="bold">/etc/security/audit/objects</emphasis>).</para>
3339           </listitem>
3340         </itemizedlist></para>
3341
3342       <para>Once you have properly configured these files to include the AFS-relevant information, use the AIX auditing system to
3343       start up and shut down the auditing.</para>
3344     </sect2>
3345
3346     <sect2 id="Header_407">
3347       <title>To enable AFS auditing</title>
3348
3349       <orderedlist>
3350         <listitem>
3351           <para>Create the following string in the file <emphasis role="bold">/usr/afs/local/Audit</emphasis> on each File Server on
3352           which you plan to audit AFS events: <programlisting><emphasis role="bold">AFS_AUDIT_AllEvents</emphasis></programlisting></para>
3353         </listitem>
3354
3355         <listitem>
3356           <para>Issue the <emphasis role="bold">bos restart</emphasis> command (with the <emphasis role="bold">-all</emphasis> flag)
3357           to stop and restart all server processes on each File Server. For instructions on using this command, see <link
3358           linkend="HDRWQ170">Stopping and Immediately Restarting Processes</link>.</para>
3359         </listitem>
3360       </orderedlist>
3361     </sect2>
3362
3363     <sect2 id="Header_408">
3364       <title>To disable AFS auditing</title>
3365
3366       <orderedlist>
3367         <listitem>
3368           <para>Remove the contents of the file <emphasis role="bold">/usr/afs/local/Audit</emphasis> on each File Server for which
3369           you are no longer interested in auditing AFS events.</para>
3370         </listitem>
3371
3372         <listitem>
3373           <para>Issue the <emphasis role="bold">bos restart</emphasis> command (with the <emphasis role="bold">-all</emphasis> flag)
3374           to stop and restart all server processes on each File Server. For instructions on using this command, see <link
3375           linkend="HDRWQ170">Stopping and Immediately Restarting Processes</link>.</para>
3376         </listitem>
3377       </orderedlist>
3378     </sect2>
3379   </sect1>
3380 </chapter>