Index: stable/12/sbin/devmatch/devmatch.8 =================================================================== --- stable/12/sbin/devmatch/devmatch.8 (revision 368379) +++ stable/12/sbin/devmatch/devmatch.8 (revision 368380) @@ -1,96 +1,96 @@ .\" .\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd February 16, 2018 .Dt DEVMATCH 8 .Os .Sh NAME .Nm devmatch .Nd print information about unattached devices .Sh SYNOPSIS .Nm .Op Fl adhpuv .Op Fl -all .Op Fl -dump .Op Fl -hints Ar file .Op Fl -nomatch Ar event .Op Fl -unbound .Op Fl -verbose .Sh DESCRIPTION The .Nm utility, without any arguments, prints all the kernel modules it has found for all the unattached, enabled devices in the system. .Bl -tag -width 20m .It Fl a Fl -all Include all devices, not just the ones that are unattached. .It Fl d Fl -dump Produce a human readable dump of the .Pa linker.hints file. .It Fl h Fl -hints Ar file Use the named .Ar file instead of .Pa linker.hints guessed from the current module load path. .It Fl p Fl -nomatch Ar event Parse and use a standard NOMATCH event from .Xr devd 8 for matching instead of searching the device tree. .It Fl u Fl -unbound Attempt to produce a list of those drivers with PNP info whose driver tables with that PNP info can't be found. .It Fl v Fl -verbose Produce more verbose output. .El .Sh SEE ALSO .Xr devinfo 8 , .Xr MODULE_PNP_INFO 9 +.Sh AUTHORS +.An Warner Losh Aq Mt imp@FreeBSD.org .Sh BUGS The kernel has hints in it, but we exclude it from the list of modules to suggest for unmatched devices. We exclude it when suggesting drivers, but include it when looking for unbound devices or producing a full dump of .Pa linker.hints . This can be confusing. .Pp Some modules are hard links in .Pa /boot/kernel and will be reported twice. .Pp The PNP string's attributes are evaluated once per PNP entry on that bus rather than once. .Pp The term PNP is overloaded in FreeBSD. It means, generically, the identifying data the bus provides about a device. While this include old ISA PNP identifiers, it also includes the logical equivalent in USB, PCI, and others. .Pp Many drivers currently lack proper PNP table decorations and need to be updated. -.Sh AUTHORS -.An Warner Losh Aq Mt imp@FreeBSD.org Index: stable/12/sbin/fsck/fsck.8 =================================================================== --- stable/12/sbin/fsck/fsck.8 (revision 368379) +++ stable/12/sbin/fsck/fsck.8 (revision 368380) @@ -1,247 +1,247 @@ .\" $NetBSD: fsck.8,v 1.19 1999/03/10 00:08:33 erh Exp $ .\" .\" Copyright (c) 1996 Christos Zoulas. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Christos Zoulas. .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd March 5, 2019 .Dt FSCK 8 .Os .Sh NAME .Nm fsck .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm .Op Fl Cdfnpvy .Op Fl B | F .Op Fl T Ar fstype : Ns Ar fsoptions .Op Fl t Ar fstype .Op Fl c Ar fstab .Oo Ar special | node Oc ... .Sh DESCRIPTION The .Nm utility invokes file system-specific programs to check the special devices listed in the .Xr fstab 5 file or in the command line for consistency. .Pp It is normally used in the script .Pa /etc/rc during automatic reboot. Traditionally, .Nm is invoked before the file systems are mounted and all checks are done to completion at that time. If background checking is available, .Nm is invoked twice. It is first invoked at the traditional time, before the file systems are mounted, with the .Fl F flag to do checking on all the file systems that cannot do background checking. It is then invoked a second time, after the system has completed going multiuser, with the .Fl B flag to do checking on all the file systems that can do background checking. Unlike the foreground checking, the background checking is started asynchronously so that other system activity can proceed even on the file systems that are being checked. .Pp If no file systems are specified, .Nm reads the table .Pa /etc/fstab to determine which file systems to check. Only partitions in .Pa /etc/fstab that are mounted .Dq rw , .Dq rq or .Dq ro and that have non-zero pass number are checked. File systems with pass number 1 (normally just the root file system) are always checked one at a time. .Pp If not in preen mode, the remaining entries are checked in order of increasing pass number one at a time. This is needed when interaction with .Nm is required. .Pp In preen mode, after pass 1 completes, all remaining file systems are checked, in pass number order running one process per disk drive in parallel for each pass number in increasing order. .Pp In other words: In preen mode all pass 1 partitions are checked sequentially. Next all pass 2 partitions are checked in parallel, one process per disk drive. Next all pass 3 partitions are checked in parallel, one process per disk drive. etc. .Pp The disk drive containing each file system is inferred from the shortest prefix of the device name that ends in a digit; the remaining characters are assumed to be the partition and slice designators. .Pp If the .Fl t or .Fl T flags are not specified, .Nm will attempt to determine the file system type and call the appropriated file system check utility. Failure to detect the file system type will cause .Nm to fail with a message that the partition has an unknown file system type. .Pp The options are as follows: .Bl -tag -width indent .It Fl C Check if the .Dq clean flag is set in the superblock and skip file system checks if file system was properly dismounted and marked clean. .It Fl c Ar fstab Specify the .Pa fstab file to use. .It Fl d Debugging mode. Just print the commands without executing them. Available only if .Nm is compiled to support it. .It Fl f Force checking of file systems. -Running +Running .Dq Li fsck -f ignores the journal and does a full consistency check of the disk so will find and fix the errors about which the journal is unaware. .It Fl n Causes .Nm to assume no as the answer to all operator questions, except "CONTINUE?". .It Fl p Enter preen mode. In preen mode, only a restricted class of innocuous file system inconsistencies will be corrected. If unexpected inconsistencies caused by hardware or software failures are encountered, the check program will exit with a failure. See the manual pages for the individual check programs for a list of the sorts of failures that they correct when running in preen mode. .It Fl F Run in foreground mode. The check program for each file system is invoked with the .Fl F flag to determine whether it wishes to run as part of the boot up sequence, or if it is able to do its job in background after the system is up and running. A non-zero exit code indicates that it wants to run in foreground and the check program is invoked. A zero exit code indicates that it is able to run later in background and just a deferred message is printed. .It Fl B Run in background mode. The check program for each file system is invoked with the .Fl F flag to determine whether it wishes to run as part of the boot up sequence, or if it is able to do its job in background after the system is up and running. A non-zero exit code indicates that it wanted to run in foreground which is assumed to have been done, so the file system is skipped. A zero exit code indicates that it is able to run in background so the check program is invoked with the .Fl B flag to indicate that a check on the active file system should be done. When running in background mode, only one file system at a time will be checked. Note that background .Nm is limited to checking for only the most commonly occurring file system abnormalities. Under certain circumstances, some errors can escape background .Nm . It is recommended that you perform foreground .Nm on your systems periodically and whenever you encounter file-system\-related panics. .It Fl t Ar fstype Invoke .Nm only for the comma separated list of file system types. If the list starts with .Dq no then invoke .Nm for the file system types that are not specified in the list. .It Fl v Print the commands before executing them. .It Fl y Causes .Nm to assume yes as the answer to all operator questions. .It Fl T Ar fstype : Ns Ar fsoptions List of comma separated file system specific options for the specified file system type, in the same format as .Xr mount 8 . .El .Sh FILES .Bl -tag -width /etc/fstab -compact .It Pa /etc/fstab file system table .El .Sh SEE ALSO .Xr fstab 5 , .Xr fsck_ffs 8 , .Xr fsck_msdosfs 8 , .Xr mount 8 .Sh HISTORY A .Nm utility appeared in .Bx 4.0 . It was reimplemented as a filesystem independent wrapper in .Nx 1.3 and first appeared in .Fx 5.0 . The original filesystem specific utility became .Xr fsck_ffs 8 at this point. Index: stable/12/sbin/mount_msdosfs/mount_msdosfs.8 =================================================================== --- stable/12/sbin/mount_msdosfs/mount_msdosfs.8 (revision 368379) +++ stable/12/sbin/mount_msdosfs/mount_msdosfs.8 (revision 368380) @@ -1,222 +1,222 @@ .\" $NetBSD: mount_msdos.8,v 1.13 1998/02/06 05:57:00 perry Exp $ .\" .\" Copyright (c) 1993,1994 Christopher G. Demetriou .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgment: .\" This product includes software developed by Christopher G. Demetriou. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 28, 2017 .Dt MOUNT_MSDOSFS 8 .Os .Sh NAME .Nm mount_msdosfs .Nd mount an MS-DOS file system .Sh SYNOPSIS .Nm .Op Fl 9ls .Op Fl D Ar DOS_codepage .Op Fl g Ar gid .Op Fl L Ar locale .Op Fl M Ar mask .Op Fl m Ar mask .Op Fl o Ar options .Op Fl u Ar uid .Op Fl W Ar table .Ar special node .Sh DESCRIPTION The .Nm utility attaches the MS-DOS file system residing on the device .Pa special to the global file system namespace at the location indicated by .Pa node . This command is normally executed by .Xr mount 8 at boot time, but can be used by any user to mount an MS-DOS file system on any directory that they own (provided, of course, that they have appropriate access to the device that contains the file system). .Pp The options are as follows: .Bl -tag -width Ds .It Fl o Ar options Use the specified mount .Ar options , as described in .Xr mount 8 . The following MSDOS file system-specific options are available: .Bl -tag -width indent .It Cm longnames Force Windows 95 long filenames to be visible. .It Cm shortnames Force only the old MS-DOS 8.3 style filenames to be visible. .It Cm nowin95 Completely ignore Windows 95 extended file information. .El .It Fl u Ar uid Set the owner of the files in the file system to .Ar uid . The default owner is the owner of the directory on which the file system is being mounted. .It Fl g Ar gid Set the group of the files in the file system to .Ar gid . The default group is the group of the directory on which the file system is being mounted. .It Fl m Ar mask Specify the maximum file permissions for files in the file system. (For example, a .Ar mask of .Li 755 specifies that, by default, the owner should have read, write, and execute permissions for files, but others should only have read and execute permissions. See .Xr chmod 1 for more information about octal file modes. Only the nine low-order bits of .Ar mask are used. The value of .Ar -M is used if it is supplied and .Ar -m is omitted. The default .Ar mask is taken from the directory on which the file system is being mounted. .It Fl M Ar mask Specify the maximum file permissions for directories in the file system. The value of .Ar -m is used if it is supplied and .Ar -M is omitted. See the previous option's description for details. .It Fl s Force behaviour to ignore and not generate Win'95 long filenames. .It Fl l Force listing and generation of Win'95 long filenames and separate creation/modification/access dates. .Pp If neither .Fl s nor .Fl l are given, .Fl l is the default. .It Fl 9 Ignore the special Win'95 directory entries even if deleting or renaming a file. This forces .Fl s . .\".It Fl G .\"This option causes the file system to be interpreted as an Atari-Gemdos .\"file system. .\"The differences to the MS-DOS file system are minimal and .\"limited to the boot block. .\"This option enforces .\".Fl s . .It Fl L Ar locale Specify locale name used for file name conversions for DOS and Win'95 names. By default ISO 8859-1 assumed as local character set. .It Fl D Ar DOS_codepage Specify the MS-DOS code page (aka IBM/OEM code page) name used for file name conversions for DOS names. .It Fl W Ar table .Bf Em This option is preserved for backward compatibility purpose only, and will be removed in the future. Please avoid using this option. .Ef .Pp Specify text file name with conversion table: .Pa iso22dos , iso72dos , koi2dos , koi8u2dos . .El .Sh EXAMPLES To mount a Russian MS-DOS file system located in .Pa /dev/ada1s1 : .Pp .Dl "mount_msdosfs -L ru_RU.KOI8-R -D CP866 /dev/ada1s1 /mnt" .Pp To mount a Japanese MS-DOS file system located in .Pa /dev/ada1s1 : .Pp .Dl "mount_msdosfs -L ja_JP.eucJP -D CP932 /dev/ada1s1 /mnt" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , .Xr fstab 5 , .Xr msdosfs 5 , .Xr mount 8 .Pp List of Localized MS Operating Systems: .Pa http://www.microsoft.com/globaldev/reference/oslocversion.mspx . .Sh HISTORY The predecessor to .Nm mount_msdos utility named .Nm mount_pcfs appeared in .Nx 0.8 . It was rewritten in .Nx 1.0 and first appeared in .Fx 2.0 . .Nm mount_msdos was renamed to the more aptly-named .Nm in -.Fx 5.0. +.Fx 5.0 . The character code conversion routine was added in 2003. .Sh AUTHORS Initial implementation as .Nm mount_pcfs was written by .An -nosplit .An Paul Popelka Aq Mt paulp@uts.amdahl.com . It was rewritten by .An Christopher G. Demetriou Aq Mt cgd@NetBSD.org . The character code conversion routine was added by .An Ryuichiro Imura Aq Mt imura@ryu16.org . .Sh CAVEATS The use of the .Fl 9 flag could result in damaged file systems, albeit the damage is in part taken care of by procedures similar to the ones used in Win'95. Index: stable/12/usr.bin/chat/chat.8 =================================================================== --- stable/12/usr.bin/chat/chat.8 (revision 368379) +++ stable/12/usr.bin/chat/chat.8 (revision 368380) @@ -1,644 +1,645 @@ .\" $FreeBSD$ .Dd September 10, 2012 .Dt CHAT 8 .Os .Sh NAME .Nm chat .Nd Automated conversational script with a modem .Sh SYNOPSIS .Nm .Op Fl eSsVv .Op Fl f Ar chat-file .Op Fl r Ar report-file .Op Fl T Ar phone-number .Op Fl t Ar timeout .Op Fl U Ar phone-number2 .Op Ar script .Sh DESCRIPTION The .Nm program defines a conversational exchange between the computer and the modem. Its primary purpose is to establish the connection between the Point-to-Point Protocol Daemon .Pq pppd and the remote's pppd process. .Sh OPTIONS .Bl -tag -width indent .It Fl e Start with the echo option turned on. Echoing may also be turned on or off at specific points in the chat script by using the ECHO keyword. When echoing is enabled, all output from the modem is echoed to .Em stderr . .It Fl f Ar chat-file Read the chat script from the chat file. The use of this option is mutually exclusive with the chat script parameters. The user must have read access to the file. Multiple lines are permitted in the file. Space or horizontal tab characters should be used to separate the strings. .It Fl r Ar report-file Set the file for output of the report strings. If you use the keyword .Dv REPORT , the resulting strings are written to this file. If this option is not used and you still use .Dv REPORT keywords, the .Pa stderr file is used for the report strings. .It Fl S Do not use .Xr syslog 3 . By default, error messages are sent to .Xr syslog 3 . The use of .Fl S will prevent both log messages from .Fl v and error messages from being sent to .Xr syslog 3 . .It Fl s Use .Em stderr . All log messages from .Fl v and all error messages will be sent to .Em stderr . .It Fl T Ar phone-number Pass in an arbitrary string, usually a phone number, that will be substituted for the \\T substitution metacharacter in a send string. .It Fl t Ar timeout Set the timeout for the expected string to be received. If the string is not received within the time limit then the reply string is not sent. An alternate reply may be sent or the script will fail if there is no alternate reply string. A failed script will cause the .Nm program to terminate with a non-zero error code. .It Fl U Ar phone-number2 Pass in a second string, usually a phone number, that will be substituted for the \\U substitution metacharacter in a send string. This is useful when dialing an ISDN terminal adapter that requires two numbers. .It Fl V Request that the .Nm script be executed in a .Em stderr verbose mode. The .Nm program will then log all text received from the modem and the output strings sent to the modem to the stderr device. This device is usually the local console at the station running the chat or pppd program. .It Fl v Request that the .Nm script be executed in a verbose mode. The .Nm program will then log the execution state of the chat script as well as all text received from the modem and the output strings sent to the modem. The default is to log through .Xr syslog 3 ; the logging method may be altered with the .Fl S and .Fl s flags. Logging is done to the .Em local2 facility at level .Em info for verbose tracing and level .Em err for some errors. .El .Sh CHAT SCRIPT The .Nm script defines the communications. A script consists of one or more "expect-send" pairs of strings, separated by spaces, with an optional "subexpect-subsend" string pair, separated by a dash as in the following example: .Pp .D1 ogin:-BREAK-ogin: ppp ssword: hello2u2 .Pp This line indicates that the .Nm program should expect the string "ogin:". If it fails to receive a login prompt within the time interval allotted, it is to send a break sequence to the remote and then expect the string "ogin:". If the first "ogin:" is received then the break sequence is not generated. .Pp Once it received the login prompt the .Nm program will send the string ppp and then expect the prompt "ssword:". When it receives the prompt for the password, it will send the password hello2u2. .Pp A carriage return is normally sent following the reply string. It is not expected in the "expect" string unless it is specifically requested by using the \\r character sequence. .Pp The expect sequence should contain only what is needed to identify the string. Since it is normally stored on a disk file, it should not contain variable information. It is generally not acceptable to look for time strings, network identification strings, or other variable pieces of data as an expect string. .Pp To help correct for characters which may be corrupted during the initial sequence, look for the string "ogin:" rather than "login:". It is possible that the leading "l" character may be received in error and you may never find the string even though it was sent by the system. For this reason, scripts look for "ogin:" rather than "login:" and "ssword:" rather than "password:". .Pp A very simple script might look like this: .Pp .D1 ogin: ppp ssword: hello2u2 .Pp In other words, expect ....ogin:, send ppp, expect ...ssword:, send hello2u2. .Pp In actual practice, simple scripts are rare. At the vary least, you should include sub-expect sequences should the original string not be received. For example, consider the following script: .Pp .D1 ogin:--ogin: ppp ssword: hello2u2 .Pp This would be a better script than the simple one used earlier. This would look for the same login: prompt, however, if one was not received, a single return sequence is sent and then it will look for login: again. Should line noise obscure the first login prompt then sending the empty line will usually generate a login prompt again. .Sh COMMENTS Comments can be embedded in the chat script. A comment is a line which starts with the # (hash) character in column 1. Such comment lines are just ignored by the chat program. If a '#' character is to be expected as the first character of the expect sequence, you should quote the expect string. If you want to wait for a prompt that starts with a # (hash) character, you would have to write something like this: .Bd -literal -offset indent # Now wait for the prompt and send logout string \&'# ' logout .Ed .Sh ABORT STRINGS Many modems will report the status of the call as a string. These strings may be .Dv CONNECTED or .Dv NO CARRIER or .Dv BUSY . It is often desirable to terminate the script should the modem fail to connect to the remote. The difficulty is that a script would not know exactly which modem string it may receive. On one attempt, it may receive .Dv BUSY while the next time it may receive .Dv NO CARRIER . .Pp These "abort" strings may be specified in the script using the ABORT sequence. It is written in the script as in the following example: .Pp .D1 ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT .Pp This sequence will expect nothing; and then send the string ATZ. The expected response to this is the string .Dv OK . When it receives .Dv OK , the string ATDT5551212 to dial the telephone. The expected string is .Dv CONNECT . If the string .Dv CONNECT is received the remainder of the script is executed. However, should the modem find a busy telephone, it will send the string .Dv BUSY . This will cause the string to match the abort character sequence. The script will then fail because it found a match to the abort string. If it received the string .Dv NO CARRIER , it will abort for the same reason. Either string may be received. Either string will terminate the .Nm script. .Sh CLR_ABORT STRINGS This sequence allows for clearing previously set .Dv ABORT strings. .Dv ABORT strings are kept in an array of a pre-determined size (at compilation time); CLR_ABORT will reclaim the space for cleared entries so that new strings can use that space. .Sh SAY STRINGS The .Dv SAY directive allows the script to send strings to the user at the terminal via standard error. If .Nm is being run by pppd, and pppd is running as a daemon (detached from its controlling terminal), standard error will normally be redirected to the file .Pa /etc/ppp/connect-errors . .Pp .Dv SAY strings must be enclosed in single or double quotes. If carriage return and line feed are needed in the string to be output, you must explicitly add them to your string. .Pp The .Dv SAY strings could be used to give progress messages in sections of the script where you want to have 'ECHO OFF' but still let the user -know what is happening. An example is: +know what is happening. +An example is: .Bd -literal -offset indent ABORT BUSY ECHO OFF SAY "Dialling your ISP...\\n" \&'' ATDT5551212 TIMEOUT 120 SAY "Waiting up to 2 minutes for connection ... " CONNECT '' SAY "Connected, now logging in ...\\n" ogin: account ssword: pass $ SAY "Logged in OK ...\\n" \fIetc ...\fR .Ed .Pp This sequence will only present the .Dv SAY strings to the user and all the details of the script will remain hidden. For example, if the above script works, the user will see: .Bd -literal -offset indent Dialling your ISP... Waiting up to 2 minutes for connection ... Connected, now logging in ... Logged in OK ... .Ed .Sh REPORT STRINGS A report string is similar to the .Dv ABORT string. The difference is that the strings, and all characters to the next control character such as a carriage return, are written to the report file. .Pp The report strings may be used to isolate the transmission rate of the modem's connect string and return the value to the chat user. The analysis of the report string logic occurs in conjunction with the other string processing such as looking for the expect string. The use of the same string for a report and abort sequence is probably not very useful, however, it is possible. .Pp The report strings to no change the completion code of the program. .Pp These "report" strings may be specified in the script using the .Dv REPORT sequence. It is written in the script as in the following example: .Pp .D1 REPORT CONNECT ABORT BUSY '' ATDT5551212 CONNECT '' ogin: account .Pp This sequence will expect nothing; and then send the string ATDT5551212 to dial the telephone. The expected string is .Dv CONNECT . If the string .Dv CONNECT is received the remainder of the script is executed. In addition the program will write to the expect-file the string "CONNECT" plus any characters which follow it such as the connection rate. .Sh CLR_REPORT STRINGS This sequence allows for clearing previously set .Dv REPORT strings. .Dv REPORT strings are kept in an array of a pre-determined size (at compilation time); CLR_REPORT will reclaim the space for cleared entries so that new strings can use that space. .Sh ECHO The echo options controls whether the output from the modem is echoed to .Em stderr . This option may be set with the .Fl e option, but it can also be controlled by the .Dv ECHO keyword. The "expect-send" pair .Dv ECHO ON enables echoing, and .Dv ECHO OFF disables it. With this keyword you can select which parts of the conversation should be visible. For instance, with the following script: .Bd -literal -offset indent ABORT 'BUSY' ABORT 'NO CARRIER' \&'' ATZ OK\\r\\n ATD1234567 \\r\\n \\c ECHO ON CONNECT \\c ogin: account .Ed .Pp all output resulting from modem configuration and dialing is not visible, but starting with the .Dv CONNECT or .Dv BUSY message, everything will be echoed. .Sh HANGUP The .Dv HANGUP options control whether a modem hangup should be considered as an error or not. This option is useful in scripts for dialling systems which will hang up and call your system back. The .Dv HANGUP options can be .Dv ON or .Dv OFF . .Pp When .Dv HANGUP is set .Dv OFF and the modem hangs up (e.g., after the first stage of logging in to a callback system), .Nm will continue running the script (e.g., waiting for the incoming call and second stage login prompt). As soon as the incoming call is connected, you should use the .Dv HANGUP ON directive to reinstall normal hang up signal behavior. Here is a (simple) example script: .Bd -literal -offset indent ABORT 'BUSY' \&'' ATZ OK\\r\\n ATD1234567 \\r\\n \\c CONNECT \\c \&'Callback login:' call_back_ID HANGUP OFF ABORT "Bad Login" \&'Callback Password:' Call_back_password TIMEOUT 120 CONNECT \\c HANGUP ON ABORT "NO CARRIER" ogin:--BREAK--ogin: real_account \fIetc ...\fR .Ed .Sh TIMEOUT The initial timeout value is 45 seconds. This may be changed using the .Fl t parameter. .Pp To change the timeout value for the next expect string, the following example may be used: .Bd -literal -offset indent ATZ OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin: TIMEOUT 5 assword: hello2u2 .Ed .Pp This will change the timeout to 10 seconds when it expects the login: prompt. The timeout is then changed to 5 seconds when it looks for the password prompt. .Pp The timeout, once changed, remains in effect until it is changed again. .Sh SENDING EOT The special reply string of .Dv EOT indicates that the chat program should send an .Dv EOT character to the remote. This is normally the End-of-file character sequence. A return character is not sent following the .Dv EOT . .Pp The .Dv EOT sequence may be embedded into the send string using the sequence ^D. .Sh GENERATING BREAK The special reply string of .Dv BREAK will cause a break condition to be sent. The break is a special signal on the transmitter. The normal processing on the receiver is to change the transmission rate. It may be used to cycle through the available transmission rates on the remote until you are able to receive a valid login prompt. .Pp The break sequence may be embedded into the send string using the \fI\\K\fR sequence. .Sh ESCAPE SEQUENCES The expect and reply strings may contain escape sequences. All of the sequences are legal in the reply string. Many are legal in the expect. Those which are not valid in the expect sequence are so indicated. .Bl -tag -width indent .It '' Expects or sends a null string. If you send a null string then it will still send the return character. This sequence may either be a pair of apostrophe or quote characters. .It \eb represents a backspace character. .It \ec Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. It must be at the end of the send string. For example, the sequence hello\\c will simply send the characters h, e, l, l, o .Pq Em not valid in expect . .It \ed Delay for one second. The program uses sleep(1) which will delay to a maximum of one second .Pq Em not valid in expect . .It \eK Insert a .Dv BREAK .Pq Em not valid in expect . .It \en Send a newline or linefeed character. .It \eN Send a null character. The same sequence may be represented by \\0 .Pq Em not valid in expect . .It \ep Pause for a fraction of a second. The delay is 1/10th of a second .Pq Em not valid in expect . .It \eq Suppress writing the string to .Xr syslogd 8 . The string ?????? is written to the log in its place .Pq Em not valid in expect . .It \er Send or expect a carriage return. .It \es Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\\sTIM are the same. .It \et Send or expect a tab character. .It \e Send or expect a backslash character. .It \eddd Collapse the octal digits (ddd) into a single ASCII character and send that character .Pq Em some characters are not valid in expect . .It \^^C Substitute the sequence with the control character represented by C. For example, the character DC1 (17) is shown as \^^Q .Pq Em some characters are not valid in expect . .El .Sh TERMINATION CODES The .Nm program will terminate with the following completion codes. .Bl -tag -width indent .It 0 The normal termination of the program. This indicates that the script was executed without error to the normal conclusion. .It 1 One or more of the parameters are invalid or an expect string was too large for the internal buffers. This indicates that the program as not properly executed. .It 2 An error occurred during the execution of the program. This may be due to a read or write operation failing for some reason or chat receiving a signal such as .Dv SIGINT . .It 3 A timeout event occurred when there was an .Em expect string without having a "-subsend" string. This may mean that you did not program the script correctly for the condition or that some unexpected event has occurred and the expected string could not be found. .It 4 The first string marked as an .Dv ABORT condition occurred. .It 5 The second string marked as an .Dv ABORT condition occurred. .It 6 The third string marked as an .Dv ABORT condition occurred. .It 7 The fourth string marked as an .Dv ABORT condition occurred. .It ... The other termination codes are also strings marked as an .Dv ABORT condition. .El .Pp Using the termination code, it is possible to determine which event terminated the script. It is possible to decide if the string "BUSY" was received from the modem as opposed to "NO DIAL TONE". While the first event may be retried, the second will probably have little chance of succeeding during a retry. .Sh SEE ALSO Additional information about .Nm scripts may be found with UUCP documentation. The .Nm script was taken from the ideas proposed by the scripts used by the uucico program. .Pp .Xr syslog 3 , .Xr syslogd 8 .Sh COPYRIGHT The .Nm program is in public domain. This is not the GNU public license. If it breaks then you get to keep both pieces. Index: stable/12/usr.bin/du/du.1 =================================================================== --- stable/12/usr.bin/du/du.1 (revision 368379) +++ stable/12/usr.bin/du/du.1 (revision 368380) @@ -1,298 +1,298 @@ .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)du.1 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" .Dd August 1, 2019 .Dt DU 1 .Os .Sh NAME .Nm du .Nd display disk usage statistics .Sh SYNOPSIS .Nm .Op Fl Aclnx .Op Fl H | L | P .Op Fl g | h | k | m .Op Fl a | s | d Ar depth .Op Fl B Ar blocksize .Op Fl I Ar mask .Op Fl t Ar threshold .Op Ar .Sh DESCRIPTION The .Nm utility displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each directory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed. .Pp The options are as follows: .Bl -tag -width indent .It Fl A Display the apparent size instead of the disk usage. This can be helpful when operating on compressed volumes or sparse files. .It Fl B Ar blocksize Calculate block counts in .Ar blocksize byte blocks. This is different from the -.Fl h, k, m, +.Fl h , k , m , .Fl Fl si and .Fl g options or setting .Ev BLOCKSIZE and gives an estimate of how much space the examined file hierarchy would require on a filesystem with the given .Ar blocksize . Unless in .Fl A mode, .Ar blocksize is rounded up to the next multiple of 512. .It Fl H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed. .It Fl I Ar mask Ignore files and directories matching the specified .Ar mask . .It Fl L Symbolic links on the command line and in file hierarchies are followed. .It Fl P No symbolic links are followed. This is the default. .It Fl a Display an entry for each file in a file hierarchy. .It Fl c Display a grand total. .It Fl d Ar depth Display an entry for all files and directories .Ar depth directories deep. .It Fl g Display block counts in 1073741824-byte (1 GiB) blocks. .It Fl h .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte based on powers of 1024. .It Fl k Display block counts in 1024-byte (1 kiB) blocks. .It Fl l If a file has multiple hard links, count its size multiple times. The default behavior of .Nm is to count files with multiple hard links only once. When the .Fl l option is specified, the hard link checks are disabled, and these files are counted (and displayed) as many times as they are found. .It Fl m Display block counts in 1048576-byte (1 MiB) blocks. .It Fl n Ignore files and directories with user .Dq nodump flag .Pq Dv UF_NODUMP set. .It Fl r Generate messages about directories that cannot be read, files that cannot be opened, and so on. This is the default case. This option exists solely for conformance with .St -xpg4 . .It Fl s Display an entry for each specified file. (Equivalent to .Fl d Li 0 ) .It Fl Fl si .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte based on powers of 1000. .It Fl t Ar threshold Display only entries for which size exceeds .Ar threshold . If .Ar threshold is negative, display only entries for which size is less than the absolute value of .Ar threshold . .It Fl x File system mount points are not traversed. .El .Pp The .Nm utility counts the storage used by symbolic links and not the files they reference unless the .Fl H or .Fl L option is specified. If either the .Fl H or .Fl L option is specified, storage used by any symbolic links which are followed is not counted (or displayed). The .Fl H , .Fl L and .Fl P options override each other and the command's actions are determined by the last one specified. .Pp The -.Fl h, k, m +.Fl h , k , m and .Fl Fl si options all override each other; the last one specified determines the block counts used. .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE .It Ev BLOCKSIZE If the environment variable .Ev BLOCKSIZE is set, and the -.Fl h, k, m +.Fl h , k , m or .Fl Fl si options are not specified, the block counts will be displayed in units of that block size. If .Ev BLOCKSIZE is not set, and the -.Fl h, k, m +.Fl h , k , m or .Fl Fl si options are not specified, the block counts will be displayed in 512-byte blocks. .El .Sh EXAMPLES Show disk usage for all files in the current directory. Output is in human-readable form: .Pp .Dl # du -ah .Pp Summarize disk usage in the current directory: .Pp .Dl # du -hs .Pp Summarize disk usage for a specific directory: .Pp .Dl # du -hs /home .Pp Show name and size of all C files in a specific directory. Also display a grand total at the end: .Pp .Dl # du -ch /usr/src/sys/kern/*.c .Sh SEE ALSO .Xr df 1 , .Xr chflags 2 , .Xr fts 3 , .Xr symlink 7 , .Xr quot 8 .Sh STANDARDS The .Nm utility is compliant with the .St -p1003.1-2008 specification. .Pp The flags .Op Fl cdhP , as well as the .Ev BLOCKSIZE environment variable, are extensions to that specification. .Pp The flag .Op Fl r is accepted but ignored, for compatibility with systems implementing the obsolete .St -xcu5 standard. .Sh HISTORY The .Nm utility and its .Fl a and .Fl s options first appeared in .At v1 . .Pp The .Fl r option first appeared in .At III and is available since .Fx 3.5 . The .Fl k and .Fl x options first appeared in .Bx 4.3 Reno and .Fl H in .Bx 4.4 . The .Fl c and .Fl L options first appeared in the GNU fileutils; .Fl L and .Fl P are available since .Bx 4.4 Lite1 , .Fl c since .Fx 2.2.6 . The .Fl d option first appeared in .Fx 2.2 , .Fl h first appeared in .Fx 4.0 . .Sh AUTHORS .An -nosplit This version of .Nm was written by .An Chris Newcomb for .Bx 4.3 Reno in 1989. Index: stable/12/usr.bin/setchannel/setchannel.1 =================================================================== --- stable/12/usr.bin/setchannel/setchannel.1 (revision 368379) +++ stable/12/usr.bin/setchannel/setchannel.1 (revision 368380) @@ -1,103 +1,104 @@ .\"- .\" Copyright (C) 2004-2006 The FreeBSD Project. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $Id: cxm.4,v 1.1 2004/10/16 00:12:35 mavetju Exp $ .\" $FreeBSD$ .\" .Dd November 30, 2006 .Dt PVR250-SETCHANNEL 1 .Os .Sh NAME .Nm pvr250-setchannel .Nd Hauppage PVR250/350 channel selector .Sh SYNOPSIS .Cd pvr250-setchannel [-a {on | off}] [-c | -r | -s | -t] [-g geom] [-m channel_set] [channel | freq] .Sh DESCRIPTION .Nm provides support for selecting channels on Hauppauge WinTV cards, including the PVR 150, PVR 250, PVR 350 and PVR 500. .Pp The following options are available: .Bl -tag -width indent .It Fl a Cm on Enable AFC. .It Fl a Cm off Disable AFC. .It Fl c Select composite input. .It Fl d Select the tuner unit number. This is appended to the base device file name .Pa /dev/cxm to form a device name such as .Pa /dev/cxm0 or .Pa /dev/cxm1 . .It Fl r Select radio input. .It Fl s Select svideo input. .It Fl t Select tuner. .It Fl g Cm geom -Select geometry. The first resolution is for NTSC, the second for -PAL. +Select geometry. +The first resolution is for NTSC, the second for PAL. .Pp VCD: 352x240 or 352x288 SVCD: 480x480 or 480x576 DVD (half D1): 352x480 or 352x576 DVD (full D1): 720x480 or 720x576 .It Fl m Cm channel-set Select channel set and system. .Pp 0 = Tuner Default 1 = US Broadcast (NTSC) 2 = US Cable (NTSC) 4 = Western Europe (PAL) 5 = Japan Broadcast (NTSC) 6 = Japan Cable (NTSC) 8 = Australia (PAL) 9 = France (SECAM) .It Cm channel Channel number to set. .It Cm freq Frequency in MHz (must include decimal point). .El .Sh SEE ALSO .Xr bktr 4 , .Xr cxm 4 , .Xr meteor 4 .Sh HISTORY The .Nm -program first appeared in the -multimedia mailing-list in January 2004. The +program first appeared in the -multimedia mailing-list in January 2004. +The .Nm program first appeared in the FreeBSD Ports collection in October 2004. .Sh AUTHORS .An -nosplit This program is made by .An John Wehle .Pp This man page is made by .An Edwin Groothuis Index: stable/12/usr.bin/tftp/tftp.1 =================================================================== --- stable/12/usr.bin/tftp/tftp.1 (revision 368379) +++ stable/12/usr.bin/tftp/tftp.1 (revision 368380) @@ -1,283 +1,287 @@ .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" .Dd March 2, 2020 .Dt TFTP 1 .Os .Sh NAME .Nm tftp .Nd trivial file transfer program .Sh SYNOPSIS .Nm .Op Ar host Op Ar port .Sh DESCRIPTION The .Nm utility is the user interface to the Internet .Tn TFTP (Trivial File Transfer Protocol), which allows users to transfer files to and from a remote machine. The remote .Ar host may be specified on the command line, in which case .Nm uses .Ar host as the default host for future transfers (see the .Cm connect command below). .Sh COMMANDS Once .Nm is running, it issues the prompt .Dq Li tftp> and recognizes the following commands: .Pp .Bl -tag -width verbose -compact .It Cm \&? Ar command-name ... Print help information. .Pp .It Cm ascii Shorthand for "mode ascii" .Pp .It Cm binary Shorthand for "mode binary" .Pp .It Cm blocksize Ar [size] Sets the TFTP blksize option in TFTP Read Request or Write Request packets to .Ar [size] -as specified in RFC 2348. Valid values are between 8 and 65464. +as specified in RFC 2348. +Valid values are between 8 and 65464. If no blocksize is specified, then by default a blocksize of 512 bytes will be used. .Pp .It Cm blocksize2 Ar [size] Sets the TFTP blksize2 option in TFTP Read Request or Write Request packets to .Ar [size] . -Values are restricted to powers of 2 between 8 and 32768. This is a -non-standard TFTP option. +Values are restricted to powers of 2 between 8 and 32768. +This is a non-standard TFTP option. .Pp .It Cm connect Ar host Op Ar port Set the .Ar host (and optionally .Ar port ) for transfers. Note that the .Tn TFTP protocol, unlike the .Tn FTP protocol, does not maintain connections between transfers; thus, the .Cm connect command does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the .Cm connect command; the remote host can be specified as part of the .Cm get or .Cm put commands. .Pp .It Cm debug Ar level -Enable or disable debugging levels during verbose output. The value of +Enable or disable debugging levels during verbose output. +The value of .Ar level can be one of .Cm packet , simple , options , or .Cm access . .Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo .Oo Ar host1 : Oc Ns Ar file1 .Oo Ar host2 : Oc Ns Ar file2 ... .Oo Ar hostN : Oc Ns Ar fileN .Xc Get one or more files from the remote host. When using the .Ar host argument, the .Ar host will be used as default host for future transfers. If .Ar localname is specified, the file is stored locally as .Ar localname , otherwise the original filename is used. Note that it is not possible to download two files at a time, only one, three, or more than three files, at a time. .Pp To specify an IPv6 numeric address for a host, wrap it using square brackets like .Dq Li [3ffe:2900:e00c:ffee::1234] : Ns Ar file to disambiguate the colons used in the IPv6 address from the colon separating the host and the filename. .Pp .It Cm mode Ar transfer-mode Set the mode for transfers; .Ar transfer-mode may be one of .Em ascii or .Em binary . The default is .Em binary . .Pp .It Cm packetdrop [arg] Randomly drop .Ar arg -out of 100 packets during a transfer. This is a debugging feature. +out of 100 packets during a transfer. +This is a debugging feature. .Pp .It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename .It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory Put a file or set of files to the remote host. When .Ar remotename is specified, the file is stored remotely as .Ar remotename , otherwise the original filename is used. If the .Ar remote-directory argument is used, the remote host is assumed to be a .Ux machine. To specify an IPv6 numeric address for a .Ar host , see the example under the .Cm get command. .Pp .It Cm options Ar [arg] -Enable or disable support for TFTP options. The valid values of +Enable or disable support for TFTP options. +The valid values of .Ar arg are .Cm on (enable RFC 2347 options), .Cm off (disable RFC 2347 options), and .Cm extra (toggle support for non-RFC defined options). .Pp .It Cm quit Exit .Nm . An end of file also exits. .Pp .It Cm rexmt Ar retransmission-timeout Set the per-packet retransmission timeout, in seconds. .Pp .It Cm rollover [arg] Specify the rollover option in TFTP Read Request or Write -Request packets. After 65535 packets have been transmitted, set the block -counter to +Request packets. +After 65535 packets have been transmitted, set the block counter to .Ar arg . Valid values of .Ar arg are 0 and 1. This is a non-standard TFTP option. .Pp .It Cm status Show current status. .Pp .It Cm timeout Ar total-transmission-timeout Set the total transmission timeout, in seconds. .Pp .It Cm trace Toggle packet tracing. .Pp .It Cm verbose Toggle verbose mode. .Pp .It Cm windowsize Op Ar size Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to .Op Ar size blocks as specified in RFC 7440. Valid values are between 1 and 65535. If no windowsize is specified, then the default windowsize of 1 block will be used. .El .Sh SEE ALSO .Xr tftpd 8 .Pp The following RFC's are supported: .Rs .%T RFC 1350: The TFTP Protocol (Revision 2) .Re .Rs .%T RFC 2347: TFTP Option Extension .Re .Rs .%T RFC 2348: TFTP Blocksize Option .Re .Rs .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options .Re .Rs .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) .Re .Rs .%T RFC 7440: TFTP Windowsize Option .Re .Pp The non-standard .Cm rollover and .Cm blksize2 TFTP options are mentioned here: .Rs .%T Extending TFTP .%U http://www.compuphase.com/tftp.htm .Re .Sh HISTORY The .Nm command appeared in .Bx 4.3 . .Pp Edwin Groothuis performed a major rewrite of the .Xr tftpd 8 and .Nm code to support RFC2348. .Sh NOTES Because there is no user-login or validation within the .Tn TFTP protocol, the remote site will probably have some sort of file-access restrictions in place. The exact methods are specific to each site and therefore difficult to document here. .Pp Files larger than 33488896 octets (65535 blocks) cannot be transferred without client and server supporting the TFTP blocksize option (RFC2348), or the non-standard TFTP rollover option. Index: stable/12/usr.sbin/ctladm/ctladm.8 =================================================================== --- stable/12/usr.sbin/ctladm/ctladm.8 (revision 368379) +++ stable/12/usr.sbin/ctladm/ctladm.8 (revision 368380) @@ -1,1088 +1,1103 @@ .\" .\" Copyright (c) 2003 Silicon Graphics International Corp. .\" Copyright (c) 2015-2020 Alexander Motin .\" Copyright (c) 2018 Marcelo Araujo .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions, and the following disclaimer, .\" without modification. .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer .\" substantially similar to the "NO WARRANTY" disclaimer below .\" ("Disclaimer") and any redistribution must be conditioned upon .\" including a substantially similar Disclaimer requirement for further .\" binary redistribution. .\" .\" NO WARRANTY .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGES. .\" .\" ctladm utility man page. .\" .\" Author: Ken Merry .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" .Dd August 6, 2020 .Dt CTLADM 8 .Os .Sh NAME .Nm ctladm .Nd CAM Target Layer control utility .Sh SYNOPSIS .Nm .Aq Ar command .Op lun .Op generic args .Op command args .Nm .Ic tur .Aq lun .Op general options .Nm .Ic inquiry .Aq lun .Op general options .Nm .Ic reqsense .Aq lun .Op general options .Nm .Ic reportluns .Aq lun .Op general options .Nm .Ic read .Aq lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen .Aq Fl f Ar file|- .Aq Fl b Ar blocksize_bytes .Op Fl c Ar cdbsize .Op Fl N .Nm .Ic write .Aq lun .Op general options .Aq Fl l Ar lba .Aq Fl d Ar datalen .Aq Fl f Ar file|- .Aq Fl b Ar blocksize_bytes .Op Fl c Ar cdbsize .Op Fl N .Nm .Ic readcap .Aq lun .Op general options .Op Fl c Ar cdbsize .Nm .Ic modesense .Aq lun .Aq Fl m Ar page | Fl l .Op Fl P Ar pc .Op Fl d .Op Fl S Ar subpage .Op Fl c Ar size .Nm .Ic start .Aq lun .Op general options .Op Fl i .Op Fl o .Nm .Ic stop .Aq lun .Op general options .Op Fl i .Op Fl o .Nm .Ic synccache .Aq lun .Op general options .Op Fl l Ar lba .Op Fl b Ar blockcount .Op Fl r .Op Fl i .Op Fl c Ar cdbsize .Nm .Ic lunlist .Nm .Ic delay .Aq lun .Aq Fl l Ar datamove|done .Aq Fl t Ar secs .Op Fl T Ar oneshot|cont .Nm .Ic inject .Aq Fl i Ar action .Aq Fl p Ar pattern .Op Fl r Ar lba,len .Op Fl s Ar len fmt Op Ar args .Op Fl c .Op Fl d Ar delete_id .Nm .Ic create .Aq Fl b Ar backend .Op Fl B Ar blocksize .Op Fl d Ar device_id .Op Fl l Ar lun_id .Op Fl o Ar name=value .Op Fl s Ar size_bytes .Op Fl S Ar serial_num .Op Fl t Ar device_type .Nm .Ic remove .Aq Fl b Ar backend .Aq Fl l Ar lun_id .Op Fl o Ar name=value .Nm .Ic modify .Aq Fl b Ar backend .Aq Fl l Ar lun_id .Op Fl o Ar name=value .Aq Fl s Ar size_bytes .Nm .Ic devlist .Op Fl b Ar backend .Op Fl v .Op Fl x .Nm .Ic port .Op Fl c .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn .Op Fl O Ar pp|vp .Op Fl p Ar targ_port .Op Fl r Ar targ_port .Op Fl t Ar fe_type .Nm .Ic portlist .Op Fl f Ar frontend .Op Fl i .Op Fl l .Op Fl p Ar targ_port .Op Fl q .Op Fl v .Op Fl x .Nm .Ic lunmap .Aq Fl p Ar targ_port .Op Fl l Ar pLUN .Op Fl L Ar cLUN .Nm .Ic dumpooa .Nm .Ic dumpstructs .Nm .Ic islist .Op Fl v .Op Fl x .Nm .Ic islogout .Aq Fl a | Fl c Ar connection-id | Fl i Ar name | Fl p Ar portal .Nm .Ic isterminate .Aq Fl a | Fl c Ar connection-id | Fl i Ar name | Fl p Ar portal .Nm .Ic help .Sh DESCRIPTION The .Nm utility is designed to provide a way to access and control the CAM Target Layer (CTL). It provides a way to send .Tn SCSI commands to the CTL layer, and also provides some meta-commands that utilize .Tn SCSI commands. (For instance, the .Ic lunlist command is implemented using the .Tn SCSI REPORT LUNS and INQUIRY commands.) .Pp The .Nm utility has a number of primary functions, many of which require a device identifier. The device identifier takes the following form: .Bl -tag -width 14n .It lun Specify the LUN number to operate on. .El Many of the primary functions of the .Nm utility take the following optional arguments: .Bl -tag -width 10n .It Fl C Ar retries Specify the number of times to retry a command in the event of failure. .It Fl D Ar device -Specify the device to open. This allows opening a device other than the -default device, +Specify the device to open. +This allows opening a device other than the default device, .Pa /dev/cam/ctl , to be opened for sending commands. .It Fl I Ar id Specify the initiator number to use. By default, .Nm will use 7 as the initiator number. .El .Pp Primary commands: .Bl -tag -width 11n .It Ic tur Send the .Tn SCSI TEST UNIT READY command to the device and report whether or not it is ready. .It Ic inquiry Send the .Tn SCSI INQUIRY command to the device and display some of the returned inquiry data. .It Ic reqsense Send the .Tn SCSI REQUEST SENSE command to the device and display the returned sense information. .It Ic reportluns Send the .Tn SCSI REPORT LUNS command to the device and display supported LUNs. .It Ic read Send a .Tn SCSI READ command to the device, and write the requested data to a file or stdout. .Bl -tag -width 12n .It Fl l Ar lba -Specify the starting Logical Block Address for the READ. This can be -specified in decimal, octal (starting with 0), hexadecimal (starting with -0x) or any other base supported by +Specify the starting Logical Block Address for the READ. +This can be specified in decimal, octal (starting with 0), +hexadecimal (starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar datalen Specify the length, in 512 byte blocks, of the READ request. .It Fl f Ar file -Specify the destination for the data read by the READ command. Either a -filename or +Specify the destination for the data read by the READ command. +Either a filename or .Sq - for stdout may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI -CDB (Command Data Block) size to be used for the READ request. Allowable -values are 6, 10, 12 and 16. Depending upon the LBA and amount of data -requested, a larger CDB size may be used to satisfy the request. (e.g., -for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) +CDB (Command Data Block) size to be used for the READ request. +Allowable values are 6, 10, 12 and 16. +Depending upon the LBA and amount of data requested, a larger CDB +size may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, +READ(16) must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length -can be calculated accurately. The blocksize can be obtained via the +can be calculated accurately. +The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N Do not copy data to .Nm from the kernel when doing a read, just execute the command without copying data. This is to be used for performance testing. .El .It Ic write Read data from a file or stdin, and write the data to the device using the .Tn SCSI WRITE command. .Bl -tag -width 12n .It Fl l Ar lba -Specify the starting Logical Block Address for the WRITE. This can be -specified in decimal, octal (starting with 0), hexadecimal (starting with -0x) or any other base supported by +Specify the starting Logical Block Address for the WRITE. +This can be specified in decimal, octal (starting with 0), hexadecimal +(starting with 0x) or any other base supported by .Xr strtoull 3 . .It Fl d Ar atalen Specify the length, in 512 byte blocks, of the WRITE request. .It Fl f Ar file -Specify the source for the data to be written by the WRITE command. Either a -filename or +Specify the source for the data to be written by the WRITE command. +Either a filename or .Sq - for stdin may be specified. .It Fl c Ar cdbsize Specify the minimum .Tn SCSI -CDB (Command Data Block) size to be used for the READ request. Allowable -values are 6, 10, 12 and 16. Depending upon the LBA and amount of data -requested, a larger CDB size may be used to satisfy the request. (e.g., -for LBAs above 0xffffffff, READ(16) must be used to satisfy the request.) +CDB (Command Data Block) size to be used for the READ request. +Allowable values are 6, 10, 12 and 16. +Depending upon the LBA and amount of data requested, a larger CDB size +may be used to satisfy the request. (e.g., for LBAs above 0xffffffff, READ(16) +must be used to satisfy the request.) .It Fl b Ar blocksize Specify the blocksize of the underlying .Tn SCSI device, so the transfer length -can be calculated accurately. The blocksize can be obtained via the +can be calculated accurately. +The blocksize can be obtained via the .Tn SCSI READ CAPACITY command. .It Fl N Do not copy data to .Nm to the kernel when doing a write, just execute the command without copying data. This is to be used for performance testing. .El .It Ic readcap Send the .Tn SCSI READ CAPACITY command to the device and display the device size and device -block size. By default, READ CAPACITY(10) is -used. If the device returns a maximum LBA of 0xffffffff, however, +block size. +By default, READ CAPACITY(10) is used. +If the device returns a maximum LBA of 0xffffffff, however, .Nm will automatically issue a READ CAPACITY(16), which is implemented as a -service action of the SERVICE ACTION IN(16) opcode. The user can specify -the minimum CDB size with the +service action of the SERVICE ACTION IN(16) opcode. +The user can specify the minimum CDB size with the .Fl c -argument. Valid values for the +argument. +Valid values for the .Fl c -option are 10 and 16. If a 10 byte CDB is specified, the request will be -automatically reissued with a 16 byte CDB if the maximum LBA returned is -0xffffffff. +option are 10 and 16. +If a 10 byte CDB is specified, the request will be automatically reissued +with a 16 byte CDB if the maximum LBA returned is 0xffffffff. .It Ic modesense Send a .Tn SCSI MODE SENSE command to the device, and display the requested mode page(s) or page list. .Bl -tag -width 10n .It Fl m Ar page -Specify the mode page to display. This option and the +Specify the mode page to display. +This option and the .Fl l -option are mutually exclusive. One of the two must be specified, though. +option are mutually exclusive. +One of the two must be specified, though. Mode page numbers may be specified in decimal or hexadecimal. .It Fl l Request that the list of mode pages supported by the device be returned. This option and the .Fl m -option are mutually exclusive. One of the two must be specified, though. +option are mutually exclusive. +One of the two must be specified, though. .It Fl P Ar pc -Specify the mode page control value. Possible values are: +Specify the mode page control value. +Possible values are: .Bl -tag -width 2n -compact .It 0 Current values. .It 1 Changeable value bitmask. .It 2 Default values. .It 3 Saved values. .El .It Fl d Disable block descriptors when sending the mode sense request. .It Fl S Ar subpage Specify the subpage used with the mode sense request. .It Fl c Ar cdbsize -Specify the CDB size used for the mode sense request. Supported values are -6 and 10. +Specify the CDB size used for the mode sense request. +Supported values are 6 and 10. .El .It Ic start Send the .Tn SCSI START STOP UNIT command to the specified LUN with the start bit set. .Bl -tag -width 4n .It Fl i -Set the immediate bit in the CDB. Note that CTL does not support the -immediate bit, so this is primarily useful for making sure that CTL returns -the proper error. +Set the immediate bit in the CDB. +Note that CTL does not support the immediate bit, so this is primarily +useful for making sure that CTL returns the proper error. .El .It Ic stop Send the .Tn SCSI START STOP UNIT command to the specified LUN with the start -bit cleared. We use an ordered tag to stop the LUN, so we can guarantee -that all pending I/O executes before it is stopped. (CTL guarantees this -anyway, but +bit cleared. +We use an ordered tag to stop the LUN, so we can guarantee that all pending +I/O executes before it is stopped. +(CTL guarantees this anyway, but .Nm sends an ordered tag for completeness.) .Bl -tag -width 4n .It Fl i -Set the immediate bit in the CDB. Note that CTL does not support the -immediate bit, so this is primarily useful for making sure that CTL returns -the proper error. +Set the immediate bit in the CDB. +Note that CTL does not support the immediate bit, so this is primarily +useful for making sure that CTL returns the proper error. .El .It Ic synccache Send the .Tn SCSI -SYNCHRONIZE CACHE command to the device. By default, SYNCHRONIZE -CACHE(10) is used. If the specified starting LBA is greater than -0xffffffff or the length is greater than 0xffff, though, -SYNCHRONIZE CACHE(16) will be used. The 16 byte command will also be used -if the user specifies a 16 byte CDB with the +SYNCHRONIZE CACHE command to the device. +By default, SYNCHRONIZE CACHE(10) is used. +If the specified starting LBA is greater than 0xffffffff or the length is +greater than 0xffff, though, SYNCHRONIZE CACHE(16) will be used. +The 16 byte command will also be used if the user specifies a 16 byte CDB with the .Fl c argument. .Bl -tag -width 14n .It Fl l Ar lba -Specify the starting LBA of the cache region to synchronize. This option is a -no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the -cache for the entire LUN. +Specify the starting LBA of the cache region to synchronize. +This option is a no-op for CTL. +If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl b Ar blockcount -Specify the length of the cache region to synchronize. This option is a -no-op for CTL. If you send a SYNCHRONIZE CACHE command, it will sync the -cache for the entire LUN. +Specify the length of the cache region to synchronize. +This option is a no-op for CTL. +If you send a SYNCHRONIZE CACHE command, it will sync the cache for the entire LUN. .It Fl r -Specify relative addressing for the starting LBA. CTL does not support -relative addressing, since it only works for linked commands, and CTL -does not support linked commands. +Specify relative addressing for the starting LBA. +CTL does not support relative addressing, since it only works for linked commands, +and CTL does not support linked commands. .It Fl i Tell the target to return status immediately after issuing the SYNCHRONIZE CACHE -command rather than waiting for the cache to finish syncing. CTL does not -support this bit. +command rather than waiting for the cache to finish syncing. +CTL does not support this bit. .It Fl c Ar cdbsize -Specify the minimum CDB size. Valid values are 10 and 16 bytes. +Specify the minimum CDB size. +Valid values are 10 and 16 bytes. .El .It Ic lunlist List all LUNs registered with CTL. Because this command uses the ioctl port, it will only work when the FETDs (Front End Target Drivers) are enabled. This command is the equivalent of doing a REPORT LUNS on one LUN and then an INQUIRY on each LUN in the system. .It Ic delay -Delay commands at the given location. There are two places where commands -may be delayed currently: before data is transferred +Delay commands at the given location. +There are two places where commands may be delayed currently: before data is transferred .Pq Dq datamove and just prior to sending status to the host .Pq Dq done . One of the two must be supplied as an argument to the .Fl l -option. The +option. +The .Fl t option must also be specified. .Bl -tag -width 12n .It Fl l Ar delayloc Delay command(s) at the specified location. This can either be at the data movement stage (datamove) or prior to command completion (done). .It Fl t Ar delaytime -Delay command(s) for the specified number of seconds. This must be -specified. If set to 0, it will clear out any previously set delay for -this particular location (datamove or done). +Delay command(s) for the specified number of seconds. +This must be specified. +If set to 0, it will clear out any previously set delay for this particular +location (datamove or done). .It Fl T Ar delaytype Specify the delay type. By default, the .Ic delay option will delay the next command sent to the given LUN. With the .Fl T Ar cont option, every command will be delayed by the specified period of time. With the .Fl T Ar oneshot the next command sent to the given LUN will be delayed and all subsequent commands will be completed normally. This is the default. .El .It Ic inject Inject the specified type of error for the LUN specified, when a command that matches the given pattern is seen. The sense data returned is in either fixed or descriptor format, depending upon the status of the D_SENSE bit in the control mode page (page 0xa) for the LUN. .Pp Errors are only injected for commands that have not already failed for other reasons. By default, only the first command matching the pattern specified is returned with the supplied error. .Pp If the .Fl c flag is specified, all commands matching the pattern will be returned with the specified error until the error injection command is deleted with .Fl d flag. .Bl -tag -width 17n .It Fl i Ar action Specify the error to return: .Bl -tag -width 10n .It aborted Return the next matching command on the specified LUN with the sense key ABORTED COMMAND (0x0b), and the ASC/ASCQ 0x45,0x00 ("Select or reselect failure"). .It mediumerr Return the next matching command on the specified LUN with the sense key MEDIUM ERROR (0x03) and the ASC/ASCQ 0x11,0x00 ("Unrecovered read error") for reads, or ASC/ASCQ 0x0c,0x02 ("Write error - auto reallocation failed") for write errors. .It ua Return the next matching command on the specified LUN with the sense key UNIT ATTENTION (0x06) and the ASC/ASCQ 0x29,0x00 ("POWER ON, RESET, OR BUS DEVICE RESET OCCURRED"). .It custom Return the next matching command on the specified LUN with the supplied sense data. The .Fl s argument must be specified. .El .It Fl p Ar pattern Specify which commands should be returned with the given error. .Bl -tag -width 10n .It read The error should apply to READ(6), READ(10), READ(12), READ(16), etc. .It write The error should apply to WRITE(6), WRITE(10), WRITE(12), WRITE(16), WRITE AND VERIFY(10), etc. .It rw The error should apply to both read and write type commands. .It readcap The error should apply to READ CAPACITY(10) and READ CAPACITY(16) commands. .It tur The error should apply to TEST UNIT READY commands. .It any The error should apply to any command. .El .It Fl r Ar lba,len Specify the starting lba and length of the range of LBAs which should trigger an error. This option is only applies when read and/or write patterns are specified. If used with other command types, the error will never be triggered. .It Fl s Ar len fmt Op Ar args Specify the sense data that is to be returned for custom actions. If the format is .Sq - , len bytes of sense data will be read from standard input and written to the sense buffer. If len is longer than 252 bytes (the maximum allowable .Tn SCSI sense data length), it will be truncated to that length. The sense data format is described in .Xr cam_cdbparse 3 . .It Fl c The error injection should be persistent, instead of happening once. Persistent errors must be deleted with the .Fl d argument. .It Fl d Ar delete_id Delete the specified error injection serial number. The serial number is returned when the error is injected. .El .It Ic port Perform one of several CTL frontend port operations. Either get a list of frontend ports .Pq Fl l , turn one or more frontends on or off .Pq Fl o Ar on|off , or set the World Wide Node Name .Pq Fl w Ar wwnn or World Wide Port Name .Pq Fl W Ar wwpn for a given port. One of .Fl l , .Fl o , or .Fl w or .Fl W must be specified. The WWNN and WWPN may both be specified at the same time, but cannot be combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl c Create new frontend port using free pp and vp=0. .It Fl o Ar on|off Turn the specified CTL frontend ports on or off. If no port number or port type is specified, all ports are turned on or off. .It Fl O Ar pp|vp Specify generic options on the ioctl frontend port. At present, only pp and vp port numbers can be set. .It Fl p Ar targ_port Specify the frontend port number. The port numbers can be found in the frontend port list. .It Fl r Remove port specified with .Pq Fl p Ar targ_port . .It Fl t Ar fe_type Specify the frontend type. Currently defined port types are .Dq fc (Fibre Channel), .Dq scsi (Parallel SCSI), .Dq ioctl (CTL ioctl interface), and .Dq internal (CTL CAM SIM). .It Fl w Ar wwnn Set the World Wide Node Name for the given port. The .Fl n argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWNN should be the same across all ports on the system. .It Fl W Ar wwpn Set the World Wide Port Name for the given port. The .Fl n argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWPN must be different for every port in the system. .El .It Ic portlist List CTL frontend ports. .Bl -tag -width 12n .It Fl f Ar frontend Specify the frontend type. .It Fl i Report target and connected initiators addresses. .It Fl l Report LUN mapping. .It Fl p Ar targ_port Specify the frontend port number. .It Fl q Omit the header in the port list output. .It Fl v Enable verbose output (report all port options). .It Fl x Output the port list in XML format. .El .It Ic lunmap Change LUN mapping for specified port. If both .Ar pLUN and .Ar cLUN are specified -- LUN will be mapped. If .Ar pLUN is specified, but .Ar cLUN is not -- LUN will be unmapped. If neither .Ar pLUN nor .Ar cLUN are specified -- LUN mapping will be disabled, exposing all CTL LUNs. .Bl -tag -width 12n .It Fl p Ar targ_port Specify the frontend port number. .It Fl l Ar pLUN LUN number visible by specified port. .It Fl L Ar cLUN CTL LUN number. .El .It Ic dumpooa Dump the OOA (Order Of Arrival) queue for each LUN registered with CTL. .It Ic dumpstructs Dump the CTL structures to the console. .It Ic create Create a new LUN. The backend must be specified, and depending upon the backend requested, some of the other options may be required. If the LUN is created successfully, the LUN configuration will be displayed. If LUN creation fails, a message will be displayed describing the failure. .Bl -tag -width 14n .It Fl b Ar backend The .Fl b flag is required. This specifies the name backend to use when creating the LUN. Examples are .Dq ramdisk and .Dq block . .It Fl B Ar blocksize Specify the blocksize of the backend in bytes. .It Fl d Ar device_id Specify the LUN-associated string to use in the .Tn SCSI INQUIRY VPD page 0x83 data. .It Fl l Ar lun_id Request that a particular LUN number be assigned. If the requested LUN number is not available, the request will fail. .It Fl o Ar name=value Specify a backend-specific name/value pair. Multiple .Fl o arguments may be specified. Refer to the backend documentation for arguments that may be used. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. Some backends may allow setting the size (e.g. the ramdisk backend) and for others the size may be implicit (e.g. the block backend). .It Fl S Ar serial_num Specify the serial number to be used in the .Tn SCSI INQUIRY VPD page 0x80 data. .It Fl t Ar device_type Specify the numeric SCSI device type to use when creating the LUN. If this flag is not used, the type of LUN created is backend-specific. Not all LUN types are supported. Currently CTL supports Direct Access (type 0), Processor (type 3) and CD/DVD (type 5) LUNs. The backend requested may or may not support all of the LUN types that CTL supports. .El .It Ic remove Remove a LUN. The backend must be specified, and the LUN number must also be specified. Backend-specific options may also be specified with the .Fl o flag. .Bl -tag -width 14n .It Fl b Ar backend Specify the backend that owns the LUN to be removed. Examples are .Dq ramdisk and .Dq block . .It Fl l Ar lun_id Specify the LUN number to remove. .It Fl o Ar name=value Specify a backend-specific name/value pair. Multiple .Fl o arguments may be specified. Refer to the backend documentation for arguments that may be used. .El .It Ic modify Modify a LUN size. The backend, the LUN number, and the size must be specified. .Bl -tag -width 14n .It Fl b Ar backend Specify the backend that owns the LUN to be modified. Examples are .Dq ramdisk and .Dq block . .It Fl l Ar lun_id Specify the LUN number to modify. .It Fl o Ar name=value Specify a backend-specific name/value pair. Multiple .Fl o arguments may be specified. Refer to the backend documentation for arguments that may be used. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. For the .Dq block backend, an .Dq auto keyword may be passed instead; this will make CTL use the size of backing file or device. .El .It Ic devlist Get a list of all configured LUNs. This also includes the LUN size and blocksize, serial number and device ID. .Bl -tag -width 11n .It Fl b Ar backend Specify the backend. This restricts the LUN list to the named backend. Examples are .Dq ramdisk and .Dq block . .It Fl v Be verbose. This will also display any backend-specific LUN attributes in addition to the standard per-LUN information. .It Fl x Dump the raw XML. The LUN list information from the kernel comes in XML format, and this option allows the display of the raw XML data. This option and the .Fl v and .Fl b options are mutually exclusive. If you specify .Fl x , the entire LUN database is displayed in XML format. .El .It Ic islist Get a list of currently running iSCSI sessions. This includes initiator and target names and the unique connection IDs. .Bl -tag -width 11n .It Fl v Verbose mode. .It Fl x Dump the raw XML. The sessions list information from the kernel comes in XML format, and this option allows the display of the raw XML data. .El .It Ic islogout Ask the initiator to log out iSCSI sessions matching criteria. .Bl -tag -width 11n .It Fl a Log out all sessions. .It Fl c Specify connection ID. .It Fl i Specify initiator name. .It Fl p Specify initiator portal (hostname or IP address). .El .It Ic isterminate Forcibly terminate iSCSI sessions matching criteria. .Bl -tag -width 11n .It Fl a Terminate all sessions. .It Fl c Specify connection ID. .It Fl i Specify initiator name. .It Fl p Specify initiator portal (hostname or IP address). .El .It Ic help Display .Nm usage information. .El .Sh OPTIONS Number of additional configuration options may be specified for LUNs. Some options are global, others are backend-specific. .Pp Global options: .Bl -tag -width 12n .It Va vendor Specifies LUN vendor string up to 8 chars. .It Va product Specifies LUN product string up to 16 chars. .It Va revision Specifies LUN revision string up to 4 chars. .It Va scsiname Specifies LUN SCSI name string. .It Va eui Specifies LUN EUI-64 identifier. .It Va naa Specifies LUN NAA identifier. .It Va uuid Specifies LUN locally assigned RFC 4122 UUID identifier. EUI, NAA or UUID identifier should be set to UNIQUE value to allow EXTENDED COPY command access the LUN. Non-unique LUN identifiers may lead to data corruption. Some initiators may not support later introduced UUID identifiers. .It Va ident_info Specified LUN identification information (string or 0x + hex). .It Va text_ident_info Specified LUN text identification information (UTF-8 string). .It Va ha_role Setting to "primary" or "secondary" overrides default role of the node in HA cluster, set by kern.cam.ctl.ha_role sysctl. .It Va insecure_tpc Setting to "on" allows EXTENDED COPY command sent to this LUN access other LUNs on this host, not accessible otherwise. This allows to offload copying between different iSCSI targets residing on the same host in trusted environments. .It Va readcache Set to "off", disables read caching for the LUN, if supported by the backend. .It Va readonly Set to "on", blocks all media write operations to the LUN, reporting it as write protected. .It Va removable Set to "on", makes LUN removable. .It Va reordering Set to "unrestricted", allows target to process commands with SIMPLE task -attribute in arbitrary order. Any data integrity exposures related to -command sequence order shall be explicitly handled by the application -client through the selection of appropriate commands and task attributes. -The default value is "restricted". It improves data integrity, but may -introduce some additional delays. +attribute in arbitrary order. +Any data integrity exposures related to command sequence order shall be +explicitly handled by the application client through the selection of +appropriate commands and task attributes. +The default value is "restricted". +It improves data integrity, but may introduce some additional delays. .It Va serseq Set to "on" to serialize consecutive reads/writes. Set to "read" to serialize consecutive reads. Set to "off" to allow them be issued in parallel. Parallel issue of consecutive operations may confuse logic of the backing file system, hurting performance; but it may improve performance of backing stores without prefetch/write-back. .It Va pblocksize .It Va pblockoffset Specify physical block size and offset of the device. .It Va ublocksize .It Va ublockoffset Specify UNMAP block size and offset of the device. .It Va rpm Specifies medium rotation rate of the device: 0 -- not reported, 1 -- non-rotating (SSD), >1024 -- value in revolutions per minute. .It Va formfactor Specifies nominal form factor of the device: 0 -- not reported, 1 -- 5.25", 2 -- 3.5", 3 -- 2.5", 4 -- 1.8", 5 -- less then 1.8". .It Va temperature .It Va reftemperature Specify current and reference (maximum) temperatures of the device. .It Va provisioning_type When UNMAP support is enabled, this option specifies provisioning type: "resource", "thin" or "unknown". Default value is "thin". Logical units without UNMAP support are reported as fully provisioned. .It Va unmap Setting to "on" or "off" controls UNMAP support for the logical unit. Default value is "on" if supported by the backend. .It Va unmap_max_lba .It Va unmap_max_descr Specify maximum allowed number of LBAs and block descriptors per UNMAP command to report in Block Limits VPD page. .It Va write_same_max_lba Specify maximum allowed number of LBAs per WRITE SAME command to report in Block Limits VPD page. .It Va avail-threshold .It Va used-threshold .It Va pool-avail-threshold .It Va pool-used-threshold Set per-LUN/-pool thin provisioning soft thresholds. LUN will establish UNIT ATTENTION condition if its or pool available space get below configured avail values, or its or pool used space get above configured used values. Pool thresholds are working only for ZVOL-backed LUNs. .It Va writecache Set to "off", disables write caching for the LUN, if supported by the backend. .El .Pp Options specific for block backend: .Bl -tag -width 12n .It Va file Specifies file or device name to use for backing store. .It Va num_threads Specifies number of backend threads to use for this LUN. .El .Pp Options specific for ramdisk backend: .Bl -tag -width 12n .It Va capacity Specifies capacity of backing store (maximum RAM for data). The default value is zero, that disables backing store completely, making all writes go to nowhere, while all reads return zeroes. .El .Sh EXAMPLES .Pp Send a .Tn SCSI TEST UNIT READY command to LUN 1. .Pp .Dl ctladm tur 1 .Pp Display the list of mode pages supported by LUN 1. .Pp .Dl ctladm modesense 1 -l .Pp Display the saved version of the Control mode page (page 10) on LUN 0. Disable fetching block descriptors, and use a 10 byte MODE SENSE command instead of the default 6 byte command. .Pp .Dl ctladm modesense 0 -m 10 -P 3 -d -c 10 .Pp Read the first 512 byte block from LUN 2 and dump it to the file .Bd -literal .Dl ctladm read 2 -l 0 -d 1 -b 512 -f - > foo .Ed .Pp Read 10240 bytes from the file .Pa /tmp/bar and write it to LUN 3. starting at LBA 0xff432140. .Pp .Bd -literal .Dl ctladm write 3 -l 0xff432140 -d 20 -b 512 -f /tmp/bar .Ed .Pp Create a LUN with the .Dq fake ramdisk as a backing store. The LUN will claim to have a size of approximately 10 terabytes, while having no real data store (all written data are lost). .Pp .Dl ctladm create -b ramdisk -s 10485760000000000 .Pp Create a thin provisioned LUN with a ramdisk as a backing store. The LUN will have maximal backing store capacity of 10 gigabytes, while reporting size of 10 terabytes, .Pp .Dl ctladm create -b ramdisk -s 10T -o capacity=10G .Pp Create a LUN using the block backend, and specify the file .Pa src/usr.sbin/ctladm/ctladm.8 as the backing store. The size of the LUN will be derived from the size of the file. .Pp .Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 .Pp Create a LUN using the block backend, specify the file .Pa src/usr.sbin/ctladm/ctladm.8 as the backing store, and specify the .Tn SCSI VPD page 0x80 and 0x83 serial number .Fl ( S ) and device ID .Fl ( d ) . .Pp .Dl ctladm create -b block -o file=src/usr.sbin/ctladm/ctladm.8 -S MYSERIAL321 -d MYDEVID123 .Pp Use to specify generic options on ioctl frontend port, now it is only possible to set pp and/or vp port number. .Pp .Dl ctladm port -c -O pp=11 -O vp=12 .Pp Remove specified targ_port. .Pp .Dl ctladm port -r -p 4 .Pp .Pp Remove LUN 12, which is handled by the block backend, from the system. .Pp .Dl ctladm remove -b block -l 12 .Pp List configured LUNs in the system, along with their backend and serial number. This works when the Front End Target Drivers are enabled or disabled. .Pp .Dl ctladm devlist .Pp List all LUNs in the system, along with their inquiry data and device type. This only works when the FETDs are enabled, since the commands go through the ioctl port. .Pp .Dl ctladm lunlist .Pp Inject a medium error on LUN 6 for every read that covers the first 512 blocks of the LUN. .Pp .Dl ctladm inject 6 -i mediumerr -p read -r 0,512 -c .Pp Inject a custom error on LUN 6 for the next TEST UNIT READY command only. This will result in a sense key of NOT READY (0x02), and an ASC/ASCQ of 0x04,0x02 ("Logical unit not ready, initializing command required"). .Pp .Bd -literal -offset indent ctladm inject 6 -i custom -p tur -s 18 "f0 0 02 s12 04 02" .Ed .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , .Xr cam 4 , .Xr ctl 4 , .Xr xpt 4 , .Xr camcontrol 8 , .Xr ctld 8 , .Xr ctlstat 8 .Sh HISTORY The .Nm utility was originally written during the Winter/Spring of 2003 as an interface to CTL. .Sh AUTHORS .An Ken Merry Aq Mt ken@FreeBSD.org Index: stable/12/usr.sbin/extattrctl/extattrctl.8 =================================================================== --- stable/12/usr.sbin/extattrctl/extattrctl.8 (revision 368379) +++ stable/12/usr.sbin/extattrctl/extattrctl.8 (revision 368380) @@ -1,181 +1,181 @@ .\"- .\" Copyright (c) 2000-2001 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed by Robert Watson for the TrustedBSD Project. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .\" Developed by the TrustedBSD Project. .\" Support for file system extended attribute. .\" .Dd March 30, 2000 .Dt EXTATTRCTL 8 .Os .Sh NAME .Nm extattrctl .Nd manage UFS1 extended attributes .Sh SYNOPSIS .Nm .Cm start .Ar path .Nm .Cm stop .Ar path .Nm .Cm initattr .Op Fl f .Op Fl p Ar path .Ar attrsize .Ar attrfile .Nm .Cm showattr .Ar attrfile .Nm .Cm enable .Ar path .Ar attrnamespace .Ar attrname .Ar attrfile .Nm .Cm disable .Ar path .Ar attrnamespace .Ar attrname .Sh DESCRIPTION The .Nm utility is the management utility for extended attributes over the UFS1 file system. It allows the starting and stopping of extended attributes on a file system, as well as initialization of attribute backing files, and enabling and disabling of specific extended attributes on a file system. .Pp The first argument on the command line indicates the operation to be performed. Operation must be one of the following: .Bl -tag -width indent .It Cm start Ar path Start extended attribute support on the file system named using .Ar path . The file system must be an UFS1 file system, and the UFS_EXTATTR kernel option must have been enabled. .It Cm stop Ar path Stop extended attribute support on the file system named using .Ar path . Extended attribute support must previously have been started. .It Xo .Cm initattr .Op Fl f .Op Fl p Ar path .Ar attrsize attrfile .Xc Create and initialize a file to use as an attribute backing file. You must specify a maximum per-inode size for the attribute in bytes in .Ar attrsize , as well as the file where the attribute will be stored, using .Ar attrfile . .Pp The .Fl f argument may be used to indicate that it is alright to overwrite an existing attribute backing file; otherwise, if the target file exists, an error will be returned. .Pp The .Fl p Ar path argument may be used to preallocate space for all attributes rather than relying on sparse files to conserve space. This has the advantage of guaranteeing that space will be available for attributes when they are written, preventing low disk space conditions from denying attribute service. .Pp This file should not exist before running .Cm initattr . .It Cm showattr Ar attrfile Show the attribute header values in the attribute file named by .Ar attrfile . .It Cm enable Ar path attrnamespace attrname attrfile Enable an attribute named .Ar attrname in the namespace .Ar attrnamespace on the file system identified using .Ar path , and backed by initialized attribute file .Ar attrfile . Available namespaces are "user" and "system". The backing file must have been initialized using .Cm initattr before its first use. Attributes must have been started on the file system prior to the enabling of any attributes. .It Cm disable Ar path attrnamespace attrname Disable the attributed named .Ar attrname in namespace .Ar attrnamespace on the file system identified by .Ar path . Available namespaces are "user" and "system". The file system must have attributes started on it, and the attribute most have been enabled using .Cm enable . .El .Sh EXAMPLES .Dl extattrctl start / .Pp Start extended attributes on the root file system. .Pp .Dl extattrctl initattr 17 /.attribute/system/md5 .Pp Create an attribute backing file in /.attribute/system/md5, and set the maximum size of each attribute to 17 bytes, with a sparse file used for storing the attributes. .Pp .Dl extattrctl enable / system md5 /.attribute/system/md5 .Pp Enable an attribute named md5 on the root file system, backed from the file /.attribute/system/md5. .Pp .Dl extattrctl disable / md5 .Pp Disable the attribute named md5 on the root file system. .Pp .Dl extattrctl stop / .Pp Stop extended attributes on the root file system. .Sh SEE ALSO .Xr ffs 7 , .Xr getextattr 8 , .Xr setextattr 8 , .Xr extattr 9 .Sh HISTORY Extended attribute support was developed as part of the TrustedBSD Project, and introduced in .Fx 5.0 . It was developed to support security extensions requiring additional labels to be associated with each file or directory. .Sh AUTHORS -Robert N M Watson +.An Robert N M Watson Index: stable/12/usr.sbin/i2c/i2c.8 =================================================================== --- stable/12/usr.sbin/i2c/i2c.8 (revision 368379) +++ stable/12/usr.sbin/i2c/i2c.8 (revision 368380) @@ -1,193 +1,194 @@ .\" .\" Copyright (C) 2008-2009 Semihalf, Michal Hajduk and Bartlomiej Sieka .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 22, 2019 .Dt I2C 8 .Os .Sh NAME .Nm i2c .Nd test I2C bus and slave devices .Sh SYNOPSIS .Nm .Cm -a Ar address .Op Fl f Ar device .Op Fl d Ar r|w .Op Fl w Ar 0|8|16 .Op Fl o Ar offset .Op Fl c Ar count .Op Fl m Ar tr|ss|rs|no .Op Fl b .Op Fl v .Nm .Cm -s .Op Fl f Ar device .Op Fl n Ar skip_addr .Op Fl v .Nm .Cm -r .Op Fl f Ar device .Op Fl v .Sh DESCRIPTION The .Nm utility can be used to perform raw data transfers (read or write) with devices -on the I2C bus. It can also scan the bus for available devices and reset the -I2C controller. +on the I2C bus. +It can also scan the bus for available devices and reset the I2C controller. .Pp The options are as follows: .Bl -tag -width ".Fl d Ar direction" .It Fl a Ar address 7-bit address on the I2C device to operate on (hex). .It Fl b binary mode - when performing a read operation, the data read from the device is output in binary format on stdout; when doing a write, the binary data to be written to the device is read from stdin. .It Fl c Ar count number of bytes to transfer (dec). .It Fl d Ar r|w transfer direction: r - read, w - write. .It Fl f Ar device I2C bus to use (default is /dev/iic0). .It Fl m Ar tr|ss|rs|no addressing mode, i.e., I2C bus operations performed after the offset for the transfer has been written to the device and before the actual read/write operation. .Bl -tag -compact -offset indent .It Va tr complete-transfer .It Va ss stop then start .It Va rs repeated start .It Va no none .El Some I2C bus hardware does not provide control over the individual start, repeat-start, and stop operations. Such hardware can only perform a complete transfer of the offset and the data as a single operation. The .Va tr mode creates control structures describing the transfer and submits them to the driver as a single complete transaction. This mode works on all types of I2C hardware. .It Fl n Ar skip_addr skip address - address(es) to be skipped during bus scan. There are two ways to specify addresses to ignore: by range 'a..b' or using selected addresses 'a:b:c'. This option is available only when "-s" is used. .It Fl o Ar offset offset within the device for data transfer (hex). The default is zero. Use .Dq -w 0 to disable writing of the offset to the slave. .It Fl r reset the controller. .It Fl s scan the bus for devices. .It Fl v be verbose. .It Fl w Ar 0|8|16 device addressing width (in bits). This is used to determine how to pass .Ar offset specified with .Fl o to the slave. Zero means that the offset is ignored and not passed to the slave at all. .El .Sh WARNINGS Great care must be taken when manipulating slave I2C devices with the .Nm -utility. Often times important configuration data for the system is kept in -non-volatile but write enabled memories located on the I2C bus, for example -Ethernet hardware addresses, RAM module parameters (SPD), processor reset -configuration word etc. +utility. +Often times important configuration data for the system is kept in non-volatile +but write enabled memories located on the I2C bus, for example Ethernet hardware +addresses, RAM module parameters (SPD), processor reset configuration word etc. .Pp It is very easy to render the whole system unusable when such configuration data is deleted or altered, so use the .Dq -d w (write) command only if you know exactly what you are doing. .Pp Also avoid ungraceful interrupting of an ongoing transaction on the I2C bus, -as it can lead to potentially dangerous effects. Consider the following -scenario: when the host CPU is reset (for whatever reason) in the middle of a -started I2C transaction, the I2C slave device could be left in write mode -waiting for data or offset to arrive. When the CPU reinitializes itself and -talks to this I2C slave device again, the commands and other control info it -sends are treated by the slave device as data or offset it was waiting for, -and there's great potential for corruption if such a write is performed. +as it can lead to potentially dangerous effects. +Consider the following scenario: when the host CPU is reset (for whatever reason) +in the middle of a started I2C transaction, the I2C slave device could be left +in write mode waiting for data or offset to arrive. +When the CPU reinitializes itself and talks to this I2C slave device again, +the commands and other control info it sends are treated by the slave device +as data or offset it was waiting for, and there's great potential for +corruption if such a write is performed. .Sh EXAMPLES .Bl -bullet .It Scan the default bus (/dev/iic0) for devices: .Pp i2c -s .It Scan the default bus (/dev/iic0) for devices and skip addresses 0x56 and 0x45. .Pp i2c -s -n 0x56:0x45 .It Scan the default bus (/dev/iic0) for devices and skip address range 0x34 to 0x56. .Pp i2c -s -n 0x34..0x56 .It Read 8 bytes of data from device at address 0x56 (e.g., an EEPROM): .Pp i2c -a 0x56 -d r -c 8 .It Write 16 bytes of data from file data.bin to device 0x56 at offset 0x10: .Pp i2c -a 0x56 -d w -c 16 -o 0x10 -b < data.bin .It Copy 4 bytes between two EEPROMs (0x56 on /dev/iic1 to 0x57 on /dev/iic0): .Pp i2c -a 0x56 -f /dev/iic1 -d r -c 0x4 -b | i2c -a 0x57 -f /dev/iic0 -d w -c 4 -b .It Reset the controller: .Pp i2c -f /dev/iic1 -r .El .Sh SEE ALSO .Xr iic 4 , .Xr iicbus 4 .Sh HISTORY The .Nm utility appeared in .Fx 8.0 . .Sh AUTHORS .An -nosplit The .Nm utility and this manual page were written by .An Bartlomiej Sieka Aq Mt tur@semihalf.com and .An Michal Hajduk Aq Mt mih@semihalf.com . Index: stable/12/usr.sbin/mountd/exports.5 =================================================================== --- stable/12/usr.sbin/mountd/exports.5 (revision 368379) +++ stable/12/usr.sbin/mountd/exports.5 (revision 368380) @@ -1,549 +1,553 @@ .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd Feb 11, 2019 +.Dd February 11, 2019 .Dt EXPORTS 5 .Os .Sh NAME .Nm exports .Nd define remote mount points for .Tn NFS mount requests .Sh SYNOPSIS .Nm .Sh DESCRIPTION The .Nm file specifies remote mount points for the .Tn NFS mount protocol per the .Tn NFS server specification; see .%T "Network File System Protocol Specification" , RFC1094, Appendix A and .%T "NFS: Network File System Version 3 Specification" , Appendix I. .Pp Each line in the file (other than comment lines that begin with a #) specifies the mount point(s) and export flags within one local server file system or the NFSv4 tree root for one or more hosts. A long line may be split over several lines by ending all but the last line with a backslash .Pq Ql \e . A host may be specified only once for each local file or the NFSv4 tree root on the server and there may be only one default entry for each server file system that applies to all other hosts. The latter exports the file system to the .Dq world and should be used only when the file system contains public information. .Pp In a mount entry, the first field(s) specify the directory path(s) within a server file system that can be mounted on by the corresponding client(s). There are three forms of this specification. The first is to list all mount points as absolute directory paths separated by whitespace. This list of directory paths should be considered an .Dq administrative control , since it is only enforced by the .Xr mountd 8 daemon and not the kernel. As such, it only applies to NFSv2 and NFSv3 mounts and only with respect to the client's use of the mount protocol. The second is to specify the pathname of the root of the file system followed by the .Fl alldirs flag; this form allows the host(s) to mount at any point within the file system, including regular files if the .Fl r option is used on .Xr mountd 8 . Because NFSv4 does not use the mount protocol, the .Dq administrative controls are not applied and all directories within this server file system are mountable via NFSv4 even if the .Fl alldirs flag has not been specified. The third form has the string ``V4:'' followed by a single absolute path name, to specify the NFSv4 tree root. This line does not export any file system, but simply marks where the root of the server's directory tree is for NFSv4 clients. The exported file systems for NFSv4 are specified via the other lines in the .Nm file in the same way as for NFSv2 and NFSv3. The pathnames must not have any symbolic links in them and should not have any .Dq Pa \&. or .Dq Pa .. components. Mount points for a file system may appear on multiple lines each with different sets of hosts and export options. .Pp The second component of a line specifies how the file system is to be exported to the host set. The option flags specify whether the file system is exported read-only or read-write and how the client UID is mapped to user credentials on the server. For the NFSv4 tree root, the only option that can be specified in this section is .Fl sec . .Pp Export options are specified as follows: .Pp .Sm off .Fl maproot Li = Sy user .Sm on The credential of the specified user is used for remote access by root. The credential includes all the groups to which the user is a member on the local machine (see .Xr id 1 ) . The user may be specified by name or number. The user string may be quoted, or use backslash escaping. .Pp .Sm off .Fl maproot Li = Sy user:group1:group2:... .Sm on The colon separated list is used to specify the precise credential to be used for remote access by root. The elements of the list may be either names or numbers. Note that user: should be used to distinguish a credential containing no groups from a complete credential for that user. The group names may be quoted, or use backslash escaping. .Pp .Sm off .Fl mapall Li = Sy user .Sm on or .Sm off .Fl mapall Li = Sy user:group1:group2:... .Sm on specifies a mapping for all client UIDs (including root) using the same semantics as .Fl maproot . .Pp The option .Fl r is a synonym for .Fl maproot in an effort to be backward compatible with older export file formats. .Pp In the absence of .Fl maproot and .Fl mapall options, remote accesses by root will result in using a credential of 65534:65533. All other users will be mapped to their remote credential. If a .Fl maproot option is given, remote access by root will be mapped to that credential instead of 65534:65533. If a .Fl mapall option is given, all users (including root) will be mapped to that credential in place of their own. .Pp .Sm off .Fl sec Li = Sy flavor1:flavor2... .Sm on specifies a colon separated list of acceptable security flavors to be used for remote access. Supported security flavors are sys, krb5, krb5i and krb5p. If multiple flavors are listed, they should be ordered with the most preferred flavor first. If this option is not present, the default security flavor list of just sys is used. .Pp The .Fl ro option specifies that the file system should be exported read-only (default read/write). The option .Fl o is a synonym for .Fl ro in an effort to be backward compatible with older export file formats. .Pp .Tn WebNFS exports strictly according to the spec (RFC 2054 and RFC 2055) can be done with the .Fl public flag. However, this flag in itself allows r/w access to all files in the file system, not requiring reserved ports and not remapping UIDs. It is only provided to conform to the spec, and should normally not be used. For a .Tn WebNFS export, use the .Fl webnfs flag, which implies .Fl public , .Sm off .Fl mapall No = Sy nobody .Sm on and .Fl ro . Note that only one file system can be .Tn WebNFS exported on a server. .Pp A .Sm off .Fl index No = Pa file .Sm on option can be used to specify a file whose handle will be returned if a directory is looked up using the public filehandle .Pq Tn WebNFS . This is to mimic the behavior of URLs. If no .Fl index option is specified, a directory filehandle will be returned as usual. The .Fl index option only makes sense in combination with the .Fl public or .Fl webnfs flags. .Pp Specifying the .Fl quiet option will inhibit some of the syslog diagnostics for bad lines in .Pa /etc/exports . This can be useful to avoid annoying error messages for known possible problems (see .Sx EXAMPLES below). .Pp The third component of a line specifies the host set to which the line applies. The set may be specified in three ways. The first way is to list the host name(s) separated by white space. (Standard Internet .Dq dot addresses may be used in place of names.) The second way is to specify a .Dq netgroup as defined in the .Pa netgroup file (see .Xr netgroup 5 ) . The third way is to specify an Internet subnetwork using a network and network mask that is defined as the set of all hosts with addresses within the subnetwork. This latter approach requires less overhead within the kernel and is recommended for cases where the export line refers to a large number of clients within an administrative subnet. .Pp The first two cases are specified by simply listing the name(s) separated by whitespace. All names are checked to see if they are .Dq netgroup names first and are assumed to be hostnames otherwise. Using the full domain specification for a hostname can normally circumvent the problem of a host that has the same name as a netgroup. The third case is specified by the flag .Sm off .Fl network Li = Sy netname Op Li / Ar prefixlength .Sm on and optionally .Sm off .Fl mask No = Sy netmask . .Sm on The netmask may be specified either by attaching a .Ar prefixlength to the .Fl network option, or by using a separate .Fl mask option. If the mask is not specified, it will default to the mask for that network class (A, B or C; see .Xr inet 4 ) . See the .Sx EXAMPLES section below. .Pp Scoped IPv6 address must carry scope identifier as documented in .Xr inet6 4 . For example, .Dq Li fe80::%re2/10 is used to specify .Li fe80::/10 on .Li re2 interface. .Pp For the third form which specifies the NFSv4 tree root, the directory path specifies the location within the server's file system tree which is the root of the NFSv4 tree. There can only be one NFSv4 root directory per server. As such, all entries of this form must specify the same directory path. For file systems other than ZFS, this location can be any directory and does not -need to be within an exported file system. If it is not in an exported -file system, a very limited set of operations are permitted, so that an -NFSv4 client can traverse the tree to an exported file system. +need to be within an exported file system. +If it is not in an exported file system, a very limited set of operations +are permitted, so that an NFSv4 client can traverse the tree to an +exported file system. Although parts of the NFSv4 tree can be non-exported, the entire NFSv4 tree must consist of local file systems capable of being exported via NFS. All ZFS file systems in the subtree below the NFSv4 tree root must be exported. NFSv4 does not use the mount protocol and does permit clients to cross server mount point boundaries, although not all clients are capable of crossing the mount points. .Pp The .Fl sec option on these line(s) specifies what security flavors may be used for -NFSv4 operations that do not use file handles. Since these operations -(SetClientID, SetClientIDConfirm, Renew, DelegPurge and ReleaseLockOnwer) -allocate/modify state in the server, it is possible to restrict some clients to -the use of the krb5[ip] security flavors, via this option. +NFSv4 operations that do not use file handles. +Since these operations (SetClientID, SetClientIDConfirm, Renew, DelegPurge +and ReleaseLockOnwer) allocate/modify state in the server, it is possible +to restrict some clients to the use of the krb5[ip] security flavors, +via this option. See the .Sx EXAMPLES section below. This third form is meaningless for NFSv2 and NFSv3 and is ignored for them. .Pp The .Xr mountd 8 utility can be made to re-read the .Nm file by sending it a hangup signal as follows: .Bd -literal -offset indent /etc/rc.d/mountd reload .Ed .Pp After sending the .Dv SIGHUP , check the .Xr syslogd 8 output to see whether .Xr mountd 8 logged any parsing errors in the .Nm file. .Sh FILES .Bl -tag -width /etc/exports -compact .It Pa /etc/exports the default remote mount-point file .El .Sh EXAMPLES .Bd -literal -offset indent /usr /usr/local -maproot=0:10 friends /usr -maproot=daemon grumpy.cis.uoguelph.ca 131.104.48.16 /usr -ro -mapall=nobody /u -maproot=bin: -network 131.104.48 -mask 255.255.255.0 /a -network 192.168.0/24 /a -network 3ffe:1ce1:1:fe80::/64 /u2 -maproot=root friends /u2 -alldirs -network cis-net -mask cis-mask /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 /private -sec=krb5i /secret -sec=krb5p V4: / -sec=krb5:krb5i:krb5p -network 131.104.48 -mask 255.255.255.0 V4: / -sec=sys:krb5:krb5i:krb5p grumpy.cis.uoguelph.ca .Ed .Pp Given that .Pa /usr , /u , /a and .Pa /u2 are local file system mount points, the above example specifies the following: .Pp The file system rooted at .Pa /usr is exported to hosts .Em friends where friends is specified in the netgroup file with users mapped to their remote credentials and root mapped to UID 0 and group 10. It is exported read-write and the hosts in .Dq friends can mount either .Pa /usr or .Pa /usr/local . It is exported to .Em 131.104.48.16 and .Em grumpy.cis.uoguelph.ca with users mapped to their remote credentials and root mapped to the user and groups associated with .Dq daemon ; it is exported to the rest of the world as read-only with all users mapped to the user and groups associated with .Dq nobody . .Pp The file system rooted at .Pa /u is exported to all hosts on the subnetwork .Em 131.104.48 with root mapped to the UID for .Dq bin and with no group access. .Pp The file system rooted at .Pa /u2 is exported to the hosts in .Dq friends with root mapped to UID and groups associated with .Dq root ; it is exported to all hosts on network .Dq cis-net allowing mounts at any directory within /u2. .Pp The file system rooted at .Pa /a is exported to the network 192.168.0.0, with a netmask of 255.255.255.0. However, the netmask length in the entry for .Pa /a is not specified through a .Fl mask option, but through the .Li / Ns Ar prefix notation. .Pp The file system rooted at .Pa /a is also exported to the IPv6 network .Li 3ffe:1ce1:1:fe80:: address, using the upper 64 bits as the prefix. Note that, unlike with IPv4 network addresses, the specified network address must be complete, and not just contain the upper bits. With IPv6 addresses, the .Fl mask option must not be used. .Pp The file system rooted at .Pa /cdrom will be exported read-only to the entire network 192.168.33.0/24, including all its subdirectories. Since .Pa /cdrom is the conventional mountpoint for a CD-ROM device, this export will fail if no CD-ROM medium is currently mounted there since that line would then attempt to export a subdirectory of the root file system with the .Fl alldirs option which is not allowed. The .Fl quiet option will then suppress the error message for this condition that would normally be syslogged. As soon as an actual CD-ROM is going to be mounted, .Xr mount 8 will notify .Xr mountd 8 about this situation, and the .Pa /cdrom file system will be exported as intended. Note that without using the .Fl alldirs option, the export would always succeed. While there is no CD-ROM medium mounted under .Pa /cdrom , it would export the (normally empty) directory .Pa /cdrom of the root file system instead. .Pp The file system rooted at .Pa /private will be exported using Kerberos 5 authentication and will require integrity protected messages for all accesses. The file system rooted at .Pa /secret will also be exported using Kerberos 5 authentication and all messages used to access it will be encrypted. .Pp For the experimental server, the NFSv4 tree is rooted at ``/'', and any client within the 131.104.48 subnet is permitted to perform NFSv4 state operations on the server, so long as valid Kerberos credentials are provided. The machine grumpy.cis.uoguelph.ca is permitted to perform NFSv4 state operations on the server using AUTH_SYS credentials, as well as Kerberos ones. .Pp In the following example some directories are exported as NFSv3 and NFSv4: .Bd -literal -offset indent V4: /wingsdl/nfsv4 /wingsdl/nfsv4/usr-ports -maproot=root -network 172.16.0.0 -mask 255.255.0.0 /wingsdl/nfsv4/clasper -maproot=root clasper .Ed .Pp Only one V4: line is needed or allowed to declare where NFSv4 is -rooted. The other lines declare specific exported directories with +rooted. +The other lines declare specific exported directories with their absolute paths given in /etc/exports. .Pp The exported directories' paths are used for both v3 and v4. -However, they are interpreted differently for v3 and v4. A client -mount command for usr-ports would use the server-absolute name when +However, they are interpreted differently for v3 and v4. +A client mount command for usr-ports would use the server-absolute name when using nfsv3: .Bd -literal -offset indent mount server:/wingsdl/nfsv4/usr-ports /mnt/tmp .Ed .Pp A mount command using NFSv4 would use the path relative to the NFSv4 root: .Bd -literal -offset indent mount server:/usr-ports /mnt/tmp .Ed .Pp This also differentiates which version you want if the client can do -both v3 and v4. The former will only ever do a v3 mount and the -latter will only ever do a v4 mount. +both v3 and v4. +The former will only ever do a v3 mount and the latter will only ever +do a v4 mount. .Pp Note that due to different mount behavior between NFSv3 and NFSv4 a NFSv4 mount request for a directory that the client does not have permission for will succeed and read/write access will fail afterwards, whereas NFSv3 rejects the mount request. .Sh SEE ALSO .Xr nfsv4 4 , .Xr netgroup 5 , .Xr mountd 8 , .Xr nfsd 8 , .Xr showmount 8 .Sh BUGS The export options are tied to the local mount points in the kernel and must be non-contradictory for any exported subdirectory of the local server mount point. It is recommended that all exported directories within the same server file system be specified on adjacent lines going down the tree. You cannot specify a hostname that is also the name of a netgroup. Specifying the full domain specification for a hostname can normally circumvent the problem. Index: stable/12/usr.sbin/nfsuserd/nfsuserd.8 =================================================================== --- stable/12/usr.sbin/nfsuserd/nfsuserd.8 (revision 368379) +++ stable/12/usr.sbin/nfsuserd/nfsuserd.8 (revision 368380) @@ -1,133 +1,137 @@ .\" Copyright (c) 2009 Rick Macklem, University of Guelph .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd April 6, 2019 .Dt NFSUSERD 8 .Os .Sh NAME .Nm nfsuserd .Nd load user and group information into the kernel for .Tn NFSv4 services plus support manage-gids for all NFS versions .Sh SYNOPSIS .Nm nfsuserd .Op Fl domain Ar domain_name .Op Fl usertimeout Ar minutes .Op Fl usermax Ar max_cache_size .Op Fl verbose .Op Fl force .Op Fl manage-gids .Op Ar num_servers .Sh DESCRIPTION .Nm loads user and group information into the kernel for NFSv4. For Kerberized NFSv4 mounts, it must be running on both client(s) and server for correct operation. For non-Kerberized NFSv4 mounts, this daemon must be running unless all client(s) plus the server are configured to put uid/gid numbers in the owner and owner_group strings. .Pp It also provides support for manage-gids and must be running on the server if this is being used for any version of NFS. .Pp -Upon startup, it loads the machines DNS domain name, plus timeout and -cache size limit into the kernel. It then preloads the cache with group -and user information, up to the cache size limit and forks off N children -(default 4), that service requests from the kernel for cache misses. The -master server is there for the sole purpose of killing off the slaves. +Upon startup, it loads the machines DNS domain name, plus timeout and cache size +limit into the kernel. +It then preloads the cache with group and user information, up to the cache size +limit and forks off N children (default 4), that service requests from the kernel +for cache misses. +The master server is there for the sole purpose of killing off the slaves. To stop the nfsuserd, send a SIGUSR1 to the master server. .Pp The following options are available: .Bl -tag -width Ds .It Fl domain Ar domain_name This option allows you to override the default DNS domain name, which is acquired by taking either the suffix on the machine's hostname or, if that name is not a fully qualified host name, the canonical name as reported by .Xr getaddrinfo 3 . .It Fl usertimeout Ar minutes Overrides the default timeout for cache entries, in minutes. The longer the time out, the better the performance, but the longer it takes for replaced -entries to be seen. If your user/group database management system almost -never re-uses the same names or id numbers, a large timeout is recommended. +entries to be seen. +If your user/group database management system almost never re-uses the same names +or id numbers, a large timeout is recommended. The default is 1 minute. .It Fl usermax Ar max_cache_size -Overrides the default upper bound on the cache size. The larger the cache, -the more kernel memory is used, but the better the performance. If your -system can afford the memory use, make this the sum of the number of +Overrides the default upper bound on the cache size. +The larger the cache, the more kernel memory is used, but the better the performance. +If your system can afford the memory use, make this the sum of the number of entries in your group and password databases. The default is 200 entries. .It Fl verbose When set, the server logs a bunch of information to syslog. .It Fl force This flag option must be set to restart the daemon after it has gone away abnormally and refuses to start, because it thinks nfsuserd is already running. .It Fl manage-gids This flag enables manage-gids for the NFS server .Xr nfsd 8 . When this is enabled, all NFS requests using AUTH_SYS authentication take the uid from the RPC request and uses the group list for that uid provided by .Xr getgrouplist 3 on the server instead of the list of groups provided in the RPC authenticator. This can be used to avoid the 16 group limit for AUTH_SYS. .It Ar num_servers Specifies how many servers to create (max 20). -The default of 4 may be sufficient. You should run enough servers, so that +The default of 4 may be sufficient. +You should run enough servers, so that .Xr ps 1 shows almost no running time for one or two of the slaves after the system -has been running for a long period. Running too few will have a major -performance impact, whereas running too many will only tie up some resources, -such as a process table entry and swap space. +has been running for a long period. +Running too few will have a major performance impact, whereas running too many +will only tie up some resources, such as a process table entry and swap space. .El .Sh SEE ALSO .Xr getgrent 3 , .Xr getgrouplist 3 , .Xr getpwent 3 , .Xr nfsv4 4 , .Xr group 5 , .Xr passwd 5 , .Xr nfsd 8 .Sh HISTORY The .Nm utility was introduced with the NFSv4 experimental subsystem in 2009. .Sh BUGS The .Nm use .Xr getgrent 3 , .Xr getgrouplist 3 and .Xr getpwent 3 library calls to resolve requests and will hang if the servers handling -those requests fail and the library functions don't return. See +those requests fail and the library functions don't return. +See .Xr group 5 and .Xr passwd 5 for more information on how the databases are accessed. Index: stable/12/usr.sbin/pmcstudy/pmcstudy.8 =================================================================== --- stable/12/usr.sbin/pmcstudy/pmcstudy.8 (revision 368379) +++ stable/12/usr.sbin/pmcstudy/pmcstudy.8 (revision 368380) @@ -1,145 +1,145 @@ .\" .\" Copyright (c) 2015 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd Mar 26, 2015 +.Dd March 26, 2015 .Dt PMCSTUDY 8 .Os .Sh NAME .Nm pmcstudy .Nd Perform various studies on a system's overall PMCs .Sh SYNOPSIS .Nm .Oo Fl i Ar inputfile | Fl A | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc .Nm .Fl i Ar inputfile .Nm .Fl v .Nm .Fl m Ar max .Nm .Fl e Ar exp-name .Nm .Fl E Ar your-expr .Nm .Fl h .Nm .Fl H .Nm .Fl T .Sh DESCRIPTION The .Nm program is designed to run various tests against your systems performance. There are roughly 20-22 canned tests that setup specific PMCs and then run various formulas on the output information. These formulas can be found in Intel documentation "Using Intel Vtune amplifier xe on NNN Generation Intel Core Processors". The NNN is either 2nd, 3rd, 4th or 5th generation i.e., Sandy Bridge, Ivy Bridge, Haswell and Broadwell. Currently the program only works on these four Intel processor types. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl i Ar filename If this option is supplied, instead of running a .Xr pmcstat 8 command to collect the current running information the filename will be read in as input instead. .It Fl H This option will display the complete list of canned formulas that can be run including their names which can be input to the .Fl e option. .It Fl e Ar name Execute the canned test .Ar name on the running kernel. .It Fl h If you add this option to the .Fl e option the test will not execute but instead give you a small description of the test that would run. .It Fl T This option will execute a test of every PMC to validate that they are working on your system. If a PMC does not show up in this test chances are the kernel .Xr hwpmc 4 driver needs updating with new PMC information. .It Fl m Ar num This option can restrict the number of one second samples that will be collected by your system when running a test (it bounds the time the test will run). Without this option the test will run for 1024 seconds or until the user types ctrl-c. .It Fl v The verbose option adds debugging output to the command. .It Fl E Ar expression This option can be used by those that have their own ideas on what formulas they want to run. The expression given to the .Fl E option is a "formula". The formula can declare directly the PMCs by name or you can use an abbreviation %NNN. To find out the abbreviations on your system you may run the .Fl L option. An example of a formula of your own might be .Fl E "FP_ASSIST.ANY / INST_RETIRED.ANY_P" or using the abbreviations on a Haswell machine you would type .Fl E " %176 / %150". You must have spaces between each entry and you may use parentheses to prioritize the operators. Add (+), Subtract (-), Divide (/) and Multiplication (*) are supported. You may also introduce constant numbers. For example you can do a standard efficiency test like .Fl E "UOPS_RETIRED.RETIRE_SLOTS / (4 * CPU_CLK_UNHALTED.THREAD_P)". .It Fl L This option will list all known PMCs and their abbreviation (%NNN). .It Fl A Run all canned tests. .El .Sh SEE ALSO .Xr pmc 3 , .Xr pmclog 3 , .Xr hwpmc 4 , .Xr pmcstat 8 .Sh HISTORY The .Nm utility first appeared in -.Fx 11.0. +.Fx 11.0 . .Sh AUTHORS .An Randall Stewart Aq Mt rrs@FreeBSD.org Index: stable/12/usr.sbin/traceroute6/traceroute6.8 =================================================================== --- stable/12/usr.sbin/traceroute6/traceroute6.8 (revision 368379) +++ stable/12/usr.sbin/traceroute6/traceroute6.8 (revision 368380) @@ -1,209 +1,211 @@ .\" $KAME: traceroute6.8,v 1.10 2004/06/06 12:35:15 suz Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the project nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd September 13, 2020 .Dt TRACEROUTE6 8 .Os .\" .Sh NAME .Nm traceroute6 .Nd "print the route IPv6 packets will take to a network node" .\" .Sh SYNOPSIS .Nm .Bk -words .Op Fl adIlnNrSTUv .Ek .Bk -words .Op Fl f Ar firsthop .Ek .Bk -words .Op Fl g Ar gateway .Ek .Bk -words .Op Fl m Ar hoplimit .Ek .Bk -words .Op Fl p Ar port .Ek .Bk -words .Op Fl q Ar probes .Ek .Bk -words .Op Fl s Ar src .Ek .Bk -words .Op Fl t Ar tclass .Ek .Bk -words .Op Fl w Ar waittime .Ek .Bk -words .Op Fl A Ar as_server .Ek .Bk -words .Ar target .Op Ar datalen .Ek .\" .Sh DESCRIPTION The .Nm utility uses the IPv6 protocol hop limit field to elicit an ICMPv6 TIME_EXCEEDED response from each gateway along the path to some host. .Pp The only mandatory parameter is the destination host name or IPv6 address. The default probe datagram carries 20 bytes of payload, in addition to the IPv6 header. The size of the payload can be specified by giving a length (in bytes) after the destination host name. .Pp Other options are: .Bl -tag -width Ds .It Fl a Turn on AS# lookups for each hop encountered. .It Fl A Ar as_server Turn on AS# lookups and use the given server instead of the default. .It Fl d Debug mode. .It Fl f Ar firsthop Specify how many hops to skip in trace. .It Fl g Ar gateway -Specify intermediate gateway. Please note that +Specify intermediate gateway. +Please note that .Nm tries to use routing headers. .It Fl I Use ICMP6 ECHO instead of UDP datagrams. .It Fl l Print both host hostnames and numeric addresses. Normally .Nm prints only hostnames if .Fl n is not specified, and only numeric addresses if .Fl n is specified. .It Fl m Ar hoplimit Specify maximum hoplimit, up to 255. The default is the value of the .Va net.inet6.ip6.hlim .Xr sysctl 8 (the same default used for TCP connections). .It Fl n Do not resolve numeric address to hostname. .It Fl N Use a packet with no upper layer header for the probes, instead of UDP datagrams. .It Fl p Ar port Set SCTP/TCP/UDP port number to .Ar port . .It Fl q Ar probes Set the number of probe per hop count to .Ar probes . .It Fl r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-connected network, an error is returned. This option corresponds to the .Dv SO_DONTROUTE socket option; it can be used to ping a local host through an interface that has no route through it (e.g., after the interface was dropped by a routing daemon). .It Fl s Ar src .Ar Src specifies the source IPv6 address to be used. .It Fl S Use SCTP packets for the probes. The size of probe packets must be a multiple of 4. If .Ar datalen is up to 28, probe packets consist of a SHUTDOWN-ACK chunk possibly bundled -with a PAD chunk. For larger probe packets, an INIT chunk is used. +with a PAD chunk. +For larger probe packets, an INIT chunk is used. .It Fl t Ar tclass .Ar tclass specifies the .Em traffic class used when sending probe packets. The value must be a decimal integer in the range 0 to 255. The default is 0. .It Fl T Use TCP segments for the probes. .It Fl U Use UDP datagrams for the probes. This is the default. .It Fl v Be verbose. .It Fl w Ar waittime Specify the delay time between probes. .El .Pp This program prints the route to the given destination and the round-trip time to each gateway, in the same manner as traceroute. .Pp Here is a list of possible annotations after the round-trip time for each gateway: .Bl -hang -offset indent .It !N Destination Unreachable - No Route to Host. .It !P Destination Unreachable - Administratively Prohibited. .It !S Destination Unreachable - Not a Neighbour. .It !A Destination Unreachable - Address Unreachable. .It !H Parameter Problem - Unrecognized Next Header Type. .It !\& This is printed if the hop limit is <= 1 on a port unreachable message. This means that the packet got to the destination, but that the reply had a hop limit that was just large enough to allow it to get back to the source of the traceroute6. This was more interesting in the IPv4 case, where some IP stack bugs could be identified by this behaviour. .El .\" .Sh EXIT STATUS The .Nm utility will exit with 0 on success, and non-zero on errors. .\" .Sh SEE ALSO .Xr ping 8 , .Xr ping6 8 , .Xr traceroute 8 .\" .Sh HISTORY The .Nm utility first appeared in WIDE hydrangea IPv6 protocol stack kit. Index: stable/12 =================================================================== --- stable/12 (revision 368379) +++ stable/12 (revision 368380) Property changes on: stable/12 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r366572