1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="HDRWQ323">
3 <title>Monitoring and Auditing AFS Performance</title>
6 <primary>scout program</primary>
10 <primary>monitoring</primary>
12 <secondary>file server processes with scout</secondary>
16 <primary>monitoring</primary>
18 <secondary>file server processes with afsmonitor</secondary>
22 <primary>monitoring</primary>
24 <secondary>Cache Manager processes with afsmonitor</secondary>
28 <primary>monitoring</primary>
30 <secondary>Cache Manager performance</secondary>
34 <primary>Cache Manager</primary>
36 <secondary>monitoring performance</secondary>
40 <primary>client machine</primary>
42 <secondary>monitoring performance</secondary>
46 <primary>file system</primary>
48 <secondary>monitoring activity</secondary>
51 <para>AFS comes with three main monitoring tools: <itemizedlist>
53 <para>The <emphasis role="bold">scout</emphasis> program, which monitors and gathers statistics on File Server
58 <para>The <emphasis role="bold">fstrace</emphasis> command suite, which traces Cache Manager operations in detail.</para>
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>
65 </itemizedlist></para>
67 <para>AFS also provides a tool for auditing AFS events on file server machines running AIX.</para>
70 <title>Summary of Instructions</title>
72 <para>This chapter explains how to perform the following tasks by using the indicated commands:</para>
74 <informaltable frame="none">
76 <colspec colwidth="70*" />
78 <colspec colwidth="30*" />
82 <entry>Initialize the <emphasis role="bold">scout</emphasis> program</entry>
84 <entry><emphasis role="bold">scout</emphasis></entry>
88 <entry>Display information about a trace log</entry>
90 <entry><emphasis role="bold">fstrace lslog</emphasis></entry>
94 <entry>Display information about an event set</entry>
96 <entry><emphasis role="bold">fstrace lsset</emphasis></entry>
100 <entry>Change the size of a trace log</entry>
102 <entry><emphasis role="bold">fstrace setlog</emphasis></entry>
106 <entry>Set the state of an event set</entry>
108 <entry><emphasis role="bold">fstrace setset</emphasis></entry>
112 <entry>Dump contents of a trace log</entry>
114 <entry><emphasis role="bold">fstrace dump</emphasis></entry>
118 <entry>Clear a trace log</entry>
120 <entry><emphasis role="bold">fstrace clear</emphasis></entry>
124 <entry>Initialize the <emphasis role="bold">afsmonitor</emphasis> program</entry>
126 <entry><emphasis role="bold">afsmonitor</emphasis></entry>
133 <sect1 id="HDRWQ326">
134 <title>Using the scout Program</title>
137 <primary>scout program</primary>
139 <secondary>features summarized</secondary>
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>
146 <para>More specifically, the <emphasis role="bold">scout</emphasis> program includes the following features. <itemizedlist>
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
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>
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>
167 <para>You can set how often the <emphasis role="bold">scout</emphasis> program collects statistics from the File Server
170 </itemizedlist></para>
172 <sect2 id="HDRWQ327">
173 <title>System Requirements</title>
176 <primary>scout program</primary>
178 <secondary>requirements</secondary>
182 <primary>requirements</primary>
184 <secondary>scout program</secondary>
188 <primary>curses graphics utility</primary>
190 <secondary>scout program requirements</secondary>
194 <primary>scout program</primary>
196 <secondary>setting terminal type</secondary>
200 <primary>setting</primary>
202 <secondary>terminal type for scout</secondary>
206 <primary>terminal type</primary>
208 <secondary>setting for scout program</secondary>
212 <primary>dumb terminal</primary>
214 <secondary>use in scout program</secondary>
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>
227 <primary>privilege</primary>
229 <secondary>required for scout program</secondary>
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
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>
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>
249 <sect2 id="HDRWQ328">
250 <title>Using the -basename argument to Specify a Domain Name</title>
253 <primary>scout program</primary>
255 <secondary>basename</secondary>
259 <primary>basenames in scout program</primary>
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>
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>
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>
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>
285 </itemizedlist></para>
288 <sect2 id="HDRWQ329">
289 <title>The Layout of the scout Display</title>
292 <primary>scout program</primary>
294 <secondary>display layout</secondary>
298 <primary>display layout in scout program window</primary>
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>
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>
309 <sect3 id="HDRWQ330">
310 <title>The Banner Line</title>
313 <primary>scout program</primary>
315 <secondary>banner line</secondary>
319 <primary>banner line on the scout program screen</primary>
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>
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>
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>
335 [client1.abc.com] scout
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
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>
351 </itemizedlist></para>
354 <sect3 id="HDRWQ331">
355 <title>The Statistics Display Region</title>
358 <primary>scout program</primary>
360 <secondary>statistics displayed</secondary>
364 <primary>statistics display by scout program</primary>
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>
370 <term><computeroutput>Conn</computeroutput></term>
374 <primary>Conn statistic from scout program</primary>
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>
385 <term><computeroutput>Fetch</computeroutput></term>
389 <primary>Fetch statistic from scout program</primary>
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
399 <term><computeroutput>Store</computeroutput></term>
403 <primary>Store statistic from scout program</primary>
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
413 <term><computeroutput>Ws</computeroutput></term>
417 <primary>active</primary>
419 <secondary>clients statistic from scout program</secondary>
423 <primary>client machines statistic from scout program</primary>
427 <primary>Ws statistic from scout program</primary>
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>
438 <term><emphasis role="bold">[Unlabeled column]</emphasis></term>
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>
450 <term><computeroutput>Disk attn</computeroutput></term>
454 <primary>disk partition</primary>
456 <secondary>monitoring usage of</secondary>
460 <primary>monitoring</primary>
462 <secondary>disk usage with scout program</secondary>
466 <primary>scout program</primary>
468 <secondary>monitoring disk usage</secondary>
472 <primary>Disk attn statistic from scout program</primary>
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:
478 partition_letter:free_blocks
479 </programlisting></para>
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>
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>
491 Disk attn: > 95% used
494 <para>For more on this threshold and its effect on highlighting, see <link linkend="HDRWQ332">Highlighting
495 Significant Statistics</link>.</para>
498 </variablelist></para>
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>
507 <sect3 id="Header_368">
508 <title>The Probe Reporting Line</title>
511 <primary>scout program</primary>
513 <secondary>probe reporting line</secondary>
517 <primary>message line in scout program display</primary>
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>
527 <sect2 id="HDRWQ332">
528 <title>Highlighting Significant Statistics</title>
531 <primary>scout program</primary>
533 <secondary>highlighting in</secondary>
537 <primary>highlighting statistics in scout display</primary>
539 <secondary>use of reverse video</secondary>
543 <primary>scout program</primary>
545 <secondary>reverse video</secondary>
549 <primary>reverse video</primary>
551 <secondary>use in scout program display</secondary>
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>
558 <sect3 id="HDRWQ333">
559 <title>Highlighting Server Outages</title>
562 <primary>outages</primary>
564 <secondary>monitoring with scout program</secondary>
568 <primary>scout program</primary>
570 <secondary>outages, monitoring</secondary>
574 <primary>monitoring</primary>
576 <secondary>outages with scout program</secondary>
580 <primary>File Server</primary>
582 <secondary>monitoring with scout program</secondary>
586 <primary>file server machine</primary>
588 <secondary>monitoring outages of</secondary>
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>
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>
602 <sect3 id="Header_371">
603 <title>Highlighting for Extreme Statistic Values</title>
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>
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>
616 <sect2 id="HDRWQ334">
617 <title>Resizing the scout Display</title>
620 <primary>scout program</primary>
622 <secondary>display, resizing</secondary>
626 <primary>window</primary>
628 <secondary>resizing scout display</secondary>
632 <primary>resizing</primary>
634 <secondary>scout display</secondary>
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
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>
651 % <emphasis role="bold">set noglob</emphasis>
652 % <emphasis role="bold">eval '/usr/bin/X11/resize'</emphasis>
653 % <emphasis role="bold">unset noglob</emphasis>
657 <primary>starting</primary>
659 <secondary>scout program</secondary>
663 <primary>scout program</primary>
665 <secondary>starting</secondary>
669 <primary>initializing</primary>
671 <secondary>scout program</secondary>
675 <primary>scout program</primary>
677 <secondary>command syntax</secondary>
681 <primary>commands</primary>
683 <secondary>scout</secondary>
687 <sect2 id="HDRWQ335">
688 <title>To start the scout program</title>
692 <para>Open a dedicated command shell. If necessary, adjust it to the appropriate size.</para>
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> <<replaceable>FileServer name(s) to monitor</replaceable>>+ \
698 [<emphasis role="bold">-basename</emphasis> <<replaceable>base server name</replaceable>>] \
699 [<emphasis role="bold">-frequency</emphasis> <<replaceable>poll frequency, in seconds</replaceable>>] [<emphasis
700 role="bold">-host</emphasis>] \
701 [<emphasis role="bold">-attention</emphasis> <<replaceable>specify attention (highlighting) level</replaceable>>+] \
702 [<emphasis role="bold">-debug</emphasis> <<replaceable>turn debugging output on to the named file</replaceable>>]
703 </programlisting></para>
705 <para>where <variablelist>
707 <term><emphasis role="bold">initcmd</emphasis></term>
710 <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
716 <term><emphasis role="bold">-server</emphasis></term>
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
727 <term><emphasis role="bold">-basename</emphasis></term>
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>
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>
741 <term><emphasis role="bold">-frequency</emphasis></term>
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>
750 <term><emphasis role="bold">-host</emphasis></term>
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>
759 <term><emphasis role="bold">-attention</emphasis></term>
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>
766 <primary>scout program</primary>
768 <secondary>attention levels, setting</secondary>
772 <primary>highlighting statistics in scout display</primary>
774 <secondary>setting thresholds</secondary>
778 <primary>thresholds for statistics in scout display</primary>
780 <secondary>setting</secondary>
784 <term><emphasis role="bold">conn connections</emphasis></term>
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
795 <term><emphasis role="bold">fetch fetch_RPCs</emphasis></term>
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>
806 <term><emphasis role="bold">store store_RPCs</emphasis></term>
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>
817 <term><emphasis role="bold">ws active_clients</emphasis></term>
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>
828 <term><emphasis role="bold">disk percent_full % or disk min_blocks</emphasis></term>
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>
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>
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>
844 </variablelist></para>
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>
851 <para><emphasis role="bold">-attention conn 100 ws 50 disk 75%</emphasis></para>
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>
856 <para><emphasis role="bold">-attention disk 5000 ws 50 conn 100</emphasis></para>
861 <term><emphasis role="bold">-debug</emphasis></term>
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>
868 </variablelist></para>
873 <sect2 id="Header_374">
874 <title>To stop the scout program</title>
877 <primary>scout program</primary>
879 <secondary>stopping</secondary>
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>
890 <sect2 id="HDRWQ336">
891 <title>Example Commands and Displays</title>
894 <primary>scout program</primary>
896 <secondary>examples (command and display)</secondary>
900 <primary>examples</primary>
902 <secondary>scout program display</secondary>
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>
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>
915 % <emphasis role="bold">scout -server fs1 fs2</emphasis>
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>
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>
935 <figure id="FIGWQ337" label="2">
936 <title>First example scout display</title>
940 <imagedata fileref="scout1.png" scale="50" />
945 <para><emphasis role="bold"> </emphasis></para>
947 <para>In the second example, the administrator uses more of the <emphasis role="bold">scout</emphasis> program's optional
948 arguments. <itemizedlist>
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>
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>
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>
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>
970 </itemizedlist></para>
973 % <emphasis role="bold">scout -server fs1 fs2 -basename abc.com -host -frequency 5 -attention disk 5000</emphasis>
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>
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>
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>
995 <figure id="FIGWQ338" label="3">
996 <title>Second example scout display</title>
1000 <imagedata fileref="scout2.png" scale="50" />
1005 <para><emphasis role="bold"> </emphasis></para>
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>
1012 % <emphasis role="bold">scout -server server2 server3 server4 -basename stateu.edu</emphasis>
1015 <figure id="FIGWQ339" label="4">
1016 <title>Third example scout display</title>
1020 <imagedata fileref="scout3.png" scale="50" />
1025 <para><emphasis role="bold"> </emphasis></para>
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>
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>
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>
1040 <figure id="FIGWQ340" label="5">
1041 <title>Fourth example scout display</title>
1045 <imagedata fileref="scout4.png" scale="50" />
1052 <sect1 id="HDRWQ341">
1053 <title>Using the fstrace Command Suite</title>
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>
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>
1065 <para>Following are the <emphasis role="bold">fstrace</emphasis> commands and their respective functions: <itemizedlist>
1067 <para>The <emphasis role="bold">fstrace apropos</emphasis> command provides a short description of commands.</para>
1071 <para>The <emphasis role="bold">fstrace clear</emphasis> command clears the trace log.</para>
1075 <para>The <emphasis role="bold">fstrace dump</emphasis> command dumps the contents of the trace log.</para>
1079 <para>The <emphasis role="bold">fstrace help</emphasis> command provides a description and syntax for commands.</para>
1083 <para>The <emphasis role="bold">fstrace lslog</emphasis> command lists information about the trace log.</para>
1087 <para>The <emphasis role="bold">fstrace lsset</emphasis> command lists information about the event set.</para>
1091 <para>The <emphasis role="bold">fstrace setlog</emphasis> command changes the size of the trace log.</para>
1095 <para>The <emphasis role="bold">fstrace setset</emphasis> command sets the state of the event set.</para>
1097 </itemizedlist></para>
1099 <sect2 id="HDRWQ342">
1100 <title>About the fstrace Command Suite</title>
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>
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>
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
1119 <primary>cmfx trace log (fstrace)</primary>
1123 <primary>trace log from (fstrace)</primary>
1125 <secondary>cmfx</secondary>
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
1134 <primary>cm event set (fstrace)</primary>
1138 <primary>event set (fstrace)</primary>
1140 <secondary>cm</secondary>
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>
1148 <primary>active</primary>
1150 <secondary>state of fstrace event set</secondary>
1154 <primary>inactive (state of fstrace event set)</primary>
1158 <primary>dormant (state of fstrace event set)</primary>
1162 <term><computeroutput>active</computeroutput></term>
1165 <para>Enables tracing for the event set and allocates space for the trace log.</para>
1170 <term><computeroutput>inactive</computeroutput></term>
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>
1179 <term><computeroutput>dormant</computeroutput></term>
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
1188 </variablelist></para>
1191 <primary>persistent fstrace event set or trace log</primary>
1195 <primary>trace log (fstrace)</primary>
1197 <secondary>persistence</secondary>
1201 <primary>event set (fstrace)</primary>
1203 <secondary>persistence</secondary>
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
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>
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>
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>
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
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
1239 <sect2 id="HDRWQ343">
1240 <title>Requirements for Using the fstrace Command Suite</title>
1243 <primary>privilege</primary>
1245 <secondary>required for fstrace commands</secondary>
1249 <primary>fstrace commands</primary>
1251 <secondary>privilege requirements</secondary>
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>
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>
1265 <sect2 id="Header_379">
1266 <title>Using fstrace Commands Effectively</title>
1268 <para>To use <emphasis role="bold">fstrace</emphasis> commands most effectively, configure them as indicated: <itemizedlist>
1270 <para>Store the <emphasis role="bold">fstrace</emphasis> binary in a local disk directory.</para>
1274 <para>When you dump the <emphasis role="bold">fstrace</emphasis> log to a file, direct it to one on the local
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>
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>
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>
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>
1298 </itemizedlist></para>
1301 <sect2 id="HDRWQ344">
1302 <title>Activating the Trace Log</title>
1304 <para>To start Cache Manager tracing on an AFS client machine, you must first configure <itemizedlist>
1306 <para>The <emphasis role="bold">cmfx</emphasis> kernel trace log using the <emphasis role="bold">fstrace
1307 setlog</emphasis> command</para>
1311 <para>The <emphasis role="bold">cm</emphasis> event set using the <emphasis role="bold">fstrace setset</emphasis>
1314 </itemizedlist></para>
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
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>
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>
1332 <primary>fstrace commands</primary>
1334 <secondary>setlog</secondary>
1338 <primary>commands</primary>
1340 <secondary>fstrace setlog</secondary>
1344 <primary>trace log (fstrace)</primary>
1346 <secondary>configuring</secondary>
1350 <primary>configuring</primary>
1352 <secondary>trace log (fstrace)</secondary>
1356 <sect2 id="Header_381">
1357 <title>To configure the trace log</title>
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: <<replaceable>root_password</replaceable>>
1365 </programlisting></para>
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> <<replaceable>log_name</replaceable>>+] <emphasis
1372 role="bold">-buffersize</emphasis> <<replaceable>1-kilobyte_units</replaceable>>
1373 </programlisting></para>
1377 <para>The following example sets the size of the <emphasis role="bold">cmfx</emphasis> trace log to 80 KB.</para>
1380 # <emphasis role="bold">fstrace setlog cmfx 80</emphasis>
1384 <primary>fstrace commands</primary>
1386 <secondary>setset</secondary>
1390 <primary>commands</primary>
1392 <secondary>fstrace setset</secondary>
1396 <primary>event set (fstrace)</primary>
1398 <secondary>setting</secondary>
1402 <primary>setting</primary>
1404 <secondary>event set (fstrace)</secondary>
1408 <sect2 id="HDRWQ345">
1409 <title>To set the event set</title>
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: <<replaceable>root_password</replaceable>>
1417 </programlisting></para>
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> <<replaceable>set_name</replaceable>>+] [<emphasis
1423 role="bold">-active</emphasis>] [<emphasis role="bold">-inactive</emphasis>] \
1424 [<emphasis role="bold">-dormant</emphasis>]
1425 </programlisting></para>
1429 <para>The following example activates the <emphasis role="bold">cm</emphasis> event set.</para>
1432 # <emphasis role="bold">fstrace setset cm -active</emphasis>
1436 <sect2 id="HDRWQ346">
1437 <title>Displaying the State of a Trace Log or Event Set</title>
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>
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>
1447 <primary>fstrace commands</primary>
1449 <secondary>lsset</secondary>
1453 <primary>commands</primary>
1455 <secondary>fstrace lsset</secondary>
1459 <primary>event set (fstrace)</primary>
1461 <secondary>displaying state</secondary>
1465 <primary>displaying</primary>
1467 <secondary>state of event set (fstrace)</secondary>
1471 <sect2 id="Header_384">
1472 <title>To display the state of an event set</title>
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: <<replaceable>root_password</replaceable>>
1480 </programlisting></para>
1484 <para>Issue the <emphasis role="bold">fstrace lsset</emphasis> command to display the available event set and its state.
1486 # <emphasis role="bold">fstrace lsset</emphasis> [<emphasis role="bold">-set</emphasis> <<replaceable>set_name</replaceable>>+]
1487 </programlisting></para>
1491 <para>The following example displays the event set and its state on the local machine.</para>
1494 # <emphasis role="bold">fstrace lsset cm</emphasis>
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>
1502 <term><emphasis role="bold">active</emphasis></term>
1505 <para>Tracing is enabled.</para>
1510 <term><emphasis role="bold">inactive</emphasis></term>
1513 <para>Tracing is disabled, but space is still allocated for the corresponding trace log (<emphasis
1514 role="bold">cmfx</emphasis>).</para>
1519 <term><emphasis role="bold">dormant</emphasis></term>
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>
1526 </variablelist></para>
1529 <primary>fstrace commands</primary>
1531 <secondary>lslog</secondary>
1535 <primary>commands</primary>
1537 <secondary>fstrace lslog</secondary>
1541 <primary>trace log (fstrace)</primary>
1543 <secondary>displaying state</secondary>
1547 <primary>displaying</primary>
1549 <secondary>state of trace log (fstrace)</secondary>
1553 <sect2 id="Header_385">
1554 <title>To display the log size</title>
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: <<replaceable>root_password</replaceable>>
1562 </programlisting></para>
1566 <para>Issue the <emphasis role="bold">fstrace lslog</emphasis> command to display information about the kernel trace log.
1568 # <emphasis role="bold">fstrace lslog</emphasis> [<emphasis role="bold">-set</emphasis> <<replaceable>set_name</replaceable>>+] [<emphasis
1569 role="bold">-log</emphasis> <<replaceable>log_name</replaceable>>] [<emphasis role="bold">-long</emphasis>]
1570 </programlisting></para>
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>
1578 # <emphasis role="bold">fstrace lslog cmfx -long</emphasis>
1580 cmfx : 60 kbytes (allocated)
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>
1588 <para>There are two allocation states for the kernel trace log: <variablelist>
1590 <term><computeroutput>allocated</computeroutput></term>
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>
1601 <term><computeroutput>unallocated</computeroutput></term>
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>
1609 </variablelist></para>
1612 <sect2 id="HDRWQ347">
1613 <title>Dumping and Clearing the Trace Log</title>
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 <<emphasis role="bold">Ctrl-c</emphasis>>.</para>
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>
1626 <primary>fstrace commands</primary>
1628 <secondary>dump</secondary>
1632 <primary>commands</primary>
1634 <secondary>fstrace dump</secondary>
1638 <primary>trace log (fstrace)</primary>
1640 <secondary>dumping</secondary>
1644 <primary>displaying</primary>
1646 <secondary>contents of trace log (fstrace)</secondary>
1650 <primary>dumping</primary>
1652 <secondary>trace log contents (fstrace)</secondary>
1656 <sect2 id="Header_387">
1657 <title>To dump the contents of a trace log</title>
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: <<replaceable>root_password</replaceable>>
1665 </programlisting></para>
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> <<replaceable>set_name</replaceable>>+] [<emphasis
1671 role="bold">-follow</emphasis> <<replaceable>log_name</replaceable>>] \
1672 [<emphasis role="bold">-file</emphasis> <<replaceable>output_filename</replaceable>>] \
1673 [<emphasis role="bold">-sleep</emphasis> <<replaceable>seconds_between_reads</replaceable>>]
1674 </programlisting></para>
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>
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>
1692 <para>The following is an example of trace log dump header:</para>
1696 Date: Fri Apr 16 10:44:38 1999
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>
1703 <para>The timestamp associated with the message (number of seconds from an arbitrary start point)</para>
1707 <para>The process ID or thread ID associated with the message</para>
1711 <para>The message itself</para>
1713 </itemizedlist></para>
1715 <para>A trace log message is formatted as follows:</para>
1718 time timestamp, pid pid:event message
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>
1725 <para>The following is an example of a dumped trace log message:</para>
1728 time 749.641274, pid 3002:Returning code 2 from 19
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>
1737 raw op 232c, time 511.916288, pid 0
1738 p0:Fri Apr 16 10:36:31 1999
1741 <para>Every 1024 seconds, a current time message is written to each log. This message has the following format:</para>
1744 time timestamp, pid pid: Current time: unix_time
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>
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>
1753 <para>Locate the log message whose actual time you want to determine.</para>
1757 <para>Search backward through the dump record until you come to a current time message.</para>
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>
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>
1771 </orderedlist></para>
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>
1777 Log wrapped; data missing.
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>
1787 <primary>fstrace commands</primary>
1789 <secondary>clear</secondary>
1793 <primary>commands</primary>
1795 <secondary>fstrace clear</secondary>
1799 <primary>trace log (fstrace)</primary>
1801 <secondary>clearing contents</secondary>
1805 <primary>clearing</primary>
1807 <secondary>contents of trace log (fstrace)</secondary>
1811 <primary>removing</primary>
1813 <secondary>trace log contents (fstrace)</secondary>
1817 <sect2 id="Header_388">
1818 <title>To clear the contents of a trace log</title>
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: <<replaceable>root_password</replaceable>>
1826 </programlisting></para>
1830 <para>Issue the <emphasis role="bold">fstrace clear</emphasis> command to clear logs by log name or by event set.
1832 # <emphasis role="bold">fstrace clear</emphasis> [<emphasis role="bold">-set</emphasis> <<replaceable>set_name</replaceable>>+] [<emphasis
1833 role="bold">-log</emphasis> <<replaceable>log_name</replaceable>>+]
1834 </programlisting></para>
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>
1842 # <emphasis role="bold">fstrace clear cm</emphasis>
1845 <para>The following example also clears the <emphasis role="bold">cmfx</emphasis> log on the local machine.</para>
1848 # <emphasis role="bold">fstrace clear cmfx</emphasis>
1852 <primary>fstrace commands</primary>
1854 <secondary>example of use</secondary>
1858 <sect2 id="HDRWQ348">
1859 <title>Examples of fstrace Commands</title>
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
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>
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>
1876 # <emphasis role="bold">fstrace lsset cm</emphasis>
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>
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>
1892 cm inactive (dormant)
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>
1900 # <emphasis role="bold">fstrace setset cm -active</emphasis>
1903 <para>If tracing is enabled currently on the client machine, the following output is displayed:</para>
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>
1915 # <emphasis role="bold">fstrace clear cm</emphasis>
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>
1922 # <emphasis role="bold">fstrace lslog cmfx -long</emphasis>
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>
1931 cmfx : 60 kbytes (allocated)
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>
1941 # <emphasis role="bold">fstrace setlog cmfx</emphasis> 100
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
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
1955 Date: Fri Apr 16 10:54:57 1999
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
1961 time 35.159854, pid 10891: Breaking callback for 5bd95e4 states 1024
1963 time 35.407081, pid 10891: Breaking callback for 5c0fadc states 1024
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
1973 time 71.464989, pid 38267: Gn_open vp 0x5bbd000 flags 0x0 (returns 0x
1975 AFS Trace Dump - Completed
1980 <sect1 id="HDRWQ349">
1981 <title>Using the afsmonitor Program</title>
1984 <primary>afsmonitor program</primary>
1986 <secondary>features summarized</secondary>
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
1994 <para>The <emphasis role="bold">afsmonitor</emphasis> program enables you to perform the following tasks. <itemizedlist>
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>
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>
2007 <para>Invoke programs or scripts automatically when a statistic exceeds its threshold.</para>
2009 </itemizedlist></para>
2011 <sect2 id="HDRWQ350">
2012 <title>Requirements for running the afsmonitor program</title>
2015 <primary>afsmonitor program</primary>
2017 <secondary>requirements for running</secondary>
2020 <para>The following software must be accessible to a machine where the <emphasis role="bold">afsmonitor</emphasis> program is
2021 running: <itemizedlist>
2023 <para>The AFS <emphasis role="bold">xstat</emphasis> libraries, which the <emphasis role="bold">afsmonitor</emphasis>
2024 program uses to gather data</para>
2028 <para>The <emphasis role="bold">curses</emphasis> graphics package, which most UNIX distributions provide as a standard
2031 </itemizedlist></para>
2034 <primary>curses graphics utility</primary>
2036 <secondary>afsmonitor program</secondary>
2040 <primary>xstat as requirement for running afsmonitor</primary>
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
2050 <primary>afsmonitor program</primary>
2052 <secondary>setting terminal type</secondary>
2056 <primary>terminal type</primary>
2058 <secondary>setting for afsmonitor</secondary>
2062 <primary>dumb terminal</primary>
2064 <secondary>use with afsmonitor</secondary>
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>
2074 <primary>privilege</primary>
2076 <secondary>required for afsmonitor program</secondary>
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>
2086 <sect2 id="Header_392">
2087 <title>The afsmonitor Output Screens</title>
2090 <primary>afsmonitor program</primary>
2092 <secondary>screen layout</secondary>
2095 <para>The <emphasis role="bold">afsmonitor</emphasis> program displays its data on three screens: <itemizedlist>
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>
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>
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>
2115 </itemizedlist></para>
2117 <para>Fields at the corners of every screen display the following information: <itemizedlist>
2119 <para>In the top left corner, the program name and version number.</para>
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>>>></computeroutput> indicates that there is additional data to the
2128 right; the symbol <computeroutput><<<</computeroutput> indicates that there is additional data to the
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>
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>
2146 </itemizedlist></para>
2148 <para><emphasis role="bold">Navigating the afsmonitor Display Screens</emphasis></para>
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>
2155 <term><computeroutput>cm</computeroutput></term>
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>
2164 <term><computeroutput>fs</computeroutput></term>
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>
2174 <term><computeroutput>left</computeroutput></term>
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><<<</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
2185 <term><computeroutput>next</computeroutput></term>
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>
2195 <term><computeroutput>oview</computeroutput></term>
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>
2204 <term><computeroutput>prev</computeroutput></term>
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>
2214 <term><computeroutput>right</computeroutput></term>
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>>>></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>
2223 </variablelist></para>
2226 <sect2 id="Header_393">
2227 <title>The System Overview Screen</title>
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>
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>
2236 <para>The number of machines on which the program is monitoring the indicated process</para>
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>
2243 </itemizedlist></para>
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>
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>
2256 <figure id="Figure_6" label="6">
2257 <title>The afsmonitor System Overview Screen</title>
2261 <imagedata fileref="overview.png" scale="50" />
2266 <para><emphasis role="bold"> </emphasis></para>
2269 <sect2 id="Header_394">
2270 <title>The File Servers Screen</title>
2272 <para>The <computeroutput>File Servers</computeroutput> screen displays the values collected at the most recent probe for File
2273 Server statistics.</para>
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>
2278 <para>The first column always displays the hostnames of the machines running the monitored File Servers.</para>
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
2287 <para>For a list of the available File Server statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program
2288 Statistics</link>.</para>
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>
2296 <figure id="Figure_7" label="7">
2297 <title>The afsmonitor File Servers Screen</title>
2301 <imagedata fileref="fserver1.png" scale="50" />
2306 <para><emphasis role="bold"> </emphasis></para>
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>>>></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>
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><<<</computeroutput>)
2318 and to the right (<computeroutput>>>></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
2322 <figure id="Figure_8" label="8">
2323 <title>The afsmonitor File Servers Screen Shifted One Page to the Right</title>
2327 <imagedata fileref="fserver2.png" scale="50" />
2332 <para><emphasis role="bold"> </emphasis></para>
2335 <sect2 id="Header_395">
2336 <title>The Cache Managers Screen</title>
2338 <para>The <computeroutput>Cache Managers</computeroutput> screen displays the values collected at the most recent probe for
2339 Cache Manager statistics.</para>
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>
2344 <para>The first column always displays the hostnames of the machines running the monitored Cache Managers.</para>
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
2353 <para>For a list of the available Cache Manager statistics, see <link linkend="HDRWQ617">Appendix C, The afsmonitor Program
2354 Statistics</link>.</para>
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>
2361 <figure id="Figure_9" label="9">
2362 <title>The afsmonitor Cache Managers Screen</title>
2366 <imagedata fileref="cachmgr.png" scale="50" />
2371 <para><emphasis role="bold"> </emphasis></para>
2375 <sect1 id="HDRWQ351">
2376 <title>Configuring the afsmonitor Program</title>
2379 <primary>afsmonitor program</primary>
2381 <secondary>creating configuration files for</secondary>
2385 <primary>configuring</primary>
2387 <secondary>afsmonitor program</secondary>
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:
2394 <para>The File Servers, Cache Managers, or both to monitor.</para>
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>
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>
2407 </itemizedlist></para>
2409 <para>The following list describes the instructions that can appear in the configuration file: <variablelist>
2411 <term><computeroutput>cm</computeroutput> <replaceable>hostname</replaceable></term>
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
2422 <term><computeroutput>fs</computeroutput> <replaceable>hostname</replaceable></term>
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
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>
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>
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>
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>
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>
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>
2469 </itemizedlist></para>
2474 <term><computeroutput>show fs | cm <replaceable>field/group/section</replaceable></computeroutput></term>
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>
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>
2495 <term><emphasis role="bold"># comments</emphasis></term>
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>
2502 </variablelist></para>
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>
2507 <para>The following example illustrates a possible configuration file:</para>
2510 thresh cm dlocalAccesses 1000000
2511 thresh cm dremoteAccesses 500000 handleDRemote
2512 thresh fs rx_maxRtt_Usec 1000
2516 thresh cm dlocalAccesses 2000000
2517 thresh cm vcacheMisses 10000
2523 show cm numCellsContacted
2524 show cm dlocalAccesses
2525 show cm dremoteAccesses
2526 show cm vcacheMisses
2527 show cm Auth_Stats_group
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>
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>
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>
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>
2548 </itemizedlist></para>
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>
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>
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>
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>
2575 <sect1 id="HDRWQ352">
2576 <title>Writing afsmonitor Statistics to a File</title>
2579 <primary>afsmonitor program</primary>
2581 <secondary>creating an output file</secondary>
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>
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>
2594 time host_name <emphasis role="bold">CM</emphasis>|<emphasis role="bold">FS</emphasis> list_of_measured_values
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>
2602 <para>This file format provides several advantages: <itemizedlist>
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>
2610 <para>It can be passed through filters to extract desired information using the standard set of UNIX tools.</para>
2614 <para>It is suitable for long term storage of the <emphasis role="bold">afsmonitor</emphasis> program output.</para>
2616 </itemizedlist></para>
2619 <primary>afsmonitor program</primary>
2621 <secondary>command syntax</secondary>
2625 <primary>commands</primary>
2627 <secondary>afsmonitor</secondary>
2631 <sect1 id="Header_398">
2632 <title>To start the afsmonitor Program</title>
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>
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> <<replaceable>configuration file</replaceable>>] \
2646 [<emphasis role="bold">-frequency</emphasis> <<replaceable>poll frequency, in seconds</replaceable>>] \
2647 [<emphasis role="bold">-output</emphasis> <<replaceable>storage file name</replaceable>>] [<emphasis
2648 role="bold">-detailed</emphasis>] \
2649 [<emphasis role="bold">-debug</emphasis> <<replaceable>turn debugging output on to the named file</replaceable>>] \
2650 [<emphasis role="bold">-fshosts</emphasis> <<replaceable>list of file servers to monitor</replaceable>>+] \
2651 [<emphasis role="bold">-cmhosts</emphasis> <<replaceable>list of cache managers to monitor</replaceable>>+]
2652 afsmonitor Collecting Statistics...
2653 </programlisting></para>
2655 <para>where <variablelist>
2657 <term><emphasis role="bold">initcmd</emphasis></term>
2660 <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
2666 <term><emphasis role="bold">-config</emphasis></term>
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>
2679 <term><emphasis role="bold">-frequency</emphasis></term>
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
2692 <term><emphasis role="bold">-output</emphasis></term>
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
2702 <term><emphasis role="bold">-detailed</emphasis></term>
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>
2711 <term><emphasis role="bold">-fshosts</emphasis></term>
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>
2722 <term><emphasis role="bold">-cmhosts</emphasis></term>
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>
2731 </variablelist></para>
2736 <sect1 id="Header_399">
2737 <title>To stop the afsmonitor program</title>
2740 <primary>afsmonitor program</primary>
2742 <secondary>stopping</secondary>
2745 <para>To exit an <emphasis role="bold">afsmonitor</emphasis> program session, Enter the <<emphasis
2746 role="bold">Ctrl-c</emphasis>> interrupt signal or an uppercase <emphasis role="bold">Q</emphasis>.</para>
2749 <sect1 id="HDRWQ353">
2750 <title>The xstat Data Collection Facility</title>
2753 <primary>xstat data collection facility</primary>
2757 <primary>xstat data collection facility</primary>
2759 <secondary>libxstat_fs.a library</secondary>
2763 <primary>xstat data collection facility</primary>
2765 <secondary>libxstat_cm.a library</secondary>
2769 <primary>data collection</primary>
2771 <secondary>with xstat data collection facility</secondary>
2775 <primary>collecting</primary>
2777 <secondary>data with xstat data collection facility</secondary>
2781 <primary>File Server</primary>
2783 <secondary>collecting data with xstat data collection facility</secondary>
2787 <primary>Cache Manager</primary>
2789 <secondary>collecting data with xstat data collection facility</secondary>
2793 <primary>File Server</primary>
2795 <secondary>xstat data collection facility libraries</secondary>
2799 <primary>Cache Manager</primary>
2801 <secondary>xstat data collection facility libraries</secondary>
2805 <primary>libxstat_fs.a library</primary>
2809 <primary>libxstat_cm.a library</primary>
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>
2820 <para>The <emphasis role="bold">xstat</emphasis> facility consists of two C language libraries available to user-level
2821 applications: <itemizedlist>
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>
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>
2831 </itemizedlist></para>
2833 <para>The libraries allow the caller to register <itemizedlist>
2835 <para>A set of File Servers or Cache Managers to be examined.</para>
2839 <para>The frequency with which the File Servers or Cache Managers are to be probed for data.</para>
2843 <para>A user-specified routine to be called each time data is collected.</para>
2845 </itemizedlist></para>
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>
2850 <sect2 id="Header_401">
2851 <title>The libxstat Libraries</title>
2854 <primary>libxstat_fs.a library</primary>
2856 <secondary>routines</secondary>
2860 <primary>libxstat_cm.a library</primary>
2862 <secondary>routines</secondary>
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>
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>
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>
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>
2884 </itemizedlist></para>
2887 <primary>File Server</primary>
2889 <secondary>xstat data collections</secondary>
2893 <primary>Cache Manager</primary>
2895 <secondary>xstat data collections</secondary>
2899 <primary>xstat data collection facility</primary>
2901 <secondary>data collections</secondary>
2905 <primary>libxstat_fs.a library</primary>
2907 <secondary>data collections</secondary>
2911 <primary>libxstat_cm.a library</primary>
2913 <secondary>data collections</secondary>
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
2924 <primary>xstat data collection facility</primary>
2926 <secondary>obtaining more information</secondary>
2930 <primary>libxstat_fs.a library</primary>
2932 <secondary>obtaining more information</secondary>
2936 <primary>libxstat_cm.a library</primary>
2938 <secondary>obtaining more information</secondary>
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>
2945 <sect2 id="Header_402">
2946 <title>Example xstat Commands</title>
2949 <primary>xstat data collection facility</primary>
2951 <secondary>example commands</secondary>
2955 <primary>libxstat_fs.a library</primary>
2957 <secondary>example command using</secondary>
2961 <primary>libxstat_cm.a library</primary>
2963 <secondary>example command using</secondary>
2967 <primary>File Server</primary>
2969 <secondary>xstat example commands</secondary>
2973 <primary>Cache Manager</primary>
2975 <secondary>xstat example commands</secondary>
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>
2985 <primary>commands</primary>
2987 <secondary>xstat_fs_test</secondary>
2991 <primary>libxstat_fs.a library</primary>
2993 <secondary>xstat_fs_test example command</secondary>
2997 <primary>File Server</primary>
2999 <secondary>xstat_fs_test example command</secondary>
3003 <primary>xstat data collection facility</primary>
3005 <secondary>xstat_fs_test example command</secondary>
3008 <sect3 id="Header_403">
3009 <title>To use the example xstat_fs_test command</title>
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> <<replaceable>File Server name(s) to monitor</replaceable>>+ \
3018 <emphasis role="bold">-collID</emphasis> <<replaceable>Collection(s) to fetch</replaceable>>+ [<emphasis
3019 role="bold">-onceonly</emphasis>] \
3020 [<emphasis role="bold">-frequency</emphasis> <<replaceable>poll frequency, in seconds</replaceable>>] \
3021 [<emphasis role="bold">-period</emphasis> <<replaceable>data collection time, in minutes</replaceable>>] [<emphasis
3022 role="bold">-debug</emphasis>]
3023 </programlisting></para>
3025 <para>where <variablelist>
3027 <term><emphasis role="bold">xstat_fs_test</emphasis></term>
3030 <para>Must be typed in full.</para>
3035 <term><emphasis role="bold">initcmd</emphasis></term>
3038 <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
3044 <term><emphasis role="bold">-fsname</emphasis></term>
3047 <para>Is the Internet host name of each file server machine on which to monitor the File Server process.</para>
3052 <term><emphasis role="bold">-collID</emphasis></term>
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
3060 <para>There are two acceptable values: <itemizedlist>
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
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>
3073 </itemizedlist></para>
3078 <term><emphasis role="bold">-onceonly</emphasis></term>
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 <<emphasis
3083 role="bold">Ctrl-c</emphasis>> interrupt signal to halt the command at any time.</para>
3088 <term><emphasis role="bold">-frequency</emphasis></term>
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>
3097 <term><emphasis role="bold">-period</emphasis></term>
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>
3106 <term><emphasis role="bold">-debug</emphasis></term>
3109 <para>Displays additional information as the command runs.</para>
3112 </variablelist></para>
3117 <primary>commands</primary>
3119 <secondary>xstat_cm_test</secondary>
3123 <primary>libxstat_cm.a library</primary>
3125 <secondary>xstat_cm_test example command</secondary>
3129 <primary>Cache Manager</primary>
3131 <secondary>xstat_cm_test example command</secondary>
3135 <primary>xstat data collection facility</primary>
3137 <secondary>xstat_cm_test example command</secondary>
3141 <sect3 id="Header_404">
3142 <title>To use the example xstat_cm_test command</title>
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> <<replaceable>Cache Manager name(s) to monitor</replaceable>>+ \
3151 <emphasis role="bold">-collID</emphasis> <<replaceable>Collection(s) to fetch</replaceable>>+ \
3152 [<emphasis role="bold">-onceonly</emphasis>] [<emphasis role="bold">-frequency</emphasis> <<replaceable>poll frequency, in seconds</replaceable>>] \
3153 [<emphasis role="bold">-period</emphasis> <<replaceable>data collection time, in minutes</replaceable>>] [<emphasis
3154 role="bold">-debug</emphasis>]
3155 </programlisting></para>
3157 <para>where <variablelist>
3159 <term><emphasis role="bold">xstat_cm_test</emphasis></term>
3162 <para>Must be typed in full.</para>
3167 <term><emphasis role="bold">initcmd</emphasis></term>
3170 <para>Is an optional string that accommodates the command's use of the AFS command parser. It can be omitted and
3176 <term><emphasis role="bold">-cmname</emphasis></term>
3179 <para>Is the host name of each client machine on which to monitor the Cache Manager.</para>
3184 <term><emphasis role="bold">-collID</emphasis></term>
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
3192 <para>There are two acceptable values: <itemizedlist>
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>
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>
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>
3211 </itemizedlist></para>
3216 <term><emphasis role="bold">-onceonly</emphasis></term>
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 <<emphasis
3221 role="bold">Ctrl-c</emphasis>> interrupt signal to halt the command at any time.</para>
3226 <term><emphasis role="bold">-frequency</emphasis></term>
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>
3235 <term><emphasis role="bold">-period</emphasis></term>
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>
3244 <term><emphasis role="bold">-debug</emphasis></term>
3247 <para>Displays additional information as the command runs.</para>
3250 </variablelist></para>
3257 <sect1 id="HDRWQ354">
3258 <title>Auditing AFS Events on AIX File Servers</title>
3261 <primary>AFS</primary>
3263 <secondary>auditing events on AIX server machines</secondary>
3267 <primary>AIX</primary>
3269 <secondary>auditing AFS events</secondary>
3271 <tertiary>about</tertiary>
3275 <primary>auditing AFS events on AIX server machines</primary>
3279 <primary>events</primary>
3281 <secondary>auditing AFS on AIX server machines</secondary>
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>
3288 <para>Authentication and Identification Events</para>
3292 <para>Security Events</para>
3296 <para>Privilege Required Events</para>
3300 <para>Object Creation and Deletion Events</para>
3304 <para>Attribute Modification Events</para>
3308 <para>Process Control Events</para>
3310 </itemizedlist></para>
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>
3317 <sect2 id="Header_406">
3318 <title>Configuring AFS Auditing on AIX File Servers</title>
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>
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>
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>
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>
3340 </itemizedlist></para>
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>
3346 <sect2 id="Header_407">
3347 <title>To enable AFS auditing</title>
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>
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>
3363 <sect2 id="Header_408">
3364 <title>To disable AFS auditing</title>
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>
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>