📄 manual.sgml
字号:
in Second Extended filesystem format. Perform the following steps to install the software. </para> <orderedlist> <listitem><para>Insert the floppy in the drive.</para></listitem><listitem><para>Mount the floppy on an empty directory. For example, tomount the floppy in the first floppy drive under a directorycalled <filename>/mnt</filename>, enter</para><synopsis>mount -t ext2 /dev/fd0 /mnt</synopsis><para> This assumes your floppy is in <filename>/dev/fd0</filename>. You can use any empty directory in place of <filename>/mnt</filename>. With most Linux installations, this will work fine.</para></listitem><listitem<para>After mounting, changeto the <filename>/mnt</filename> (or whatever) directory.</para></listitem><listitem><para>Enter</para><synopsis>./Setup</synopsis><para> while logged in as root. Setup will determine whether the diskette contains a source code distribution or ready-to-run precompiled software. This will copy the binaries to <filename>/usr/local/bin</filename>, and create the necessary working directories.</para></listitem><listitem><para>Unmount the diskette by typing</para><synopsis>umount /mnt</synopsis><para> (That's <emphasis>u</emphasis>mount, not <emphasis>un</emphasis>mount.)</para><para> You can then eject the diskette. Store it in a safe place.</para><para> You will also be asked if you want to view the<filename>RELEASE-NOTES</filename> file. It is recommended that you do so at that point.</para><para> In both cases (downloaded and floppy), the installation will store the program in <filename>/usr/local/bin</filename> with the binaries owned by user root, readable, writable, and executable by the owner, no permissions for the group, no permissions for all others. (700 octal, or <computeroutput>-rwx------</computeroutput>).</para><note> <title>Note</title><para> You must be <filename>root</filename> to do the installation. The old style of installation (<command>cd src;make install</command>) is still supported.</para></note></listitem></orderedlist><para> Be sure <filename>/usr/local/bin</filename> is included in your environment's <envar>PATH</envar> variable. You can edit the appropriate command in your login customization file (<filename>.profile</filename> for the Bourne-type shells, <filename>.cshrc</filename> for the C shell and its relatives).</para></sect2></sect1><sect1 id="upgrading"><title> Upgrading from Earlier Versions</title><para>IPTraf 3.0 is a major revision from IPTraf 2.7. Thefilter subsystem has been completely redesigned and as such, isincompatible with previous filter formats. Therefore oldIPTraf filters can no longer be used. The installation procedure forIPTraf 3.0 will rename the filter list files but not delete them.</para><para>If you install a distribution package (e.g. RPM,dpkg), old filters may still appear in the filter selectionlist but the new IPTraf version will be unable to load them.</para></sect1><sect1 id="startstop"><title>Starting and Stopping IPTraf</title><para> After installation, you can start the program by simply entering</para><synopsis>iptraf</synopsis><para> at the shell prompt. You will see a copyright notice, with an instruction to press any key to get started. Just press any character key, and you will be immediately taken to the main menu. All major functions of the program are found there.</para><para> Entering the IPTraf command without any command-line parameters brings up the program's main menu. From there, you can select the facilities you want.</para><para> IPTraf determines and makes use of the maximum number of lines and columns on the terminal.</para><note> <title>Note</title><para> IPTraf does not have a SIGWINCH handler; it does not adjust itself when an xterm or some other X terminal is resized.</para></note><note> <title>Technical note</title> <para> IPTraf needs to refer to the terminfo databasein <filename>/usr/share/terminfo</filename>. If the supplied executable program fails with <computeroutput>Erroropening terminal</computeroutput>, your terminfo database may be located somewhere else. You can control the terminfo search pathby using the <envar>TERMINFO</envar> environment variable. For example, if you're using the <command>sh</command>or <command>bash</command> shell, and your terminfo database is in <filename>/usr/lib/terminfo</filename> (typical for Slackware distributions), you can use the commands:</para><synopsis>TERMINFO=/usr/lib/terminfoexport TERMINFO</synopsis><para> You can place these commands in your <filename>~/.profile</filename> or the systemwide <filename>/etc/profile</filename> startup files.</para><para> You can also create a symbolic link named <filename>/usr/share/terminfo</filename> to let it point to your existing terminfo (assuming again your terminfo is in <filename>/usr/lib/terminfo</filename>):</para><synopsis>ln -s /usr/lib/terminfo /usr/share/terminfo</synopsis><para> Or you can recompile your program to use your existing ncurses library installation. If you do this, make sure you have ncurses 4.2 or later.</para></note></sect1><sect1 id="cmdline"><title>Command-line Options</title><para> IPTraf has a few optional command-line parameters. As with most UNIX commands, IPTraf command-line parameters arecase-sensitive (<computeroutput>-l</computeroutput> is NOT the same as <computeroutput>-L</computeroutput>).</para><para> The following command-line parameters can be suppliedto the <command>iptraf</command> command:</para><variablelist><varlistentry><term><computeroutput>-i <replaceable>iface</replaceable></computeroutput></term><listitem><para> causes the IP traffic monitor to start immediately on the specified interface. If -i all is specified, all interfaces are monitored.</para></listitem></varlistentry><varlistentry><term><computeroutput>-g</computeroutput></term><listitem><para> starts the general interface statistics</para></listitem></varlistentry><varlistentry><term><computeroutput>-d <replaceable>iface</replaceable></computeroutput></term><listitem><para> shows detailed statistics for the specified interface</para></listitem></varlistentry><varlistentry><term><computeroutput>-s <replaceable>iface</replaceable></computeroutput></term><listitem><para> starts the TCP/UDP traffic monitor for the specified interface</para></listitem></varlistentry><varlistentry><term><computeroutput>-z <replaceable>iface</replaceable></computeroutput></term><listitem><para> starts the packet size breakdown for the specified interface</para></listitem></varlistentry><varlistentry><term><computeroutput>-l <replaceable>iface</replaceable></computeroutput></term><listitem><para> starts the LAN station monitor on the specified interface. If<computeroutput>-l all</computeroutput> is specified, all LAN interfaces are monitored.</para></listitem></varlistentry><varlistentry><term><computeroutput>-t <replaceable>timeout</replaceable></computeroutput></term><listitem><para> The <computeroutput>-t</computeroutput> parameter, when used with one of the other parameters that specify a facility to start, tells IPTraf to run the indicated facility for only timeout minutes, after which the facility exits. The <computeroutput>-t</computeroutput> parameter is ignored in menu mode.</para><para> If this parameter is not specified, the facility runs until the exit keystroke is pressed.</para></listitem></varlistentry><varlistentry><term><computeroutput>-B</computeroutput></term><listitem><para> Redirects all terminal output to the "bit bucket"<filename>/dev/null</filename>, closes standard input, andplaces the program in the background. This parameter can be used only withone of the <computeroutput>-i</computeroutput>, <computeroutput>-g</computeroutput>,<computeroutput>-d</computeroutput>,<computeroutput>-s</computeroutput>, <computeroutput>-z</computeroutput>, or<computeroutput>-l</computeroutput> parameters. See<link linkend="backop">Background Operation</link> in Chapter 9. <computeroutput>-B</computeroutput> is ignored in menumode.</para></listitem></varlistentry><varlistentry><term><computeroutput>-L <replaceable>filename</replaceable></computeroutput></term><listitem><para> Allows you to specify an alternate log file name when the any facility is directly started from the command line, whether in foreground or background mode. If specified in foreground mode, the log filename prompt is bypassed, even when logging is turned on in the <emphasis>Configure...</emphasis> menu. If this parameter is omitted in background mode, the default log filename is used.</para><para> This parameter always turns on logging.</para><para> If an absolute path is not specified, the log file will be created in the default log file directory</para></listitem></varlistentry><varlistentry><term><computeroutput>-I <replaceable>interval</replaceable></computeroutput></term><listitem><para> Sets the logging interval (in minutes) when the <computeroutput>-L</computeroutput> parameter is used. This overrides the <emphasis>Log interval...</emphasis> setting in the <emphasis>Configure...</emphasis> menu. If omitted, the configured value is used. This parameter is ignored when the <computeroutput>-L</computeroutput> parameter is omitted and logging is disabled.</para><para> The value specified here will affect all facilities except for the IP traffic monitor.</para></listitem></varlistentry><varlistentry><term><computeroutput>-q</computeroutput></term><listitem><para> Previously used to suppress the warning screen when IPTraf is run on kernels with IP masquerading. Since the masquerading code now processes packets in a way better suited to raw capture, this parameter is no longer needed and is retained only for compatibility.</para></listitem></varlistentry><varlistentry><term><computeroutput>-f</computeroutput></term><listitem><para> Forces IPTraf to clear all lock files and reset all instance counters to zero before running any facilities. IPTraf will then think it's the first instance of itself.</para><para> The <computeroutput>-f</computeroutput> parameter overrides the existing locks and counters imposed by the IPTraf process and by the various facilities, causing this instance to think it is the first and that there are no other facilities running. Use this parameter with great caution. A common use for this parameter is to recover from abrupt or abnormal terminations which may leave stale locks and counters still lying around.</para><para> The <computeroutput>-f</computeroutput> parameter may be used together with the others.</para></listitem></varlistentry><varlistentry><term><computeroutput>iptraf -h</computeroutput></term><listitem><para> displays a short help screen</para></listitem></varlistentry></variablelist><para> While the command-line options are case-sensitive, interactive keystroke at the IPTraf full-screen interface are not.</para></sect1><sect1 id="menus"><title>Using the Menus</title><para> Menu items with a trailing ellipsis (<computeroutput>...</computeroutput>) either pop up a submenu with further items, or require additional information before it can complete the task and return to the menu. Menu items without an ellipsis execute immediately.</para><para> Use the Up and Down arrow keys on your keyboard to move the selection bar. Press Enter to execute the selected item. Alternatively, you can also directly press the highlighted letter of the item you want. This will immediately execute the option.</para><figure><title>The IPTraf Main Menu</title><graphic format="png" fileref="iptraf-mmenu"></figure></sect1><sect1 id="exiting"><title>Exiting IPTraf</title><para> You can exit IPTraf with the Exit command in the main menu.</para><para> When started with one of the command-line options to directly start a statistical facility, pressing X or Q will exit the facility directly, without any confirmation. The<computeroutput>-t</computeroutput> command-line parameter will automatically exit the facility after the specified length of time without any confirmation as well. Daemon facilities started with the <computeroutput>-B</computeroutput> parameter will immediately terminate after being sent a USR2 signal. See <link linkend="backop">background operation</link> in chapter 9 for more information.</para>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -