dhcpcd

package: dhcpcd

title: dhcpcd(8)

summary: a DHCP client

text:
# dhcpcd(8)

## NAME
dhcpcd — a DHCP client

## SYNOPSIS
dhcpcd

[-146ABbDdEGgHJKLMNPpqTV] [-C, --nohook hook] [-c, --script script] [-e, --env value] [-F, --fqdn FQDN] [-f, --config file] [-h, --hostname hostname] [-I, --clientid clientid] [-i, --vendorclassid vendorclassid] [-j, --logfile logfile] [-l, --leasetime seconds] [-m, --metric metric] [-O, --nooption option] [-o, --option option] [-Q, --require option] [-r, --request address] [-S, --static value] [-s, --inform address[/cidr[/broadcast_address]]] [--inform6] [-t, --timeout seconds] [-u, --userclass class] [-v, --vendor code, value] [-W, --whitelist address[/cidr]] [-w] [--waitip=[4 | 6]] [-y, --reboot seconds] [-X, --blacklist address[/cidr]] [-Z, --denyinterfaces pattern] [-z, --allowinterfaces pattern] [--inactive] [--configure] [--noconfigure] [interface] [...]

dhcpcd

-n, --rebind [interface]

dhcpcd

-k, --release [interface]

dhcpcd

-U, --dumplease [interface]

dhcpcd

--version

dhcpcd

-x, --exit [interface]

## DESCRIPTION
dhcpcd is an implementation of the DHCP client specified in RFC 2131. dhcpcd gets the host information (IP address, routes, etc) from a DHCP server and configures the network interface of the machine on which it is running. dhcpcd then runs the configuration script which writes DNS information to resolvconf(8), if available, otherwise directly to /etc/resolv.conf. If the hostname is currently blank, (null) or localhost, or force_hostname is YES or TRUE or 1 then dhcpcd sets the hostname to the one supplied by the DHCP server. dhcpcd then daemonises and waits for the lease renewal time to lapse. It will then attempt to renew its lease and reconfigure if the new lease changes when the lease begins to expire or the DHCP server sends a message to renew early.

If any interface reports a working carrier then dhcpcd will try to obtain a lease before forking to the background, otherwise it will fork right away. This behaviour can be modified with the -b, --background and -w, --waitip options.

dhcpcd is also an implementation of the BOOTP client specified in RFC 951.

dhcpcd is also an implementation of the IPv6 Router Solicitor as specified in RFC 4861 and RFC 6106.

dhcpcd is also an implementation of the IPv6 Privacy Extensions to AutoConf as specified in RFC 4941. This feature needs to be enabled in the kernel and dhcpcd will start using it.

dhcpcd is also an implementation of the DHCPv6 client as specified in RFC 3315. By default, dhcpcd only starts DHCPv6 when instructed to do so by an IPV6 Router Advertisement. If no Identity Association is configured, then a Non-temporary Address is requested.

### Local Link configuration
If dhcpcd failed to obtain a lease, it probes for a valid IPv4LL address (aka ZeroConf, aka APIPA). Once obtained it restarts the process of looking for a DHCP server to get a proper address.

When using IPv4LL, dhcpcd nearly always succeeds and returns an exit code of 0. In the rare case it fails, it normally means that there is a reverse ARP proxy installed which always defeats IPv4LL probing. To disable this behaviour, you can use the -L, --noipv4ll option.

### Multiple interfaces
If a list of interfaces are given on the command line, then dhcpcd only works with those interfaces, otherwise dhcpcd discovers available Ethernet interfaces that can be configured. When dhcpcd is not limited to one interface on the command line, it is running in Manager mode. The dhcpcd-ui project expects dhcpcd to be running this way.

If a single interface is given then dhcpcd only works for that interface and runs as a separate instance to other dhcpcd processes. The -w, --waitip option is enabled in this instance to maintain compatibility with older versions. Using a single interface, optionally further limited to an address protocol, also affects the -k, -N, -n and -x options, where the same interface and any address protocol will need to be specified, as a lack of an interface will imply Manager mode which this is not. To force starting in Manager mode with only one interface, the -M, --manager option can be used.

Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric. For systems that support route metrics, each route will be tagged with the metric, otherwise dhcpcd changes the routes to use the interface with the same route and the lowest metric. See options below for controlling which interfaces we allow and deny through the use of patterns.

Non-ethernet interfaces and some virtual ethernet interfaces such as TAP and bridge are ignored by default, as is the FireWire interface. To work with these devices they either need to be specified on the command line, be listed in --allowinterfaces or have an interface directive in /etc/dhcpcd.conf.

### Hooking into events
dhcpcd runs /lib/dhcpcd/dhcpcd-run-hooks, or the script specified by the -c, --script option. This script runs each script found in /lib/dhcpcd/dhcpcd-hooks in a lexical order. The default installation supplies the scripts 01-test, 20-resolv.conf and 30-hostname. You can disable each script by using the -C, --nohook option. See dhcpcd-run-hooks(8) for details on how these scripts work. dhcpcd currently ignores the exit code of the script.

More scripts are supplied in /usr/share/dhcpcd/hooks and need to be copied to /lib/dhcpcd/dhcpcd-hooks if you intend to use them. For example, you could install 29-lookup-hostname so that dhcpcd can lookup the hostname of the IP address in DNS if no hostname is given by the lease and one is not already set.

### Fine tuning
You can fine-tune the behaviour of dhcpcd with the following options:

-b, --background

Background immediately. This is useful for startup scripts which don't disable link messages for carrier status.

-c, --script script

Use this script instead of the default /lib/dhcpcd/dhcpcd-run-hooks.

-D, --duid [ll | lt | uuid | value]

Use a DHCP Unique Identifier. If persistent storage is available then a DUID-LLT (link local address + time) is generated, otherwise DUID-LL is generated (link local address). The DUID type can be hinted as an optional parameter if the file /var/lib/dhcpcd/duid does not exist. If not ll, lt or uuid then value will be converted from 00:11:22:33 format. This, plus the IAID will be used as the -I, --clientid. The DUID generated will be held in /var/lib/dhcpcd/duid and should not be copied to other hosts. This file also takes precedence over the above rules except for setting a value.

-d, --debug

Echo debug messages to the stderr and syslog.

-E, --lastlease

If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface.

--lastleaseextend

Same as the above, but the lease will be retained even if it expires. dhcpcd will give it up if any other host tries to claim it for their own via ARP. This violates RFC 2131, section 3.7, which states the lease should be dropped once it has expired.

-e, --env value

Push value to the environment for use in dhcpcd-run-hooks(8). For example, you can force the hostname hook to always set the hostname with -e force_hostname=YES.

-g, --reconfigure

dhcpcd will re-apply IP address, routing and run dhcpcd-run-hooks(8) for each interface. This is useful so that a 3rd party such as PPP or VPN can change the routing table and / or DNS, etc and then instruct dhcpcd to put things back afterwards. dhcpcd does not read a new configuration when this happens - you should rebind if you need that functionality.

-F, --fqdn fqdn

Requests that the DHCP server update DNS using FQDN instead of just a hostname. Valid values for fqdn are disable, none, ptr and both. dhcpcd itself never does any DNS updates. dhcpcd encodes the FQDN hostname as specified in RFC 1035.

-f, --config file

Specify a config to load instead of /etc/dhcpcd.conf. dhcpcd always processes the config file before any command line options.

-h, --hostname hostname

Sends hostname to the DHCP server so it can be registered in DNS. If hostname is an empty string then the current system hostname is sent. If hostname is a FQDN (i.e., contains a .) then it will be encoded as such.

-I, --clientid clientid

Send the clientid. If the string is of the format 01:02:03 then it is encoded as hex. For interfaces whose hardware address is longer than 8 bytes, or if the clientid is an empty string then dhcpcd sends a default clientid of the hardware family and the hardware address.

-i, --vendorclassid vendorclassid

Override the DHCPv4 vendorclassid field sent. The default is dhcpcd-<version>:<os>:<machine>:<platform>. For example dhcpcd-5.5.6:NetBSD-6.99.5:i386:i386

If not set then none is sent. Some badly configured DHCP servers reject unknown vendorclassids. To work around it, try and impersonate Windows by using the MSFT vendorclassid.

-j, --logfile logfile

Writes to the specified logfile. dhcpcd still writes to syslog(3). The logfile is reopened when dhcpcd receives the SIGUSR2 signal.

-k, --release [interface]

This causes an existing dhcpcd process running on the interface to release its lease and de-configure the interface regardless of the -p, --persistent option. If no interface is specified then this applies to all interfaces in Manager mode. If no interfaces are left running, dhcpcd will exit.

-l, --leasetime seconds

Request a lease time of seconds. -1 represents an infinite lease time. By default dhcpcd does not request any lease time and leaves it in the hands of the DHCP server.

-M, --manager

Start dhcpcd in Manager mode even if only one interface specified on the command line. See the Multiple Interfaces section above.

-m, --metric metric

Metrics are used to prefer an interface over another one, lowest wins. dhcpcd will supply a default metric of 1000 + if_nametoindex(3). This will be offset by 2000 for wireless interfaces, with additional offsets of 1000000 for IPv4LL and 2000000 for roaming interfaces.

-n, --rebind [interface]

Notifies dhcpcd to reload its configuration and rebind the specified interface. If no interface is specified then this applies to all interfaces in Manager mode. If dhcpcd is not running, then it starts up as normal.

-N, --renew [interface]

Notifies dhcpcd to renew existing addresses on the specified interface. If no interface is specified then this applies to all interfaces in Manager mode. If dhcpcd is not running, then it starts up as normal. Unlike the -n, --rebind option above, the configuration for dhcpcd is not reloaded.

-o, --option option

Request the DHCP option variable for use in /lib/dhcpcd/dhcpcd-run-hooks.

-p, --persistent

dhcpcd de-configures the interface when it exits unless this option is enabled. Sometimes, this isn't desirable if, for example, you have root mounted over NFS or SSH clients connect to this host and they need to be notified of the host shutting down. You can use this option to stop this from happening.

-r, --request address

Request the address in the DHCP DISCOVER message. There is no guarantee this is the address the DHCP server will actually give. If no address is given then the first address currently assigned to the interface is used.

-s, --inform address[/cidr[/broadcast_address]]

Behaves like -r, --request as above, but sends a DHCP INFORM instead of DISCOVER/REQUEST. This does not get a lease as such, just notifies the DHCP server of the address in use. You should also include the optional cidr network number in case the address is not already configured on the interface. dhcpcd remains running and pretends it has an infinite lease. dhcpcd will not de-configure the interface when it exits. If dhcpcd fails to contact a DHCP server then it returns a failure instead of falling back on IPv4LL.

--inform6

Performs a DHCPv6 Information Request. No address is requested or specified, but all other DHCPv6 options are allowed. This is normally performed automatically when the IPv6 Router Advertises that the client should perform this operation. This option is only needed when dhcpcd is not processing IPv6RA messages and the need for DHCPv6 Information Request exists.

-S, --static value

Configures a static DHCP value. If you set ip_address then dhcpcd will not attempt to obtain a lease and just use the value for the address with an infinite lease time. Here is an example which configures a static address, routes and DNS.

dhcpcd -S ip_address=192.168.0.10/24 \

-S routers=192.168.0.1 \

-S domain_name_servers=192.168.0.1 \

eth0

You cannot presently set static DHCPv6 values. Use the -e, --env option instead.

-t, --timeout seconds

Timeout after seconds, instead of the default 30. A setting of 0 seconds causes dhcpcd to wait forever to get a lease. If dhcpcd is working on a single interface then dhcpcd will exit when a timeout occurs, otherwise dhcpcd will fork into the background.

-u, --userclass class

Tags the DHCPv4 message with the userclass class. DHCP servers use this to give members of the class DHCP options other than the default, without having to know things like hardware address or hostname.

-v, --vendor code,value

Add an encapsulated vendor option. code should be between 1 and 254 inclusive. To add a raw vendor string, omit code but keep the comma. Examples. Set the vendor option 01 with an IP address.

dhcpcd -v 01,192.168.0.2 eth0

Set the vendor option 02 with a hex code. dhcpcd -v 02,01:02:03:04:05 eth0

Set the vendor option 03 with an IP address as a string. dhcpcd -v 03,\"192.168.0.2\" eth0

Set un-encapsulated vendor option to hello world. dhcpcd -v ,"hello world" eth0

--version

Display both program version and copyright information. dhcpcd then exits before doing any configuration.

-w

Wait for an address to be assigned before forking to the background. Does not take an argument, unlike the below option.

--waitip=[4 | 6]

Wait for an address to be assigned before forking to the background. 4 means wait for an IPv4 address to be assigned. 6 means wait for an IPv6 address to be assigned. If no argument is given, dhcpcd will wait for any address protocol to be assigned. It is possible to wait for more than one address protocol and dhcpcd will only fork to the background when all waiting conditions are satisfied.

-x, --exit [interface]

This will signal an existing dhcpcd process running on the interface to exit. If no interface is specified, then the above is applied to all interfaces in Manager mode. See the -p, --persistent option to control configuration persistence on exit, which is enabled by default in dhcpcd.conf(5). dhcpcd then waits until this process has exited.

-y, --reboot seconds

Allow reboot seconds before moving to the discover phase if we have an old lease to use. Allow reboot seconds before starting fallback states from the discover phase. IPv4LL is started when the first reboot timeout is reached. The default is 5 seconds. A setting of 0 seconds causes dhcpcd to skip the reboot phase and go straight into discover. This has no effect on DHCPv6 other than skipping the reboot phase.

### Restricting behaviour
dhcpcd will try to do as much as it can by default. However, there are sometimes situations where you don't want the things to be configured exactly how the DHCP server wants. Here are some options that deal with turning these bits off.

Note that when dhcpcd is restricted to a single interface then the interface also needs to be specified when asking dhcpcd to exit using the commandline. If the protocol is restricted as well then the protocol needs to be included with the exit instruction.

-1, --oneshot

Exit after configuring an interface. Use the -w, --waitip option to specify which protocol(s) to configure before exiting.

-4, --ipv4only

Configure IPv4 only.

-6, --ipv6only

Configure IPv6 only.

-A, --noarp

Don't request or claim the address by ARP. This also disables IPv4LL.

-B, --nobackground

Don't run in the background when we acquire a lease. This is mainly useful for running under the control of another process, such as a debugger or a network manager.

-C, --nohook script

Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh. So to stop dhcpcd from touching your DNS settings you would do:-

dhcpcd -C resolv.conf eth0

-G, --nogateway

Don't set any default routes.

-H, --xidhwaddr

Use the last four bytes of the hardware address as the DHCP xid instead of a randomly generated number.

-J, --broadcast

Instructs the DHCP server to broadcast replies back to the client. Normally this is only set for non-Ethernet interfaces, such as FireWire and InfiniBand. In most instances, dhcpcd will set this automatically.

-K, --nolink

Don't receive link messages for carrier status. You should only have to use this with buggy device drivers or running dhcpcd through a network manager.

-L, --noipv4ll

Don't use IPv4LL (aka APIPA, aka Bonjour, aka ZeroConf).

-O, --nooption option

Removes the option from the DHCP message before processing.

-P, --printpidfile

Print the pidfile dhcpcd will use based on command-line arguments to stdout.

-Q, --require option

Requires the option to be present in all DHCP messages, otherwise the message is ignored. To enforce that dhcpcd only responds to DHCP servers and not BOOTP servers, you can -Q dhcp_message_type.

-q, --quiet

Quiet dhcpcd on the command line, only warnings and errors will be displayed. If this option is used another time then all console output is disabled. These messages are still logged via syslog(3).

-T, --test

On receipt of DHCP messages just call /lib/dhcpcd/dhcpcd-run-hooks with the reason of TEST which echos the DHCP variables found in the message to the console. The interface configuration isn't touched and neither are any configuration files. The rapid_commit option is not sent in TEST mode so that the server does not lease an address. To test INFORM the interface needs to be configured with the desired address before starting dhcpcd.

-U, --dumplease [interface]

Dumps the current lease for the interface to stdout. If no interface is given then all interfaces are dumped. Use the -4 or -6 flags to specify an address family. If a lease is piped in via standard input then use the special interface named - to dump it. In this case, specifying an address family is mandatory.

-V, --variables

Display a list of option codes, the associated variable and encoding for use in dhcpcd-run-hooks(8). Variables are prefixed with new_ and old_ unless the option number is -. Variables without an option are part of the DHCP message and cannot be directly requested.

-W, --whitelist address[/cidr]

Only accept packets from address[/cidr]. -X, --blacklist is ignored if -W, --whitelist is set.

-X, --blacklist address[/cidr]

Ignore all packets from address[/cidr].

-Z, --denyinterfaces pattern

When discovering interfaces, the interface name must not match pattern which is a space or comma separated list of patterns passed to fnmatch(3).

-z, --allowinterfaces pattern

When discovering interfaces, the interface name must match pattern which is a space or comma separated list of patterns passed to fnmatch(3). If the same interface is matched in -Z, --denyinterfaces then it is still denied.

--inactive

Don't start any interfaces other than those specified on the command line. This allows dhcpcd to be started in Manager mode and then wait for subsequent dhcpcd commands to start each interface as required.

--configure

Allows dhcpcd to configure the system. This is the default behaviour and sets if_configured=true.

--noconfigure

dhcpcd will not configure the system at all. This is only of use if the --script that dhcpcd calls at each network event configures the system instead. This is different from -T, --test mode in that it's not one shot and the only change to the environment is the addition of if_configured=false.

--nodev

Don't load any /dev management modules.

## 3RDPARTY LINK MANAGEMENT
Some interfaces require configuration by 3rd parties, such as PPP or VPN. When an interface configuration in dhcpcd is marked as STATIC or INFORM without an address then dhcpcd will monitor the interface until an address is added or removed from it and act accordingly. For point to point interfaces (like PPP), a default route to its destination is automatically added to the configuration. If the point to point interface is configured for INFORM, then dhcpcd unicasts INFORM to the destination, otherwise it defaults to STATIC.

## NOTES
dhcpcd requires a Berkeley Packet Filter, or BPF device on BSD based systems and a Linux Socket Filter, or LPF device on Linux based systems for all IPv4 configuration.

If restricting dhcpcd to a single interface and optionally address family via the command-line then all further calls to dhcpcd to rebind, reconfigure or exit need to include the same restrictive flags so that dhcpcd knows which process to signal.

Some DHCP servers implement ClientID filtering. If dhcpcd is replacing an in-use DHCP client then you might need to adjust the clientid option dhcpcd sends to match. If using a DUID in place of the ClientID, edit /var/lib/dhcpcd/duid accordingly.

## FILES
/etc/dhcpcd.conf

Configuration file for dhcpcd. If you always use the same options, put them here.

/lib/dhcpcd/dhcpcd-run-hooks

Bourne shell script that is run to configure or de-configure an interface.

/usr/lib64/dhcpcd/dev

Linux /dev management modules.

/lib/dhcpcd/dhcpcd-hooks

A directory containing Bourne shell scripts that are run by the above script. Each script can be disabled by using the -C, --nohook option described above.

/var/lib/dhcpcd/duid

Text file that holds the DUID used to identify the host.

/var/lib/dhcpcd/secret

Text file that holds a secret key known only to the host.

/var/lib/dhcpcd/interface-ssid.lease

The actual DHCP message sent by the server. We use this when reading the last lease and use the file's mtime as when it was issued.

/var/lib/dhcpcd/interface-ssid.lease6

The actual DHCPv6 message sent by the server. We use this when reading the last lease and use the file's mtime as when it was issued.

/var/lib/dhcpcd/rdm_monotonic

Stores the monotonic counter used in the replay field in Authentication Options.

/run/dhcpcd/pid

Stores the PID of dhcpcd running on all interfaces.

/run/dhcpcd/interface.pid

Stores the PID of dhcpcd running on the interface.

/run/dhcpcd/sock

Control socket to the manager daemon.

/run/dhcpcd/unpriv.sock

Unprivileged socket to the manager daemon, only allows state retrieval.

/run/dhcpcd/interface.sock

Control socket to per interface daemon.

/run/dhcpcd/interface.unpriv.sock

Unprivileged socket to per interface daemon, only allows state retrieval.

## SEE ALSO
fnmatch(3), if_nametoindex(3), dhcpcd.conf(5), resolv.conf(5), dhcpcd-run-hooks(8), resolvconf(8)

## STANDARDS
RFC 951, RFC 1534, RFC 2104, RFC 2131, RFC 2132, RFC 2563, RFC 2855, RFC 3004, RFC 3118, RFC 3203, RFC 3315, RFC 3361, RFC 3633, RFC 3396, RFC 3397, RFC 3442, RFC 3495, RFC 3925, RFC 3927, RFC 4039, RFC 4075, RFC 4242, RFC 4361, RFC 4390, RFC 4702, RFC 4074, RFC 4861, RFC 4833, RFC 4941, RFC 5227, RFC 5942, RFC 5969, RFC 6106, RFC 6334, RFC 6355, RFC 6603, RFC 6704, RFC 7217, RFC 7550, RFC 7844.

## AUTHORS
Roy Marples <roy@marples.name>

## BUGS
Please report them to https://roy.marples.name/projects/dhcpcd


dhcpcd-run-hooks

title: dhcpcd-run-hooks(8)

summary: DHCP client configuration script

text:
# dhcpcd-run-hooks(8)

## NAME
dhcpcd-run-hooks — DHCP client configuration script

## DESCRIPTION
dhcpcd-run-hooks is used by dhcpcd(8) to run any system and user defined hook scripts. System hook scripts are found in /lib/dhcpcd/dhcpcd-hooks and the user defined hooks are /etc/dhcpcd.enter-hook. and /etc/dhcpcd.exit-hook. The default install supplies hook scripts for configuring /etc/resolv.conf and the hostname. Your distribution may have included other hook scripts to say configure ntp or ypbind. A test hook is also supplied that simply echos the dhcp variables to the console from DISCOVER message.

The hooks scripts are loaded into the current shell rather than executed in their own process. This allows each hook script, such as /etc/dhcpcd.enter-hook to customise environment variables or provide alternative functions to hooks further down the chain. As such, using the shell builtins exit, exec or similar will cause dhcpcd-run-hooks to exit at that point.

Each time dhcpcd-run-hooks is invoked, $interface is set to the interface that dhcpcd is run on and $reason is set to the reason why dhcpcd-run-hooks was invoked. DHCP information to be configured is held in variables starting with the word new_ and old DHCP information to be removed is held in variables starting with the word old_. dhcpcd can display the full list of variables it knows about by using the -V, --variables argument.

Here's a list of reasons why dhcpcd-run-hooks could be invoked:

PREINIT

dhcpcd is starting up and any pre-initialisation required should be performed now.

CARRIER

dhcpcd has detected the carrier is up. This is generally just a notification and no action need be taken.

NOCARRIER

dhcpcd lost the carrier. The cable may have been unplugged or association to the wireless point lost.

NOCARRIER_ROAMING

dhcpcd lost the carrier but the interface configuration is persisted. The OS has to support wireless roaming or IP Persistence for this to happen.

INFORM | INFORM6

dhcpcd informed a DHCP server about its address and obtained other configuration details.

BOUND | BOUND6

dhcpcd obtained a new lease from a DHCP server.

RENEW | RENEW6

dhcpcd renewed its lease.

REBIND | REBIND6

dhcpcd has rebound to a new DHCP server.

REBOOT | REBOOT6

dhcpcd successfully requested a lease from a DHCP server.

RELEASE | RELEASE6

dhcpcd has released the lease.

DELEGATED6

dhcpcd assigned a delegated prefix to the interface.

IPV4LL

dhcpcd obtained an IPV4LL address, or one was removed.

STATIC

dhcpcd has been configured with a static configuration which has not been obtained from a DHCP server.

3RDPARTY

dhcpcd is monitoring the interface for a 3rd party to give it an IP address.

TIMEOUT | TIMEOUT6

dhcpcd failed to contact any DHCP servers but was able to use an old lease.

EXPIRE | EXPIRE6

dhcpcd's lease or state expired and it failed to obtain a new one.

NAK

dhcpcd received a NAK from the DHCP server. This should be treated as EXPIRE.

RECONFIGURE

dhcpcd has been instructed to reconfigure an interface.

ROUTERADVERT

dhcpcd has received an IPv6 Router Advertisement, or one has expired.

STOP | STOP6

dhcpcd stopped running on the interface.

STOPPED

dhcpcd has stopped entirely.

DEPARTED

The interface has been removed.

FAIL

dhcpcd failed to operate on the interface. This normally happens when dhcpcd does not support the raw interface, which means it cannot work as a DHCP or ZeroConf client. Static configuration and DHCP INFORM is still allowed.

TEST

dhcpcd received an OFFER from a DHCP server but will not configure the interface. This is primarily used to test the variables are filled correctly for the script to process them.

## ENVIRONMENT
dhcpcd will clear the environment variables aside from $PATH. The following variables will then be set, along with any protocol supplied ones.

$interface

the name of the interface.

$protocol

the protocol that triggered the event.

$reason

as described above.

$pid

the pid of dhcpcd.

$ifcarrier

the link status of $interface: unknown, up or down.

$ifmetric

$interface preference, lower is better.

$ifwireless

1 if $interface is wireless, otherwise 0.

$ifflags

$interface flags.

$ifmtu

$interface MTU.

$ifssid

the SSID the interface is connected to.

$interface_order

A list of interfaces, in order of preference.

$if_configured

true if dhcpcd has configured the interface otherwise false.

$if_up

true if the interface is up, otherwise false. This is more than IFF_UP and may not be equal.

$if_down

true if the interface is down, otherwise false. This is more than IFF_UP and may not be equal.

$af_waiting

Address family waiting for, as defined in dhcpcd.conf(5).

$profile

the name of the profile selected from dhcpcd.conf(5).

$new_delegated_dhcp6_prefix

space-separated list of delegated prefixes.

## FILES
When dhcpcd-run-hooks runs, it loads /etc/dhcpcd.enter-hook, any scripts found in /lib/dhcpcd/dhcpcd-hooks in lexical order, then finally /etc/dhcpcd.exit-hook.

## SEE ALSO
dhcpcd(8)

## AUTHORS
Roy Marples <roy@marples.name>

## BUGS
Please report them to https://roy.marples.name/projects/dhcpcd

## SECURITY CONSIDERATIONS
dhcpcd will validate the content of each option against its encoding. For string, ascii, raw or binhex encoding it's up to the user to validate it for the intended purpose.

When used in a shell script, each variable must be quoted correctly.


dhcpdump

package: dhcpdump

title: dhcpdump(8)

summary: DHCP packet dumper

text:
# dhcpdump(8)

## NAME
dhcpdump - DHCP packet dumper

## SYNOPSIS
dhcpdump [-h regular-expression] [-H] -i interface

dhcpdump [-h regular-expression] [-H] -r pcapfile

## DESCRIPTION
This command listens on a network interface to display the dhcp-packets for easier checking and debugging.

## USAGE
dhcpdump -i /dev/fxp0

If you want to filter a specific Client Hardware Address (CHADDR), then you can specify it as a regular expression:

dhcpdump -i /dev/fxp0 -h ^00:c0:4f

This will display only the packets with Client Hardware Addresses which start with 00:c0:4f.

Option -H will additionally show full packet hex dump.

Instead of getting live data from an interface, a pcap dump file can be used:

dhcpdump -r pcapfile

## OUTPUT

```
  TIME: 15:45:02.084272
    IP: 0.0.0.0.68 (0:c0:4f:82:ac:7f) > 255.255.255.255.67 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: 28f61b03
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:c0:4f:82:ac:7f:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  54 (  4) Server identifier         130.139.64.101
OPTION:  50 (  4) Request IP address        130.139.64.143
OPTION:  55 (  7) Parameter Request List      1 (Subnet mask)
                                              3 (Routers)
                                             58 (T1)
                                             59 (T2)
```

At the option field, the first field is the value of the option, the second one (between brackets) is the length of the option-datafield, the third field is the name of the option, the fourth field is the data of the option.

## RETURN VALUES
Always 0.

## NOTES
Privileged access is often needed for accessing the interface.

## BUGS
Not all the parameter options are printed verbose, because of lack of documentation. Not all the options are tested, because of lack of clients/servers with these options. If you have a dump of one of them, please send them to me and I'll incorporate them.

## THANKS TO
Ralph Droms and Ted Lemons "The DHCP Handbook", ISBN 1-57870-137-6.

Peter Apian-Bennewitz <apian@ise.fhg.de> for his Client Hardware Address filtering

## AUTHOR
Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)

## SEE ALSO
dhcpd(8), tcpdump(1), RFC2132


dhcping

package: dhcping

title: dhcping(8)

text:
# dhcping(8)

## NAME
dhcping - send a DHCP request to DHCP server to see if it's up and running

## SYNOPSIS
dhcping [-v] [-q] [-i] [-r] -t maxwait -c client-IP-address -s server-IP-address -h client-hardware-address [-g gateway-IP-address]

## DESCRIPTION
This command allows the system administrator to check if a remote DHCP server is still functioning.

Options are:

-v

Verbose, print some information.

-i

Use DHCPINFORM packets.

-r

Use DHCPREQUEST packets (default behaviour).

-q

Quiet, print nothing on the screen.

-t maxwait

Maximum time to wait for an answer from the server in seconds. Default is 3 seconds.

-c client-IP-address

Request this IP address. Note that this is also the IP address the answer will be sent to.

-s server-IP-address

Send the DHCP packet to this IP address.

-h client-hardware-address

Use this hardware-address in the DHCP request. It can be up to sixteen octets seperated by colons (i.e. 01:02:03:04)

-g gateway-IP-address

Use this IP address for the gateway IP address in the DHCP packet. This option is currently broken.

## RETURN VALUES
If everything goes okay, it returns 0. If there went something wrong, it returns 1.

## SETUP
This program should be installed setuid root or ran by root only. See SECURITY for more information.

On your DHCP server, add these lines to the dhcpd.conf:

```
  host <your monitoring host FQDN> {
     hardware ethernet <your monitor host mac address>;
     fixed-address     <your monitoring host IP address>;
  }
```

Then try it: $ dhcping -c your monitoring host IP address \

-s your DHCP server IP address \

-h your monitor host mac address

It will either respond with "no answer" or "Got answer from: your DHCP server IP address"

The DHCP server logfile will give:

DHCPREQUEST for 192.168.1.1 from 00:20:18:56:29:8f via ed0

DHCPACK on 192.168.1.1 to 00:20:18:56:29:8f via ed0

DHCPRELEASE of 192.168.1.1 from 00:20:18:56:29:8f via ed0 (found)

Running in DHCPINFORM mode with -i:

If you see "DHCPINFORM from 192.168.1.1 via xl0: not authoritative for subnet 192.168.1.0", you should add the authoritative statement to the subnet, See dhcpd.conf(5) for details.

When running in very verbose mode, dhcping tries to dump all data of the send and received DHCP packets. It will first dump the packet in hex-format, then decodes the header and finally the options.

## HOW IT WORKS
The client either sends a DHCPREQUEST or DHCPINFORM packet to the server and waits for an answer. Then, if a DHCPREQUEST was send, it will send a DHCPRELEASE back to the server.

## SECURITY
This program is installed setuid root as it requires the privileges to bind itself to port 68 (bootpc). Root privileges are dropped as soon as the program has bound itself to that port.

## BUGS
Currently (this may, or may not, change in the future) the ISC DHCP daemon does not write leases with a fixed IP address in the dhcpd.leases file.

DHCPINFORM packets can only be used on subnets the server is authori- tative for. If the monitoring script runs on a subnet the server isn't authoritative for, it should use the DHCPREQUEST packets. I also experienced some problems with ISC DHCPD v2 servers, but that is also in the README of it.

The -V option is still working, but shouldn't be used for debugging of the packets. Better use dhcpdump(8) for that, which is available on my website. I wanted to remove it, but decided only to do it from the documentation, not from the code. Maybe I'll need it one day for debugging.

## AUTHOR
Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)

## SEE ALSO
dhcpd(8), dhclient(8), dhcpd.conf(5), dhcpdump(8)


dictd

package: dictd

title: dictd(8)

text:
# dictd(8)

## NAME
dictd - a dictionary database server

## SYNOPSIS

```
dictd [options]
```

## DESCRIPTION
dictd is a server for the Dictionary Server Protocol (DICT), a TCP transaction based query/response protocol that allows a client to access dictionary definitions from a set of natural language dictionary databases.

For security reasons, dictd drops root permissions after startup. If user dictd exists on the system, the daemon will run as that user, group dictd, otherwise it will run as user nobody, group nobody or nogroup (depending on the operating system distribution).

Since startup time is significant, the server is designed to run continuously, and should not be run from inetd(8). (However, with a fast processor, it is feasible to do so.)

Databases are distributed separately from the server.

By default, dictd assumes that the index files are sorted alphabetically, and only alphanumeric characters from the 7-bit ASCII character set are used for search. This default may be overridden by a header in the data file. The only such features implemented at this time are the headers "00-database-allchars" which tells dictd that non-alphanumeric characters may also be used for search, the header "00-database-utf8" which indicates that the database uses utf8 encoding, and the "00-database-8bit-new" which indicates that the database is encoded and sorted according to a locale that uses an 8-bit encoding.

## BACKGROUND
For many years, the Internet community has relied on the "webster" protocol for access to natural language definitions. The webster protocol supports access to a single dictionary and (optionally) to a single thesaurus. In recent years, the number of publicly available webster servers on the Internet has dramatically decreased.

Fortunately, several freely-distributable dictionaries and lexicons have recently become available on the Internet. However, these freely-distributable databases are not accessible via a uniform interface, and are not accessible from a single site. They are often small and incomplete individually, but would collectively provide an interesting and useful database of English words. Examples include the Jargon file, the WordNet database, MICRA's version of the 1913 Webster's Revised Unabridged Dictionary, and the Free Online Dictionary of Computing. (See the DICT protocol specification (RFC) for references.) Translating and non-English dictionaries are also becoming available (for example, the FOLDOC dictionary is being translated into Spanish).

The webster protocol is not suitable for providing access to a large number of separate dictionary databases, and extensions to the current webster protocol were not felt to be a clean solution to the dictionary database problem.

The DICT protocol is designed to provide access to multiple databases. Word definitions can be requested, the word index can be searched (using an easily extended set of algorithms), information about the server can be provided (e.g., which index search strategies are supported, or which databases are available), and information about a database can be provided (e.g., copyright, citation, or distribution information). Further, the DICT protocol has hooks that can be used to restrict access to some or all of the databases.

dictd(8) is a server that implements the DICT protocol. Bret Martin implemented another server, and several people (including Bret and myself) have implemented clients in a variety of languages.

## OPTIONS
-V or --version

Display version information.

--license

Display copyright and license information.

-h or --help

Display help information.

-v or --verbose or -dverbose

Be verbose.

-c file or --config file

Specify configuration file. The default is /etc/dictd.conf , but may be changed in the defs.h file at compile time (DICTD_CONFIG_FILE).

-p port or --port port

Overrides the keyword port in Global Settings Specification section of configuration file.

-i or --inetd

Communicate on standard input/output, suitable for use from inetd. Although, due to its rather large startup time, this daemon was not intended to run from inetd, with a fast processor it is feasible to do so. This option also implies --fast-start.

--pp prog

Sets a preprocessor for configuration file. like m4 or cpp . See examples/dictd_complex.conf file from distribution. By default configuration file is parsed without preprocessor.

--depth length

Overrides the keyword depth in Global Settings Specification section of configuration file.

--delay seconds

Overrides the keyword delay in Global Settings Specification section of configuration file.

--facility facility

The same as syslog_facility keyword in Global Settings Specification of configuration files.

-f or --force

Force the daemon to start even if an instance of the daemon is already running. (This is of little value unless a non-default port is specified with -p, since, if one instance is bound to a port, the second one fails when it can not bind to the port.)

--limit children

Overrides the keyword limit in Global Settings Specification section of configuration file.

--listen-to host

Overrides the keyword listen_to in Global Settings Specification section of configuration file.

--address-family family

Overrides the keyword address_family in Global Settings Specification section of configuration file.

--locale locale

Overrides the keyword locale in Global Settings Specification section of configuration file.

-s

The same as syslog keyword in Global Settings Specification of configuration files.

-L file or --logfile file

The same as log_file keyword in Global Settings Specification of configuration files.

--pid-file file

The same as pid_file keyword in Global Settings Specification of configuration files.

-m minutes or --mark minutes

Overrides the keyword timestamp in Global Settings Specification section of configuration file.

--default-strategy strategy

Overrides the keyword default_strategy in Global Settings Specification section of configuration file.

--without-strategy strat1,strat2,...

The same as without_strategy keyword in Global Settings Specification of configuration files.

--add-strategy strategy_name:description

The same as add_strategy keyword in Global Settings Specification of configuration files.

--fast-start

The same as fast_start keyword in Global Settings Specification of configuration files.

--without-mmap

The same as without_mmap keyword in Global Settings Specification of configuration files.

--stdin2stdout

When applied with --inetd, each command obtained from stdin is output to stdout. This option is useful for debugging.

-l option or --log option

The same as log_option keyword in Global Settings Specification of configuration files.

-d option

The same as debug_option keyword in Global Settings Specification of configuration files.

## CONFIGURATION FILE
Introduction

The configuration file defaults to /etc/dictd.conf but can be specified on the command line with the -c option (see above).

The configuration file is read into memory at startup, and is not referenced again by dictd unless a signal 1 (SIGHUP) is received, which will cause dictd to reread the configuration file.

The file is divided into sections. The Access Section should come first, followed by the Database Section, and the User Section. The Database Section is required; the others are optional, but they must be in the order listed here.

Syntax

The following keywords are valid in a configuration file: access, allow, deny, group, database, data, index, filter, prefilter, postfilter, name, include, user, authonly, site. Keywords are case sensitive. String arguments that contain spaces should be surrounded by double quotes. Without quoting, strings may contain alphanumeric characters and _, -, ., and *, but not spaces. Strings can be continued between lines. \", \\, \n, \<NL> are treated as double quote, backslash, new line and no symbol respectively. Comments start with # and extend to the end of the line.

Global Settings Section

global { global settings specification }

Used to set global dictd setting such as log file, syslog facility, locale and so on.

EXAMPLE:

See examples/dictd4.conf file from the distribution.

Access Section

access { access specification }

This section contains access restrictions for the server and all of the databases collectively. Per-database control is specified in the Database Section.

EXAMPLE:

See examples/dictd3.conf file from the distribution.

Database Section

database string { database specification }

The string specifies the name of the database (e.g., wn or web1913). (This is an arbitrary name selected by the administrator, and is not necessarily related to the file name or any name listed in the data file. A short, easy to type name is often selected for easy use with dict -d.)

EXAMPLE: See examples/dictd*.conf files from the distribution.

NOTE: If the files specified in the database specification do not exist on the system, dictd may silently fail.

database_virtual string { virtual database specification }

This section specifies the virtual database. The string specifies the name of the database (e.g., en-ru or fren).

EXAMPLE: See examples/dictd_virtual.conf or examples/dictd_complex.conf files from the distribution.

database_plugin string { plugin specification }

This section specifies the plugin. The string specifies the name of the database.

EXAMPLE: See examples/dictd_plugin_dbi.conf or examples/dictd_complex.conf files from the distribution.

database_mime string { mime specification }

Traditionally, databases created for dictd contained plain text only because dictd releases before 1.10.0 didn't have full support of OPTION MIME option (consult with RFC-2229). This section describes the special database which behaves differently depending on whether OPTION MIME command was received from client or was not, i.e. the database created by this section allows to return to the client either a plain text or specially formatted content depending on whether DICT client supports (or wants to receive) MIMEized content or doesn't. The string specifies the name of the database.

NOTE: All this is about DEFINE command only. MATCH, SHOW DB, SHOW STRAT, SHOW INFO, SHOW SERVER and HELP commands return texts prepended with empty line only.

EXAMPLE: See examples/dictd_mime.conf file from the distribution.

database_exit

Excludes following databases from the '*' database. By default '*' means all databases available. Look at 'examples/dictd_virtual.conf' file for example configuration.

NOTE: If you use 'virtual' dictionaries, you should use this directive, otherwise you will search the same dictionary twice.

User Section

user string string

The first string specifies the username, and the second string specifies the shared secret for this username. When the AUTH command is used, the client will provide the username and a hashed version of the shared secret. If the shared secret matches, the user is said to have authenticated, and will have access to databases whose access specifications allow that user (by name, or by wildcard). If present, this section must appear last in the configuration file. There may be many user entries. The shared secret should be kept secret, as anyone who has access to it can access the shared databases (assuming access is not denied by domain name).

Access Specification

Access specifications may occur in the Access Section or in the Database Section. The access specification will be described here. For allow, deny, and authonly, a star (*) may be used as a wild card that matches any number of characters. A question mark (?) may be used as a wildcard that matches a single character. For example, 10.0.0.* and *.edu are valid strings.

Further, a range of IP addresses and an IP address followed by a netmask may be specified. For example, 10.0.0.0:10.0.0.255, 10.0.0.0/24, and 10.0.0.* all specify the same range of IP numbers. Notation cannot be combined on the same line. If the notation does not make sense, access will be denied by default. Use the --debug auth option to debug related problems.

Note that these specifications take only one string per specification line. However, you can have multiple lines of each type.

The syntax is as follows:

allow string

The string specifies a domain name or IP address which is allowed access to the server (in the Access Section) or to a database (in the Database Section). Note that more than one string is not permitted for a single "allow" line, but more than one "allow" lines are permitted in the configuration file.

deny string

The string specifies a domain name or IP address which is denied access to the server (in the Access Section) or to a database (in the Database Section). Note that if reverse DNS is not working, then only the IP number will be checked. Therefore, it is essential to deny networks based on IP number, since a denial based on domain name may not always be checked.

authonly string

This form is only useful in the Access Section. The string specifies a domain name or IP address which is allowed access to the server but not to any of the databases. All commands are valid except DEFINE, MATCH, and SHOW DB. More specifically AUTH is a valid command, and commands which access the databases are not allowed.

user string

This form is only useful in the Database Section. The string specifies a username that is allowed to access this database after a successful AUTH command is executed.

Global Settings Specification

This section describes the following parameters: port string_or_number

Specifies the port or service name (e.g., 2628). The default is 2628, as specified in the DICT Protocol RFC, but may be changed in the defs.h file at compile time (DICT_DEFAULT_SERVICE).

site string

Used to specify the filename for the site information file, a flat text file which will be displayed in response to the SHOW SERVER command.

EXAMPLE: See examples/dictd4.conf file from the distribution.

site_no_banner boolean

By default SHOW SERVER command outputs information about dictd version and an operating system type. This option disables this.

site_no_uptime boolean

By default SHOW SERVER command outputs information about uptime of dictd , a number of forks since startup and forks per hour. This option disables this.

site_no_dblist boolean

By default SHOW SERVER command outputs internal information about databases, such as a number of headwords, index size and so on. This option disables this.

delay number

Specifies the number of seconds a client may be idle before the server will close the connection. Idle time is defined to be the time the server is waiting for input and does not include the time the server spends searching the database. The default is 0 seconds (no limit), but may be changed in the defs.h file at compile time (DICT_DEFAULT_DELAY).

NOTE: Setting delay option disables limit_time option. Only one of them (last specified in dictd.conf ) is in effect. NOTE: Connections are closed without warning since no provision for premature connection termination is specified in the DICT protocol RFC.

depth number

Specify the queue length for listen(2). Specifies the number of pending socket connections which are queued by the operating system. Some operating systems may silently limit this value to 5 (older BSD systems) or 128 (Linux). The default is 10 but may be changed in the defs.h file at compile time (DICT_QUEUE_DEPTH).

limit_childs number

Specifies the number of daemons that may be running simultaneously. Each daemon services a single connection. If the limit is exceeded, a (serialized) connection will be made by the server process, and a response code 420 (server temporarily unavailable) will be sent to the client. This parameter should be adjusted to prevent the server machine from being overloaded by dict clients, but should not be set so low that many clients are denied useful connections. The default is 100, but may be changed in the defs.h file at compile time (DICT_DAEMON_LIMIT_CHILDS).

limit number

Synonym for limit_childs. For backward compatibility only.

limit_matches number

Specifies the maximum number of matches that can be returned by MATCH query. Zero means no limit. The default is 2000.

limit_definitions number

Specifies the maximum number of definitions that can be returned by DEFINE query. Zero means no limit. The default is 200.

limit_time number

Specifies the number of seconds a client may talk to the server before the server will close the connection. The default is 600 seconds (10 minutes), but may be changed in the defs.h file at compile time (DICT_DEFAULT_LIMIT_TIME).

NOTE: Setting limit_time option disables delay option. Only one of them (last specified in dictd.conf ) is in effect.

NOTE: Connections are closed without warning since no provision for premature connection termination is specified in the DICT protocol RFC.

limit_queries number

Specifies the number of queries (MATCH, DEFINE, SHOW DB etc.) that client may send to the server before the server will close the connection. Zero means no limit. The default is 2000, but may be changed in the defs.h file at compile time (DICT_DEFAULT_LIMIT_QUERIES).

timestamp number

How often a timestamp should be logged (int minutes). (This is effective only if logging has been enabled with the -s or -L option, or with a debugging option.)

log_option option

Specify a logging option. This is effective only if logging has been enabled with the -s or -L option or in configuration file, or logging to the console has been activated with a debugging option (e.g., --debug nodetach. Only one option may be set with each invocation of this option; however, multiple invocations of this option may be made in configuration file or dictd command line. For instance:

dictd -s --log stats --log found --log notfound

is a valid command line, and sets three logging options.

Some of the more verbose logging options are used primarily for debugging the server code, and are not practical for normal use.

server

Log server diagnostics. This is extremely verbose.

connect

Log all connections.

stats

Log all children terminations.

command

Log all commands. This is extremely verbose.

client

Log results of CLIENT command.

found

Log all words found in the databases.

notfound

Log all words not found in the databases.

timestamp

When logging to a file, use a full timestamp like that which syslog would produce. Otherwise, no timestamp is made, making the files shorter.

host

Log name of foreign host.

auth

Log authentication failures.

min

Set a minimal number of options. If logging is activated (to a file, or via syslog), and no options are set, then the minimal set of options will be used. If options are set, then only those options specified will be used.

all

Set all of the options.

none

Clear all of the options.

To facilitate location of interesting information in the log file, entries are marked with initial letters indicating the class of the line being logged:

I

Information about the server, connections, or termination statistics. These lines are generally not designed to be parsed automatically.

E

Error messages.

C

CLIENT command information.

D

Definitions found in the databases searched.

M

Matches found in the database searched.

N

Matches which were not found in the databases searched.

T

Trace of exact line sent by client.

A

Authentication information.

To preserve anonymity of the client, do not use the connect or host options. Clients may or may not send host information using the CLIENT command, but this should be an option that is selectable on the client side.

debug_option string

Activate a debugging option. There are several, all of which are only useful to developers. They are documented here for completeness. A list can be obtained interactively by using -d with an illegal option.

verbose

The same as -v or --verbose. Adds verbosity to other options.

scan

Debug the scanner for the configuration file.

parse

Debug the parser for the configuration file.

search

Debug the character folding and binary search routines.

init

Report database initialization.

port

Log client-side port number to the log file.

lev

Debug Levenshtein search algorithm.

auth

Debug the authorization routines.

nodetach

Do not detach as a background process. Implies that a copy of the log file will appear on the standard output.

nofork

Do not fork daemons to service requests. Be a single-threaded server. This option implies nodetach, and is most useful for using a debugger to find the point at which daemon processes are dumping core.

alt

Debugs altcompare in index.c.

locale string

Specifies the locale used for searching. If no locale is specified, the "C" locale is used. The locale used for the server should be the same as that used for dictfmt when the database was built (specifically, the locale under which the index was sorted). The locale should be specified for both 8-bit and UTF-8 formats. If locale contains utf8 or utf-8 substring, UTF-8 format is expected. Note that if your database is not in ASCII7 or UTF-8 format, then the dictd server will not be compliant to RFC 2229.

NOTE If utf-8 or 8-bit dictionaries are included in the configuration file, and the appropriate --locale has not been specified, dictd will fail to start. This implies that dictd will not run with both utf-8 and 8-bit dictionaries in the configuration file.

add_strategy strategy_name description

Adds strategy strategy_name with the description description. This new search strategy may be implemented with a help of plugins. Both strategy_name and description are strings.

default_strategy string

Set the server's default search strategy for MATCH search type. The compiled-in default is 'lev'. It is also possible to set default strategy per database. See default_strategy keyword in Database specification section.

disable_strategy string

Disable specified strategies. By default all implemented search strategies are enabled. It is also possible to disable strategies per database. See disable_strategy keyword in Database specification section.

listen_to host

Local host name or IP address for bind. If unspecified or *, dictd will bind to all interfaces. Otherwise, dictd will bind to this address only.

address_family family

If 4, address family is IPv4 (the default), if 6, address family is IPv6.

syslog string

Log using the syslog(3) facility.

syslog_facility string

Specifies the syslog facility to use. The use of this option implies the -s option to turn on logging via syslog. When the operating system libraries support SYSLOG_NAMES, the names used for this option should be those listed in syslog.conf(5). Otherwise, the following names are used (assuming the particular facility is defined in the header files): auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, and local7.

log_file string

Specify the file for logging. The filename specified is recomputed on each use using the strftime(3) call. For example, a filename ending in ".%Y%m%d" will write to log files ending in the year, month, and date that the log entry was written.

NOTE: If dictd does not have write permission for this file, it will silently fail.

pid_file string

The specified filename will be created to contain the process id of the main dictd process. The default is /var/run/dictd.pid

fast_start

By default, dictd creates (in memory) additional index to make the search faster. This option disables this behaviour and makes startup faster.

without_mmap

do not use the mmap(2) function and read entire files into memory instead. Use this option, if you know exactly what you are doing.

Database Specification

The database specification describes the database: data string

Specifies the filename for the flat text database. If the filename does not begin with '.' or '/', it is prepended with $datadir/. It is a compile time option. You can change this behaviour by editing Makefile or running ./configure --datadir=...

index string

Specifies the filename for the index file. Path matter is similar to that described above in "data" option .

index_suffix string

This is optional index file to make 'suffix' search strategy faster (binary search). It is generated by 'dictfmt_index2suffix'. Run "dictfmt_index2suffix --help" for more information. Path matter is similar to that described above in "data" option .

index_word string

This is optional index file to make 'word' search strategy faster (binary search). It is generated by 'dictfmt_index2word'. Run "dictfmt_index2word --help" for more information. Path matter is similar to that described above in "data" option .

prefilter string

Specifies the prefilter command. When a chunk of the compressed database is read, it will be filtered with this filter before being decompressed. This may be used to provide some additional compression that knows about the data and can provide better compression than the LZ77 algorithm used by zlib.

postfilter string

Specifies the postfilter command. When a chunk of the compressed database is read, it will be filtered with this filter before the offset and length for the entry are used to access data. This is provided for symmetry with the prefilter command, and may also be useful for providing additional database compression.

filter string

Specifies the filter command. After the entry is extracted from the database, it will be filtered with this filter. This may be used to provide formatting for the entry (e.g., for html).

name string

Specifies the short name of the database (e.g., "1913 Webster's"). If the string begins with @, then it specifies the headword to look up in the dictionary to find the short name of the database. The default is "@00-database-short", but this may be changed in the defs.h file at compile time (DICT_SHORT_ENTRY_NAME).

info string

Specifies the information about database. If the string begins with @, then it specifies the headword to look up in the dictionary to find information. The default is "@00-database-info", but this may be changed in the defs.h file at compile time (DICT_INFO_ENTRY_NAME).

invisible

Makes dictionary invisible to the clients i.e. this dictionary will not be recognized or shown by DEFINE, MATCH, SHOW INFO, SHOW SERVER and SHOW DB commands. If some definitions or matches are found in invisible dictionary, the name of the upper visible virtual dictionary is returned. Dictionaries '*' and '!' don't include invisible ones. NOTE: Invisible dictionaries are completely inaccessible (and invisible) to the client unless they are included to the virtual or MIME dictionary (See database_virtual or database_mime database sections).

disable_strategy string

Disables the specified strategy for database. This may be useful for slow dictionaries (plugins) or for dictionaries included to virtual ones. For an example see file examples/dictd_complex.conf.

default_strategy string

Specifies the strategy which will be used if the database is accessed using the strategy '.'. I.e. this directive is the way to set the preferred search strategy per database. For example, instead of strategy lev , the strategy word may be preferred for databases mainly containing the multiword phrases but the single words.

Virtual Database Specification

The virtual database specification describes the virtual database: database_list string

Specifies a list of databases which are included into the virtual database. Database names are in the string and are separated by comma.

name string

Specifies the short name of the database. See database specification

info string

Specifies the information about database. See database specification

invisible

Makes dictionary invisible to the clients. See database specification

disable_strategy string

Disables the specified strategy for database. See database specification

Plugin Specification

plugin string

Specifies a filename of the plugin.

data string

Specifies data for initializing plugin.

name string

Specifies the short name of the database. See Database Specification for more information.

info string

Specifies the information about database. See Database Specification for more information.

invisible

Makes dictionary invisible to the clients. See Database Specification for more information.

disable_strategy string

Disables the specified strategy for database. See Database Specification for more information.

default_strategy string

Sets the default search strategy for database. See Database Specification for more information.

Mime Specification

dbname_nomime string

Specifies the real database name which is used in case OPTION MIME command was NOT received from a client.

dbname_mime string

Specifies the real database name which is used in case OPTION MIME command WAS received from a client. A necessary MIME header is set while creating a database. See dictfmt(1) for option --mime-header.

name string

Specifies the short name of the database. See Database Specification for more information.

info string

Specifies the information about database. See Database Specification for more information.

invisible

Makes dictionary invisible to the clients. See Database Specification for more information.

disable_strategy string

Disables the specified strategy for database. See Database Specification for more information.

default_strategy string

Sets the default search strategy for database. See Database Specification for more information.

include string

The text of the file "string" (usually a database specification) will be read as if it appeared at this location in the configuration file. Nested includes are not permitted.

## DETERMINATION OF ACCESS LEVEL
When a client connects, the global access specification is scanned, in order, until a specification matches. If no access specification exists, all access is allowed (e.g., the action is the same as if "allow *" was the only item in the specification). For each item, both the hostname and IP are checked. For example, consider the following access specification:

allow 10.42.*

authonly *.edu

deny *

With this specification, all clients in the 10.42 network will be allowed access to unrestricted databases; all clients from *.edu sites will be allowed to authenticate, but will be denied access to all databases, even those which are otherwise unrestricted; and all other clients will have their connection terminated immediately. The 10.42 network clients can send an AUTH command and gain access to restricted databases. The *.edu clients must send an AUTH command to gain access to any databases, restricted or unrestricted. When the AUTH command is sent, the access list for each database is scanned, in order, just as the global access list is scanned. However, after authentication, the client has an associated username. For example, consider the following access specification:

user u1

deny *.com

user u2

allow *

If the client authenticated as u1, then the client will have access to this database, even if the client comes from a *.com site. In contrast, if the client authenticated as u2, the client will only have access if it does not come from a *.com site. In this case, the "user u2" is redundant, since that client would also match "allow *". Warning: Checks are performed for domain names and for IP addresses. However, if reverse DNS for a specific site is not working, it is possible that a domain name may not be available for checking. Make sure that all denials use IP addresses. (And consider a future enhancement: if a domain name is not available, should denials that depend on a domain name match anything? This is the more conservative viewpoint, but it is not currently implemented.)

## SEARCH ALGORITHMS
The DICT standard specifies a few search algorithms that must be implemented, and permits others to be supported on a server-dependent basis. The following search strategies are supported by this server. Note that all strategies are case insensitive. Most ignore non-alphanumeric, non-whitespace characters.

exact

An exact match. This algorithm uses a binary search and is one of the fastest search algorithms available.

lev

The Levenshtein algorithm (string edit distance of one). This algorithm searches for all words which are within an edit distance of one from the target word. An "edit" means an insertion, deletion, or transposition. This is a rapid algorithm for correcting spelling errors, since many spelling errors are within a Levenshtein distance of one from the original word.

prefix

Prefix match. This algorithm also uses a binary search and is very fast.

nprefix

Like prefix but returns the specified range of matches. For example, when prefix strategy returns 1000 matches, you can get only 100 ones skipping the first 800 matches. This is made by specified these limits in a query like this: 800#100#app, where 800 is skip count, 100 is a number of matches you want to get and "app" is your query. This strategy allows to implement DICT client with fast autocompletion (although it is not trivial) just like many standalone dictionary programs do.

NOTE: If you access the dictionary "*" (or virtual one) with nprefix strategy, the same range is set for each database in it, but globally for all matches found in all databases.

NOTE: In case you access non-english dictionary the returned matches may be (and mostly will be) NOT ordered in alphabetic order.

re

POSIX 1003.2 (modern) regular expression search. Modern regular expressions are the ones used by egrep(1). These regular expressions allow predefined character classes (e.g., [[:alnum:]], [[:alpha:]], [[:digit:]], and [[:xdigit:]] are useful for this application); uses * to match a sequence 0 or more matches of the previous atom; uses + to match a sequence of 1 or more matches of the previous atom; uses ? to match a sequence of 0 or 1 matches of the previous atom; used ^ to match the beginning of a word, uses $ to match the end of a word, and allows nested subexpression and alternation with () and |. For example, "(foo|bar)" matches all words that contain either "foo" or "bar". To match these special characters, they must be quoted with two backslashes (due to the quoting characteristics of the server). Warning: Regular expression matches can take 10 to 300 times longer than substring matches. On a busy server, with many databases, this can required more than 5 minutes of waiting time, depending on the complexity of the regular expression.

regexp

Old (basic) regular expressions. These regular expressions don't support |, +, or ?. Groups use escaped parentheses. While modern regular expressions are generally easier to use, basic regular expressions have a back reference feature. This can be used to match a second occurrence of something that was already matched. For example, the following expression finds all words that begin and end with the same three letters:

```
    ^\\(...\\).*\\1$
```

Note the use of the double backslashes to escape the special characters. This is required by the DICT protocol string specification (a single backslash quotes the next character -- we use two to get a single backslash through to the regular expression engine). Warning: Note that the use of backtracking is even slower than the use of general regular expressions.

soundex

The Soundex algorithm, a classic algorithm for finding words that sound similar to each other. The algorithm encodes each word using the first letter of the word and up to three digits. Since the first letter is known, this search is relatively fast, and it sometimes good for correcting spelling errors when the Levenshtein algorithm doesn't help.

substring

Match a substring anywhere in the headword. This search strategy uses a modified Boyer-Moore-Horspool algorithm. Since it must search the whole index file, it is not as fast as the exact and prefix matches.

suffix

Suffix match. This search strategy also uses a modified Boyer-Moore-Horspool algorithm, and is as fast as the substring search. If the optional index_suffix string file is listed in the configuration file this search is much faster.

word

Match any single word, even if part of a multi-word entry. If the optional index_word string file is listed in the configuration file this search strategy works much faster.

first

Match the first word that begins a multi-word entry.

last

Match the last word that ends a multi-word entry. If the optional index_suffix string file is listed in the configuration file this search strategy works much faster.

## DATABASE FORMAT
Databases for dictd are distributed separately. A database consists of two files. One is a flat text file, the other is the index.

The flat text file contains dictionary entries (or any other suitable data), and the index contains tab-delimited tuples consisting of the headword, the byte offset at which this entry begins in the flat text file, and the length of the entry in bytes. The offset and length are encoded using base 64 encoding using the 64-character subset of International Alphabet IA5 discussed in RFC 1421 (printable encoding) and RFC 1522 (base64 MIME). Encoding the offsets in base 64 saves considerable space when compared with the usual base 10 encoding, while still permitting tab characters (ASCII 9) to be used for delimiting fields in a record. Each record ends with a newline (ASCII 10), so the index file is human readable.

Some headwords are used by dictd especially

00-database-info Containts the information about database which is returned by SHOW INFO command, unless it is specified in the configuration file.

00-database-short Containts the short name of the database which is returned by SHOW DB command, unless it is specified in the configuration file. See dictfmt -s.

00-database-url URL where original dictionary sources were obtained from. See dictfmt -u. This headword is not used by dictd

00-database-utf8 Presents if dictionary is encoded using UTF-8. See dictfmt --utf8

00-database-8bit-new Presents if dictionary is encoded using 8-BIT character set (not ASCII and not UTF8). See dictfmt --locale.

The flat text file may be compressed using gzip(1) (not recommended) or dictzip(1) (highly recommended). Optimal speed will be obtained using an uncompressed file. However, the gzip compression algorithm works very well on plain text, and can result in space savings typically between 60 and 80%. Using a file compressed with gzip(1) is not recommended, however, because random access on the file can only be accomplished by serially decompressing the whole file, a process which is prohibitively slow. dictzip(1) uses the same compression algorithm and file format as does gzip(1), but provides a table that can be used to randomly access compressed blocks in the file. The use of 50-64kB blocks for compression typically degrades compression by less than 10%, while maintaining acceptable random access capabilities for all data in the file. As an added benefit, files compressed with dictzip(1) can be decompressed with gzip(1) or zcat(1). (Note: recompressing a dictzip'd file using, for example, znew(1) will destroy the random access characteristics of the file. Always compress data files using dictzip(1).)

## SIGNALS
SIGHUP causes dictd to reread configuration file and reinitialize databases.

SIGUSR1 causes dictd to unload databases. Then dictd returns 420 status (instead of 220). To load databases again, send SIGHUP signal. Because database files are mmap'ed(2) , it is impossible to update them while dictd is running. So, if you need to update database files and reread configuration file, first, send SIGUSR1 signal to dictd to unload databases, update files, and then send SUGHUP signal to load them again.

## COPYING
The main source files for the dictd server and the dictzip compression program were written by Rik Faith (faith@dict.org) and are distributed under the terms of the GNU General Public License. If you need to distribute under other terms, write to the author.

The main libraries used by these programs (zlib, regex, libmaa) are distributed under different terms, so you may be able to use the libraries for applications which are incompatible with the GPL -- please see the copyright notices and license information that come with the libraries for more information, and consult with your attorney to resolve these issues.

## BUGS
The regular expression searches do not ignore non-whitespace, non-alphanumeric characters as do the other searches. In practice, this isn't much of a problem.

## WARNINGS
Conformance of regular expressions (used by 're' and 'regexp' search strategies) to ERE and BRE depends on library you build dictd with. Whether 're' and 'regex' strategies support utf8 depends on library you build dictd with.

## FILES
/etc/dictd.conf

dictd configuration file

/usr/sbin/dictd

dictd daemon itself

/var/run/dictd.pid

File for storing pid of dictd daemon

/usr/share

The default directory for dictd databases (.index and .dict[.dz] files)

## SEE ALSO
examples/dictd*.conf, dictfmt(1), dict(1), dictzip(1), gunzip(1), zcat(1), webster(1), RFC 2229


diod

package: diod

title: diod(8)

summary: distributed I/O daemon

text:
# diod(8)

## NAME
diod - distributed I/O daemon

## SYNOPSIS
diod [OPTIONS]

## DESCRIPTION
diod is the distributed I/O daemon server, which implements I/O forwarding on Linux clusters.

Configuration is read from the diod.conf (5) config file. Some configuration can be overridden on the command line, as described below.

## OPTIONS
-f, --foreground

Do not change working directory to /var/lib/run, drop the controlling terminal, or run in the background. Send logs to stderr not syslog, unless sent somewhere else by -L.

-r, --rfdno INT

-w, --wfdno INT

Serve a connected client inherited on the specified read and write file descriptors. For file descriptors connected bidirectionally, the two options may be set to the same value.

-l, --listen address

Set the listen address. The address may be in the form of HOST:PORT, IP:PORT, or /path/to/unix_domain_socket form (default 0.0.0.0:564). This option may be specified more than once. It overrides the listen config file setting.

-t, --nwthreads INT

Set the number of worker threads to spawn to handle 9P operations for each unique aname. This option overrides the nwthreads setting in diod.conf (5). The default is 16.

-e, --export PATH

Set the file system to be exported. This option may be specified more than once. It overrides the exports setting in diod.conf (5).

-E, --export-all

Export everything in the server's /proc/mounts.

-o, --export-opts OPT[,OPT,...]

Set global export options. This option overrides the exportopts setting in diod.conf (5).

-n, --no-auth

This option allows users to attach without security credentials. It overrides the auth_required setting in diod.conf (5).

-N, --no-userdb

This option disables password/group lookups. It allows any uid to attach and assumes gid=uid, and supplementary groups contain only the primary gid. It overrides the userdb setting in diod.conf (5).

-S, --allsquash

Remap all users to the squash user. The attaching user need not be present in the server's password file. This option overrides the allsquash setting in diod.conf (5).

-U, --squashuser

Set the squash user. The default is nobody. This option overrides the squashuser setting in diod.conf (5). Note: if diod is not run as root, the effective uid overrides the squashuser.

-u, --runas-uid UID

Run the server as UID and only allow that user to attach. If invoked as root, diod sets real and effective uid, gid, and supplementary groups to those belonging to UID.

-L, --logdest DEST

Set the destination for logging. Possible destinations are syslog:facility:level, stderr, stdout, or a file name. This option overrides the logdest setting in diod.conf (5).

-d, --debug MASK

Set the debug mask. The bit values are:

0x01 - log decoded 9P protocol messages

-c, --config-file PATH

Set config file path.

## FILES
/usr/sbin/diod

/etc/diod.conf

## SEE ALSO
diod.conf (5), mount.diod (8), hosts_access (5)


diodcat

title: diodcat(8)

text:
# diodcat(8)

## NAME
diodcat - cat files by attaching directly to diod server

## SYNOPSIS
diodcat [OPTIONS] [-s NAME] [-a aname] [file [file...]]

## DESCRIPTION
diodcat connects to a diod server, attaches to the mount point aname, and concatenates the contents of the specified files on stdout.

## OPTIONS
-a, --aname NAME

The file system name on the server (default "ctl"). Note that the "ctl" synthetic file system must be explicitly exported.

-s, --server NAME

The server in IP[:PORT], HOST[:PORT], or /path/to/socket form (default localhost:564).

-m, --msize SIZE

The maximum request size including 9P headers (default 65536).

-u, --uid UID

Try to attach to the server as the specified user (default your effective uid).

-t, --timeout SECS

Force timeout after specified number of seconds (default no timeout).

-p, --privport

Connect from a socket bound to a port in the range of 512-1023, available to root only. This can be used in conjunction with the privport export option.

## SEE ALSO
diod (8)


dioddate

title: dioddate(8)

summary: get server system time

text:
# dioddate(8)

## NAME
dioddate - get server system time

## SYNOPSIS
dioddate [OPTIONS] [-s NAME] [file [file...]]

## DESCRIPTION
dioddate obtains the current system time and zone information from a diod server by reading ctl:date. If the --set-time option is specified, sets the local system time on the client; otherwise prints the server time on stdout.

This is a simple way to obtain rough time synchronization before issuing a MUNGE-authenticated attach request, for example in a bootstrap environment where the "ctl" synthetic file system is exported with the "noauth" option.

## OPTIONS
-s, --server NAME

The server in IP[:PORT], HOST[:PORT], or /path/to/socket form (default localhost:564).

-m, --msize SIZE

The maximum request size including 9P headers (default 65536).

-u, --uid UID

Try to attach to the server as the specified user (default your effective uid).

-t, --timeout SECS

Force timeout after specified number of seconds (default no timeout).

-S, --set-time

Set the local system time to match the server's time.

## SEE ALSO
diod (8)


diodload

title: diodload(8)

summary: create artificial diod load

text:
# diodload(8)

## NAME
diodload - create artificial diod load

## SYNOPSIS
diodload [OPTIONS] [-s NAME]

## DESCRIPTION
diodload connects to a diod server and issues requests. Unless changed with -g, each thread copies from ctl:zero to ctl:null. Note that the "ctl" synthetic file system must be explicitly exported.

## OPTIONS
-s, --server NAME

The server in IP[:PORT], HOST[:PORT], or /path/to/socket form default localhost:564).

-m, --msize SIZE

Specifiy the maximum size of a protocol unit (default 65536).

-r, --runtime SECS

Specify the runtime in seconds (default 10).

-n, --numthreads NUM

Specify the number of concurrent threads making requests (default 16).

-g, --getattr

Issue a stream of getattrs on ctl:null instead of the default load.

## SEE ALSO
diod (8)


diodls

title: diodls(8)

text:
# diodls(8)

## NAME
diodls - list files by attaching directly to diod server

## SYNOPSIS
diodls [OPTIONS] [-s NAME] [-a aname] [file [file...]]

## DESCRIPTION
diodls connects to a diod server, attaches to the mount point aname, and lists the specified files or directories.

## OPTIONS
-a, --aname NAME

The file system name on the server (default ctl). Note that the "ctl" synthetic file system must be explicitly exported.

-s, --server NAME

The server in IP[:PORT], HOST[:PORT], or /path/to/socket form (default localhost:564).

-m, --msize SIZE

The maximum request size including 9P headers (default 65536).

-u, --uid UID

Try to attach to the server as the specified user (default your effective uid).

-t, --timeout SECS

Force timeout after specified number of seconds (default no timeout).

-l, --long

List stat information in addition to file names.

-p, --privport

Connect from a socket bound to a port in the range of 512-1023, available to root only. This can be used in conjunction with the privport export option.

## SEE ALSO
diod (8)


diodmount

title: diodmount(8)

summary: mount diod file systems

text:
# diodmount(8)

## NAME
mount.diod - mount diod file systems

## SYNOPSIS
mount.diod [OPTIONS] host[:aname] dir [-o options]

## DESCRIPTION
mount.diod is the mount utility for the distributed I/O daemon, which is an I/O forwarding service for Linux clusters built upon the Linux 9p file system.

mount.diod performs two main tasks: 1) connect and authenticate to the diod server, and 2) issue the mount(2) system call with appropriate mount options.

Authentication with the diod server takes place in user space. The connected (and authenticated) file descriptor is passed as a mount option to the kernel 9p file system

This command requires root to execute the mount(2) system call.

The 9p file system must support the 9P2000.L protocol variant, e.g. kernel 2.6.38 or above.

The host portion of the mount spec may optionally be supplied in hostlist format, e.g. host1,host2,host3:aname or host[1-3]:aname, in which case hosts are tried in order until a successful connection is obtained. Post-connect mount errors are immediately fatal.

If the host portion of the mount spec begins with a forward-slash (/), it refers to the path to a UNIX domain socket.

## COMMAND LINE OPTIONS
-f, --fake-mount

Do everything except the mount system call.

-n, --no-mtab

Do not update the system mtab.

-v, --verbose

Set verbose mode.

-o, --options opt[,opt,...]

Set mount options (see below).

## MOUNT OPTIONS
The following file system specific mount options are handled by mount.diod.

aname=name

The aname is the path of the exported file system on the server. It can be specified in the mount spec in host:aname format like NFS, or it can be specified with this option. diod will not allow an attach to an empty aname. diod has a built-in synthetic control file system that can be mounted with aname of ctl. Note that "ctl" must be explicitly exported.

uname=name

The user name to authenticate to the diod server. The default is uname=root.

access=mode

Select the access mode. access=user (default) causes the mount to support multiple users, and requires root authentication. access=<uid> restricts access at the client to only the specified user.

port=n

Connect to the diod server on the specified port. The default is the IANA-assigned 9pfs port 564.

trans=name

Select a transport. mount.diod only supports trans=fd because of its strategy for authentication.

rfdno=n,wfdno=n

The file descriptor for reading and writing with trans=fd. If set, mount.diod assumes this file descriptor is already connected to a diod server and ignores host in the device specification, and the port=n option.

msize=n

The msize is the max 9P packet payload size. The default is 65512 (65536-24)

version=name

Select 9P protocol version. diod only supports 9p2000.L.

cache=mode

Specify a caching policy. By default, no caches are used. If cache=loose, no attempts are made at consistency. This mode is intended for exclusive, read-only mounts. If cache=fscache, use FS-Cache for a persistent, read-only cache backend.

cachetag

In the context of cache=fscache, select the cache tag to use for this session. Cache tags for existing cache sessions are listed in /sys/fs/9p/caches.

nodevmap

Do not map special files. Represent them as normal files. This can be used to share devices/named pipes/sockets between hosts.

debug=n

Specifies debug level for the kernel 9p module. The debug level is a bitmask.

0x01 = display verbose error messages

0x02 = developer debug (DEBUG_CURRENT)

0x04 = display 9p trace

0x08 = display VFS trace

0x10 = display Marshalling debug

0x20 = display RPC debug

0x40 = display transport debug

0x80 = display allocation debug

0x100 = display protocol message debug

0x200 = display Fid debug

0x400 = display packet debug

0x800 = display fscache tracing debug

The debug level is global, i.e. it applies to all 9P file systems and it remains set after the file system is unmounted. The default is debug=0.

## SEE ALSO
diod (8)


diodshowmount

title: diodshowmount(8)

summary: list diod server connections

text:
# diodshowmount(8)

## NAME
diodshowmount - list diod server connections

## SYNOPSIS
diodshowmount [OPTIONS] [-s NAME]

## DESCRIPTION
diodshowmount connects to a diod server and displays a list of clients connected to that server in hostlist format, with domain name suffixes stripped. With no options, it reads "ctl:version" from "localhost". Note that the "ctl" synthetic file system must be explicitly exported.

## OPTIONS
-s, --server NAME

The server in IP[:PORT], HOST[:PORT], or /path/to/socket form (default localhost:564).

-m, --msize SIZE

The maximum request size including 9P headers (default 65536).

-u, --uid UID

Try to attach to the server as the specified user (default your effective uid).

-t, --timeout SECS

Force timeout after specified number of seconds (default no timeout).

-l, --long

List clients one per line without removing domain name suffixes, if any.

## SEE ALSO
diod (8)


dtop

title: dtop(8)

summary: display diod performance

text:
# dtop(8)

## NAME
dtop - display diod performance

## SYNOPSIS
dtop [-h hostlist] [OPTIONS]

## DESCRIPTION
dtop connects to diod servers and displays performance information.

## OPTIONS
-h, --hostlist HOSTS

Specify the lists of diod servers that dtop monitors. Multiple hosts may be separated by commas, and host ranges may be included in the list, e.g. x[1-3,42] is equivalent to x1,x2,x3,x42. By default, dtop monitors localhost. Note that dtop uses the "ctl" synthetic file system. "ctl" must be explicitly exported.

-P, --poll-period SEC

Set the polling period. SEC may be a floating point number. The default is 1 second.

-p, --port PORT

Specify the server port number for all monitored servers (default 564).

## SEE ALSO
diod (8)