kxdpgun

package: knot-utils

title: kxdpgun(8)

summary: XDP-powered DNS benchmarking tool

text:
# kxdpgun(8)

## NAME
kxdpgun - XDP-powered DNS benchmarking tool

## SYNOPSIS
kxdpgun [options] -i filename target

## DESCRIPTION
Powerful generator of DNS traffic, sending and receiving packets through XDP.

Queries are generated according to a textual file which is read sequentially in a loop until a configured duration elapses. The order of queries is not guaranteed. Responses are received (unless disabled) and counted, but not checked against queries.

The number of parallel threads is autodetected according to the number of queues configured for the network interface.

### Parameters
filename

Path to the queries file. See the description below regarding the file format.

target

Either the domain name, IPv4 or IPv6 address of a remote target.

### Options
-t, --duration seconds

Duration of traffic generation, specified as a decimal number in seconds (default is 5.0).

-T, --tcp[=debug_mode]

Send queries over TCP. See the list of optional debug modes below.

-U, --quic[=debug_mode]

Send queries over QUIC. See the list of optional debug modes below.

-Q, --qps queries

Number of queries-per-second (approximately) to be sent (default is 1000). The program is not optimized for low speeds at which it may lose communication packets. The recommended minimum speed is 2 packets per thread (Rx/Tx queue).

-b, --batch size

Send more queries in a batch. Improves QPS but may affect the counterpart's packet loss (default is 10 for UDP and 1 for TCP/QUIC).

-r, --drop

Drop incoming responses. Improves QPS, but disables response statistics.

-p, --port number

Remote destination port (default is 53 for UDP/TCP, 853 for QUIC).

-F, --affinity cpu_spec

CPU affinity for all threads specified in the format [<cpu_start>][s<cpu_step>], where <cpu_start> is the CPU ID for the first thread and <cpu_step> is the CPU ID increment for next thread (default is 0s1).

-i, --infile filename

Path to a file with query templates.

-B, --binary

Specify that input file is in binary format. This format is similar to the TCP DNS message format. The file contains records formatted as 2-octet length (network order) followed by a message in DNS wire format.

-I, --interface interface

Network interface for outgoing communication. This can be useful in situations when the interfaces are in a bond for example.

-l, --local localIP[/prefix]

Override the auto-detected source IP address. If an address range is specified instead, various IPs from the range will be used for different queries uniformly (address range not supported in the QUIC mode).

-L, --mac-local

Override auto-detected local MAC address.

-R, --mac-remote

Override auto-detected remote MAC address.

-v, --vlan id

Add VLAN 802.1Q header with the given id. VLAN offloading should be disabled.

-e, --edns-size size

EDNS UDP payload size, range 512-4096 (default is 1232). Note that over XDP the maximum supported MTU is 1790.

-m, --mode mode

Set the XDP mode. Supported values are:

- auto (default) – the XDP mode is selected automatically to achieve the best performance, which means that native driver support is preferred over the generic one, and zero-copy is used if available.

- copy – the XDP socket copy mode is forced even if zero-copy is available. This can resolve various driver issues, but at the cost of lower performance.

- generic – the generic XDP implementation is forced even if native implementation is available. This mode doesn't require support from the driver nor hardware, but offers the worst performance.

-G, --qlog path

Generate qlog files in the directory specified by path. The directory has to exist. This option is ignored if not in the QUIC mode. The recommended usage is with --quic=R or with low QPS. Otherwise, too many files are generated.

-j, --json

Print statistics formatted as json.

-S, --stats-period period

Report statistics automatically every period milliseconds. These reports contain only metrics collected in the given period.

-h, --help

Print the program help.

-V, --version

Print the program version. The option -VV makes the program print the compile time configuration summary.

### Queries file format
Each line describes a query in the form:

query_name query_type [flags]

Where query_name is a domain name to be queried, query_type is a record type name, and flags is a single character:

E Send query with EDNS.

D Request DNSSEC (EDNS + DO flag).

### TCP/QUIC debug modes
0

Perform full handshake for all connections (QUIC only).

1

Just send SYN (Initial) and receive SYN-ACK (Handshake).

2

Perform TCP/QUIC handshake and don't send anything, allow close initiated by counterpart.

3

Perform TCP/QUIC handshake and don't react further.

5

Send incomplete query (N-1 bytes) and don't react further.

7

Send query and don't ACK the response or anything further.

8

Don't close the connection and ignore close by counterpart.

9

Operate normally except for not ACKing the final FIN+ACK (TCP only).

R

Instead of opening a connection for each query, reuse connections.

### Signals
Sending USR1 signal to a running process triggers current statistics dump to the standard output. In combination with -S may cause erratic printout timing.

## NOTES
Linux kernel 4.18+ is required.

The utility has to be executed under root or with these capabilities: CAP_NET_RAW, CAP_NET_ADMIN, CAP_SYS_ADMIN, CAP_IPC_LOCK, and CAP_SYS_RESOURCE (Linux < 5.11).

The utility allocates source UDP/TCP ports from the range 2000-65535.

Due to the multi-threaded program structure there are slight discrepancies in the timespan during which metrics are collected for any given thread. The statistics printouts ignore this and are thus ever-so-slightly inaccurate. The error margin decreases proportionally to the volume of data & timespan over which they are collected.

## EXIT VALUES
Exit status of 0 means successful operation. Any other exit status indicates an error.

## EXAMPLES
Manually created queries file:

```
abc6.example.com. AAAA
nxdomain.example.com. A
notzone. A
a.example.com. NS E
ab.example.com. A D
abcd.example.com. DS D
```

Queries file generated from a zone file (Knot DNS format):

```
cat ZONE_FILE | awk "{print \$1,\$3}" | grep -E "(NS|DS|A|AAAA|PTR|MX|SOA)$" | sort -u -R > queries.txt
```

Basic usage:

```
# kxdpgun -i ~/queries.txt 2001:DB8::1
```

Using UDP with increased batch size:

```
# kxdpgun -t 20 -Q 1000000 -i ~/queries.txt -b 20 -p 8853 192.0.2.1
```

Using TCP:

```
# kxdpgun -t 20 -Q 100000 -i ~/queries.txt -T -p 8853 192.0.2.1
```

## SEE ALSO
kdig(1).

## Author
CZ.NIC, z.s.p.o. and contributors <https://www.knot-dns.cz/>

## Copyright
Copyright (C) CZ.NIC, z.s.p.o. and contributors


kpartx

package: kpartx

title: kpartx(8)

text:
# kpartx(8)

## NAME
kpartx - Create device maps from partition tables.

## SYNOPSIS
kpartx [-a|-d|-u|-l] [-r] [-p] [-f] [-g] [-s|-n] [-v] wholedisk

## DESCRIPTION
This tool, derived from util-linux' partx, reads partition tables on specified device and create device maps over partitions segments detected. It is called from hotplug upon device maps creation and deletion.

## OPTIONS
-a

Add partition mappings.

-d

Delete partition mappings.

-u

Update partition mappings.

-l

List partition mappings that would be added -a.

-r

Read-only partition mappings.

-p

Set device name-partition number delimiter.

-f

Force creation of mappings; overrides 'no_partitions' feature.

-g

Force GUID partition table (GPT).

-s

Sync mode (Default). Don't return until the partitions are created.

-n

Nosync mode. Return before the partitions are created.

-v

Operate verbosely.

## EXAMPLE
To mount all the partitions in a raw disk image:

kpartx -av disk.img

This will output lines such as:

add map loop1p1 (254:4): 0 409597 linear 7:1 3

The loop1p1 is the name of a device file under /dev/mapper which you can use to access the partition, for example to fsck it:

fsck /dev/mapper/loop1p1

When you're done, you need to remove the devices:

kpartx -d disk.img

## SEE ALSO
multipath(8) multipathd(8) hotplug(8)

## AUTHORS
This man page was assembled By Patrick Caulfield for the Debian project.

multipath-tools was developed by Christophe Varoqui <christophe.varoqui@opensvc.com> and others.

branch: sisyphus


kadmind

title: kadmind(8)

summary: KADM5 administration server

text:
# kadmind(8)

## NAME
kadmind - KADM5 administration server

## SYNOPSIS
kadmind [-x db_args] [-r realm] [-m] [-nofork] [-proponly] [-port port-number] [-P pid_file] [-p kdb5_util_path] [-K kprop_path] [-k kprop_port] [-F dump_file]

## DESCRIPTION
kadmind starts the Kerberos administration server. kadmind typically runs on the primary Kerberos server, which stores the KDC database. If the KDC database uses the LDAP module, the administration server and the KDC server need not run on the same machine. kadmind accepts remote requests from programs such as kadmin and kpasswd to administer the information in these database.

kadmind requires a number of configuration files to be set up in order for it to work:

kdc.conf

The KDC configuration file contains configuration information for the KDC and admin servers. kadmind uses settings in this file to locate the Kerberos database, and is also affected by the acl_file, dict_file, kadmind_port, and iprop-related settings.

kadm5.acl

kadmind's ACL (access control list) tells it which principals are allowed to perform administration actions. The pathname to the ACL file can be specified with the acl_file kdc.conf variable; by default, it is /var/lib/kerberos/krb5kdc/kadm5.acl.

After the server begins running, it puts itself in the background and disassociates itself from its controlling terminal.

kadmind can be configured for incremental database propagation. Incremental propagation allows replica KDC servers to receive principal and policy updates incrementally instead of receiving full dumps of the database. This facility can be enabled in the kdc.conf file with the iprop_enable option. Incremental propagation requires the principal kiprop/PRIMARY\@REALM (where PRIMARY is the primary KDC's canonical host name, and REALM the realm name). In release 1.13, this principal is automatically created and registered into the datebase.

## OPTIONS
-r realm

specifies the realm that kadmind will serve; if it is not specified, the default realm of the host is used.

-m

causes the master database password to be fetched from the keyboard (before the server puts itself in the background, if not invoked with the -nofork option) rather than from a file on disk.

-nofork

causes the server to remain in the foreground and remain associated to the terminal.

-proponly

causes the server to only listen and respond to Kerberos replica incremental propagation polling requests. This option can be used to set up a hierarchical propagation topology where a replica KDC provides incremental updates to other Kerberos replicas.

-port port-number

specifies the port on which the administration server listens for connections. The default port is determined by the kadmind_port configuration variable in kdc.conf.

-P pid_file

specifies the file to which the PID of kadmind process should be written after it starts up. This file can be used to identify whether kadmind is still running and to allow init scripts to stop the correct process.

-p kdb5_util_path

specifies the path to the kdb5_util command to use when dumping the KDB in response to full resync requests when iprop is enabled.

-K kprop_path

specifies the path to the kprop command to use to send full dumps to replicas in response to full resync requests.

-k kprop_port

specifies the port by which the kprop process that is spawned by kadmind connects to the replica kpropd, in order to transfer the dump file during an iprop full resync request.

-F dump_file

specifies the file path to be used for dumping the KDB in response to full resync requests when iprop is enabled.

-x db_args

specifies database-specific arguments. See Database Options in kadmin for supported arguments.

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

As of release 1.22, kadmind supports systemd socket activation via the LISTEN_PID and LISTEN_FDS environment variables. Sockets provided by the caller must correspond to configured listener addresses (via the kadmind_listen or kpasswd_listen variables or equivalents) or they will be ignored. Any configured listener addresses that do not correspond to caller-provided sockets will be ignored if socket activation is used.

## SEE ALSO
kpasswd, kadmin, kdb5_util, kdb5_ldap_util, kadm5.acl, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


title: kdb5_ldap_util(8)

summary: Kerberos configuration utility

text:
# kdb5_ldap_util(8)

## NAME
kdb5_ldap_util - Kerberos configuration utility

## SYNOPSIS
kdb5_ldap_util [-D user_dn [-w passwd]] [-H ldapuri] command [command_options]

## DESCRIPTION
kdb5_ldap_util allows an administrator to manage realms, Kerberos services and ticket policies.

## COMMAND-LINE OPTIONS
-r realm

Specifies the realm to be operated on.

-D user_dn

Specifies the Distinguished Name (DN) of the user who has sufficient rights to perform the operation on the LDAP server.

-w passwd

Specifies the password of user_dn. This option is not recommended.

-H ldapuri

Specifies the URI of the LDAP server.

By default, kdb5_ldap_util operates on the default realm (as specified in krb5.conf) and connects and authenticates to the LDAP server in the same manner as :ref:kadmind(8)` would given the parameters in [dbdefaults] in kdc.conf.

## COMMANDS

### create
create [-subtrees subtree_dn_list] [-sscope search_scope] [-containerref container_reference_dn] [-k mkeytype] [-kv mkeyVNO] [-M mkeyname] [-m|-P password|-sf stashfilename] [-s] [-maxtktlife max_ticket_life] [-maxrenewlife max_renewable_ticket_life] [ticket_flags]

Creates realm in directory. Options:

-subtrees subtree_dn_list

Specifies the list of subtrees containing the principals of a realm. The list contains the DNs of the subtree objects separated by colon (:).

-sscope search_scope

Specifies the scope for searching the principals under the subtree. The possible values are 1 or one (one level), 2 or sub (subtrees).

-containerref container_reference_dn

Specifies the DN of the container object in which the principals of a realm will be created. If the container reference is not configured for a realm, the principals will be created in the realm container.

-k mkeytype

Specifies the key type of the master key in the database. The default is given by the master_key_type variable in kdc.conf.

-kv mkeyVNO

Specifies the version number of the master key in the database; the default is 1. Note that 0 is not allowed.

-M mkeyname

Specifies the principal name for the master key in the database. If not specified, the name is determined by the master_key_name variable in kdc.conf.

-m

Specifies that the master database password should be read from the TTY rather than fetched from a file on the disk.

-P password

Specifies the master database password. This option is not recommended.

-sf stashfilename

Specifies the stash file of the master database password.

-s

Specifies that the stash file is to be created.

-maxtktlife max_ticket_life

(getdate time string) Specifies maximum ticket life for principals in this realm.

-maxrenewlife max_renewable_ticket_life

(getdate time string) Specifies maximum renewable life of tickets for principals in this realm.

ticket_flags

Specifies global ticket flags for the realm. Allowable flags are documented in the description of the add_principal command in kadmin.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU create -subtrees o=org -sscope SUB
Password for "cn=admin,o=org":
Initializing database for realm 'ATHENA.MIT.EDU'
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
```

### modify
modify [-subtrees subtree_dn_list] [-sscope search_scope] [-containerref container_reference_dn] [-maxtktlife max_ticket_life] [-maxrenewlife max_renewable_ticket_life] [ticket_flags]

Modifies the attributes of a realm. Options:

-subtrees subtree_dn_list

Specifies the list of subtrees containing the principals of a realm. The list contains the DNs of the subtree objects separated by colon (:). This list replaces the existing list.

-sscope search_scope

Specifies the scope for searching the principals under the subtrees. The possible values are 1 or one (one level), 2 or sub (subtrees).

-containerref container_reference_dn Specifies the DN of the

container object in which the principals of a realm will be created.

-maxtktlife max_ticket_life

(getdate time string) Specifies maximum ticket life for principals in this realm.

-maxrenewlife max_renewable_ticket_life

(getdate time string) Specifies maximum renewable life of tickets for principals in this realm.

ticket_flags

Specifies global ticket flags for the realm. Allowable flags are documented in the description of the add_principal command in kadmin.

Example:

```
shell% kdb5_ldap_util -r ATHENA.MIT.EDU -D cn=admin,o=org -H

    ldaps://ldap-server1.mit.edu modify +requires_preauth
Password for "cn=admin,o=org":
shell%
```

### view
view

Displays the attributes of a realm.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU view
Password for "cn=admin,o=org":
Realm Name: ATHENA.MIT.EDU
Subtree: ou=users,o=org
Subtree: ou=servers,o=org
SearchScope: ONE
Maximum ticket life: 0 days 01:00:00
Maximum renewable life: 0 days 10:00:00
Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
```

### destroy
destroy [-f]

Destroys an existing realm. Options:

-f

If specified, will not prompt the user for confirmation.

Example:

```
shell% kdb5_ldap_util -r ATHENA.MIT.EDU -D cn=admin,o=org -H

    ldaps://ldap-server1.mit.edu destroy
Password for "cn=admin,o=org":
Deleting KDC database of 'ATHENA.MIT.EDU', are you sure?
(type 'yes' to confirm)? yes
OK, deleting database of 'ATHENA.MIT.EDU'...
shell%
```

### list
list

Lists the names of realms under the container.

Example:

```
shell% kdb5_ldap_util -D cn=admin,o=org -H

    ldaps://ldap-server1.mit.edu list
Password for "cn=admin,o=org":
ATHENA.MIT.EDU
OPENLDAP.MIT.EDU
MEDIA-LAB.MIT.EDU
shell%
```

### stashsrvpw
stashsrvpw [-f filename] name

Allows an administrator to store the password for service object in a file so that KDC and Administration server can use it to authenticate to the LDAP server. Options:

-f filename

Specifies the complete path of the service password file. By default, /usr/local/var/service_passwd is used.

name

Specifies the name of the object whose password is to be stored. If krb5kdc or kadmind are configured for simple binding, this should be the distinguished name it will use as given by the ldap_kdc_dn or ldap_kadmind_dn variable in kdc.conf. If the KDC or kadmind is configured for SASL binding, this should be the authentication name it will use as given by the ldap_kdc_sasl_authcid or ldap_kadmind_sasl_authcid variable.

Example:

```
kdb5_ldap_util stashsrvpw -f /home/andrew/conf_keyfile

    cn=service-kdc,o=org
Password for "cn=service-kdc,o=org":
Re-enter password for "cn=service-kdc,o=org":
```

### create_policy
create_policy [-maxtktlife max_ticket_life] [-maxrenewlife max_renewable_ticket_life] [ticket_flags] policy_name

Creates a ticket policy in the directory. Options:

-maxtktlife max_ticket_life

(getdate time string) Specifies maximum ticket life for principals.

-maxrenewlife max_renewable_ticket_life

(getdate time string) Specifies maximum renewable life of tickets for principals.

ticket_flags

Specifies the ticket flags. If this option is not specified, by default, no restriction will be set by the policy. Allowable flags are documented in the description of the add_principal command in kadmin.

policy_name

Specifies the name of the ticket policy.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU create_policy -maxtktlife "1 day"

    -maxrenewlife "1 week" -allow_postdated +needchange

    -allow_forwardable tktpolicy
Password for "cn=admin,o=org":
```

### modify_policy
modify_policy [-maxtktlife max_ticket_life] [-maxrenewlife max_renewable_ticket_life] [ticket_flags] policy_name

Modifies the attributes of a ticket policy. Options are same as for create_policy.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H

    ldaps://ldap-server1.mit.edu -r ATHENA.MIT.EDU modify_policy

    -maxtktlife "60 minutes" -maxrenewlife "10 hours"

    +allow_postdated -requires_preauth tktpolicy
Password for "cn=admin,o=org":
```

### view_policy
view_policy policy_name

Displays the attributes of the named ticket policy.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU view_policy tktpolicy
Password for "cn=admin,o=org":
Ticket policy: tktpolicy
Maximum ticket life: 0 days 01:00:00
Maximum renewable life: 0 days 10:00:00
Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
```

### destroy_policy
destroy_policy [-force] policy_name

Destroys an existing ticket policy. Options:

-force

Forces the deletion of the policy object. If not specified, the user will be prompted for confirmation before deleting the policy.

policy_name

Specifies the name of the ticket policy.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU destroy_policy tktpolicy
Password for "cn=admin,o=org":
This will delete the policy object 'tktpolicy', are you sure?
(type 'yes' to confirm)? yes
** policy object 'tktpolicy' deleted.
```

### list_policy
list_policy

Lists ticket policies.

Example:

```
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu

    -r ATHENA.MIT.EDU list_policy
Password for "cn=admin,o=org":
tktpolicy
tmppolicy
userpolicy
```

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

## SEE ALSO
kadmin, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


title: kdb5_util(8)

summary: Kerberos database maintenance utility

text:
# kdb5_util(8)

## NAME
kdb5_util - Kerberos database maintenance utility

## SYNOPSIS
kdb5_util [-r realm] [-d dbname] [-k mkeytype] [-kv mkeyVNO] [-M mkeyname] [-m] [-sf stashfilename] [-P password] [-x db_args] command [command_options]

## DESCRIPTION
kdb5_util allows an administrator to perform maintenance procedures on the KDC database. Databases can be created, destroyed, and dumped to or loaded from ASCII files. kdb5_util can create a Kerberos master key stash file or perform live rollover of the master key.

When kdb5_util is run, it attempts to acquire the master key and open the database. However, execution continues regardless of whether or not kdb5_util successfully opens the database, because the database may not exist yet or the stash file may be corrupt.

Note that some KDC database modules may not support all kdb5_util commands.

## COMMAND-LINE OPTIONS
-r realm

specifies the Kerberos realm of the database.

-d dbname

specifies the name under which the principal database is stored; by default the database is that listed in kdc.conf. The password policy database and lock files are also derived from this value.

-k mkeytype

specifies the key type of the master key in the database. The default is given by the master_key_type variable in kdc.conf.

-kv mkeyVNO

Specifies the version number of the master key in the database; the default is 1. Note that 0 is not allowed.

-M mkeyname

principal name for the master key in the database. If not specified, the name is determined by the master_key_name variable in kdc.conf.

-m

specifies that the master database password should be read from the keyboard rather than fetched from a file on disk.

-sf stash_file

specifies the stash filename of the master database password. If not specified, the filename is determined by the key_stash_file variable in kdc.conf.

-P password

specifies the master database password. Using this option may expose the password to other users on the system via the process list.

-x db_args

specifies database-specific options. See kadmin for supported options.

## COMMANDS

### create
create [-s]

Creates a new database. If the -s option is specified, the stash file is also created. This command fails if the database already exists. If the command is successful, the database is opened just as if it had already existed when the program was first run.

### destroy
destroy [-f]

Destroys the database, first overwriting the disk sectors and then unlinking the files, after prompting the user for confirmation. With the -f argument, does not prompt the user.

### stash
stash [-f keyfile]

Stores the master principal's keys in a stash file. The -f argument can be used to override the keyfile specified in kdc.conf.

### dump
dump [-b7|-r13|-r18] [-verbose] [-mkey_convert] [-new_mkey_file mkey_file] [-rev] [-recurse] [filename [principals...]]

Dumps the current Kerberos and KADM5 database into an ASCII file. By default, the database is dumped in current format, "kdb5_util load_dump version 7". If filename is not specified, or is the string "-", the dump is sent to standard output. Options:

-b7

causes the dump to be in the Kerberos 5 Beta 7 format ("kdb5_util load_dump version 4"). This was the dump format produced on releases prior to 1.2.2.

-r13

causes the dump to be in the Kerberos 5 1.3 format ("kdb5_util load_dump version 5"). This was the dump format produced on releases prior to 1.8.

-r18

causes the dump to be in the Kerberos 5 1.8 format ("kdb5_util load_dump version 6"). This was the dump format produced on releases prior to 1.11.

-verbose

causes the name of each principal and policy to be printed as it is dumped.

-mkey_convert

prompts for a new master key. This new master key will be used to re-encrypt principal key data in the dumpfile. The principal keys themselves will not be changed.

-new_mkey_file mkey_file

the filename of a stash file. The master key in this stash file will be used to re-encrypt the key data in the dumpfile. The key data in the database will not be changed.

-rev

dumps in reverse order. This may recover principals that do not dump normally, in cases where database corruption has occurred.

-recurse

causes the dump to walk the database recursively (btree only). This may recover principals that do not dump normally, in cases where database corruption has occurred. In cases of such corruption, this option will probably retrieve more principals than the -rev option will. Changed in version 1.15: Release 1.15 restored the functionality of the -recurse option.

Changed in version 1.5: The -recurse option ceased working until release 1.15, doing a normal dump instead of a recursive traversal.

### load
load [-b7|-r13|-r18] [-hash] [-verbose] [-update] filename

Loads a database dump from the named file into the named database. If no option is given to determine the format of the dump file, the format is detected automatically and handled as appropriate. Unless the -update option is given, load creates a new database containing only the data in the dump file, overwriting the contents of any previously existing database. Note that when using the LDAP KDC database module, the -update flag is required.

Options:

-b7

requires the database to be in the Kerberos 5 Beta 7 format ("kdb5_util load_dump version 4"). This was the dump format produced on releases prior to 1.2.2.

-r13

requires the database to be in Kerberos 5 1.3 format ("kdb5_util load_dump version 5"). This was the dump format produced on releases prior to 1.8.

-r18

requires the database to be in Kerberos 5 1.8 format ("kdb5_util load_dump version 6"). This was the dump format produced on releases prior to 1.11.

-hash

stores the database in hash format, if using the DB2 database type. If this option is not specified, the database will be stored in btree format. This option is not recommended, as databases stored in hash format are known to corrupt data and lose principals.

-verbose

causes the name of each principal and policy to be printed as it is dumped.

-update

records from the dump file are added to or updated in the existing database. Otherwise, a new database is created containing only what is in the dump file and the old one destroyed upon successful completion.

### ark
ark [-e enc:salt,...] principal

Adds new random keys to principal at the next available key version number. Keys for the current highest key version number will be preserved. The -e option specifies the list of encryption and salt types to be used for the new keys.

### add_mkey
add_mkey [-e etype] [-s]

Adds a new master key to the master key principal, but does not mark it as active. Existing master keys will remain. The -e option specifies the encryption type of the new master key; see Encryption types in kdc.conf for a list of possible values. The -s option stashes the new master key in the stash file, which will be created if it doesn't already exist.

After a new master key is added, it should be propagated to replica servers via a manual or periodic invocation of kprop. Then, the stash files on the replica servers should be updated with the kdb5_util stash command. Once those steps are complete, the key is ready to be marked active with the kdb5_util use_mkey command.

### use_mkey
use_mkey mkeyVNO [time]

Sets the activation time of the master key specified by mkeyVNO. Once a master key becomes active, it will be used to encrypt newly created principal keys. If no time argument is given, the current time is used, causing the specified master key version to become active immediately. The format for time is getdate time string.

After a new master key becomes active, the kdb5_util update_princ_encryption command can be used to update all principal keys to be encrypted in the new master key.

### list_mkeys
list_mkeys

List all master keys, from most recent to earliest, in the master key principal. The output will show the kvno, enctype, and salt type for each mkey, similar to the output of kadmin getprinc. A * following an mkey denotes the currently active master key.

### purge_mkeys
purge_mkeys [-f] [-n] [-v]

Delete master keys from the master key principal that are not used to protect any principals. This command can be used to remove old master keys all principal keys are protected by a newer master key.

-f

does not prompt for confirmation.

-n

performs a dry run, showing master keys that would be purged, but not actually purging any keys.

-v

gives more verbose output.

### update_princ_encryption
update_princ_encryption [-f] [-n] [-v] [princ-pattern]

Update all principal records (or only those matching the princ-pattern glob pattern) to re-encrypt the key data using the active database master key, if they are encrypted using a different version, and give a count at the end of the number of principals updated. If the -f option is not given, ask for confirmation before starting to make changes. The -v option causes each principal processed to be listed, with an indication as to whether it needed updating or not. The -n option performs a dry run, only showing the actions which would have been taken.

### tabdump
tabdump [-H] [-c] [-e] [-n] [-o outfile] dumptype

Dump selected fields of the database in a tabular format suitable for reporting (e.g., using traditional Unix text processing tools) or importing into relational databases. The data format is tab-separated (default), or optionally comma-separated (CSV), with a fixed number of columns. The output begins with a header line containing field names, unless suppression is requested using the -H option.

The dumptype parameter specifies the name of an output table (see below).

Options:

-H

suppress writing the field names in a header line

-c

use comma separated values (CSV) format, with minimal quoting, instead of the default tab-separated (unquoted, unescaped) format

-e

write empty hexadecimal string fields as empty fields instead of as "-1".

-n

produce numeric output for fields that normally have symbolic output, such as enctypes and flag names. Also requests output of time stamps as decimal POSIX time_t values.

-o outfile

write the dump to the specified output file instead of to standard output

Dump types:

alias

principal alias information

aliasname

the name of the alias

targetname

the target of the alias

keydata

principal encryption key information, including actual key data (which is still encrypted in the master key)

name

principal name

keyindex

index of this key in the principal's key list

kvno

key version number

enctype

encryption type

key

key data as a hexadecimal string

salttype

salt type

salt

salt data as a hexadecimal string

keyinfo

principal encryption key information (as in keydata above), excluding actual key data

princ_flags

principal boolean attributes. Flag names print as hexadecimal numbers if the -n option is specified, and all flag positions are printed regardless of whether or not they are set. If -n is not specified, print all known flag names for each principal, but only print hexadecimal flag names if the corresponding flag is set.

name

principal name

flag

flag name

value

boolean value (0 for clear, or 1 for set)

princ_lockout

state information used for tracking repeated password failures

name

principal name

last_success

time stamp of most recent successful authentication

last_failed

time stamp of most recent failed authentication

fail_count

count of failed attempts

princ_meta

principal metadata

name

principal name

modby

name of last principal to modify this principal

modtime

timestamp of last modification

lastpwd

timestamp of last password change

policy

policy object name

mkvno

key version number of the master key that encrypts this principal's key data

hist_kvno

key version number of the history key that encrypts the key history data for this principal

princ_stringattrs

string attributes (key/value pairs)

name

principal name

key

attribute name

value

attribute value

princ_tktpolicy

per-principal ticket policy data, including maximum ticket lifetimes

name

principal name

expiration

principal expiration date

pw_expiration

password expiration date

max_life

maximum ticket lifetime

max_renew_life

maximum renewable ticket lifetime

Examples:

```
$ kdb5_util tabdump -o keyinfo.txt keyinfo
$ cat keyinfo.txt
name        keyindex        kvno    enctype salttype        salt
K/M@EXAMPLE.COM     0       1       aes256-cts-hmac-sha384-192      normal  -1
foo@EXAMPLE.COM     0       1       aes128-cts-hmac-sha1-96 normal  -1
bar@EXAMPLE.COM     0       1       aes128-cts-hmac-sha1-96 normal  -1
$ sqlite3
sqlite> .mode tabs
sqlite> .import keyinfo.txt keyinfo
sqlite> select * from keyinfo where enctype like 'aes256-%';
K/M@EXAMPLE.COM     1       1       aes256-cts-hmac-sha384-192      normal  -1
sqlite> .quit
$ awk -F'\t' '$4 ~ /aes256-/ { print }' keyinfo.txt
K/M@EXAMPLE.COM     1       1       aes256-cts-hmac-sha384-192      normal  -1
```

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

## SEE ALSO
kadmin, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


kprop

title: kprop(8)

text:
# kprop(8)

## NAME
kprop - propagate a Kerberos V5 principal database to a replica server

## SYNOPSIS
kprop [-r realm] [-f file] [-d] [-P port] [-s keytab] replica_host

## DESCRIPTION
kprop is used to securely propagate a Kerberos V5 database dump file from the primary Kerberos server to a replica Kerberos server, which is specified by replica_host. The dump file must be created by kdb5_util.

## OPTIONS
-r realm

Specifies the realm of the primary server.

-f file

Specifies the filename where the dumped principal database file is to be found; by default the dumped database file is normally /var/lib/kerberos/krb5kdc/replica_datatrans.

-P port

Specifies the port to use to contact the kpropd server on the remote host.

-d

Prints debugging information.

-s keytab

Specifies the location of the keytab file.

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

## SEE ALSO
kpropd, kdb5_util, krb5kdc, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


kpropd

title: kpropd(8)

summary: Kerberos V5 replica KDC update server

text:
# kpropd(8)

## NAME
kpropd - Kerberos V5 replica KDC update server

## SYNOPSIS
kpropd [-r realm] [-A admin_server] [-a acl_file] [-f replica_dumpfile] [-F principal_database] [-p kdb5_util_prog] [-P port] [--pid-file=pid_file] [-D] [-d] [-s keytab_file]

## DESCRIPTION
The kpropd command runs on the replica KDC server. It listens for update requests made by the kprop program. If incremental propagation is enabled, it periodically requests incremental updates from the primary KDC.

When the replica receives a kprop request from the primary, kpropd accepts the dumped KDC database and places it in a file, and then runs kdb5_util to load the dumped database into the active database which is used by krb5kdc. This allows the primary Kerberos server to use kprop to propagate its database to the replica servers. Upon a successful download of the KDC database file, the replica Kerberos server will have an up-to-date KDC database.

Where incremental propagation is not used, kpropd is commonly invoked out of inetd(8) as a nowait service. This is done by adding a line to the /etc/inetd.conf file which looks like this:

```
kprop  stream  tcp  nowait  root  /usr/local/sbin/kpropd  kpropd
```

kpropd can also run as a standalone daemon, backgrounding itself and waiting for connections on port 754 (or the port specified with the -P option if given). Standalone mode is required for incremental propagation. Starting in release 1.11, kpropd automatically detects whether it was run from inetd and runs in standalone mode if it is not. Prior to release 1.11, the -S option is required to run kpropd in standalone mode; this option is now accepted for backward compatibility but does nothing.

Incremental propagation may be enabled with the iprop_enable variable in kdc.conf. If incremental propagation is enabled, the replica periodically polls the primary KDC for updates, at an interval determined by the iprop_replica_poll variable. If the replica receives updates, kpropd updates its log file with any updates from the primary. kproplog can be used to view a summary of the update entry log on the replica KDC. If incremental propagation is enabled, the principal kiprop/replicahostname@REALM (where replicahostname is the name of the replica KDC host, and REALM is the name of the Kerberos realm) must be present in the replica's keytab file.

kproplog can be used to force full replication when iprop is enabled.

## OPTIONS
-r realm

Specifies the realm of the primary server.

-A admin_server

Specifies the server to be contacted for incremental updates; by default, the primary admin server is contacted.

-f file

Specifies the filename where the dumped principal database file is to be stored; by default the dumped database file is /var/lib/kerberos/krb5kdc/from_master.

-F kerberos_db

Path to the Kerberos database file, if not the default.

-p

Allows the user to specify the pathname to the kdb5_util program; by default the pathname used is /usr/sbin/kdb5_util.

-D

In this mode, kpropd will not detach itself from the current job and run in the background. Instead, it will run in the foreground.

-d

Turn on debug mode. kpropd will print out debugging messages during the database propogation and will run in the foreground (implies -D).

-P

Allow for an alternate port number for kpropd to listen on. This is only useful in combination with the -S option.

-a acl_file

Allows the user to specify the path to the kpropd.acl file; by default the path used is /var/lib/kerberos/krb5kdc/kpropd.acl.

--pid-file=pid_file

In standalone mode, write the process ID of the daemon into pid_file.

-s keytab_file

Path to a keytab to use for acquiring acceptor credentials.

-x db_args

Database-specific arguments. See Database Options in kadmin for supported arguments.

## FILES
kpropd.acl

Access file for kpropd; the default location is /usr/local/var/krb5kdc/kpropd.acl. Each entry is a line containing the principal of a host from which the local machine will allow Kerberos database propagation via kprop.

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

## SEE ALSO
kprop, kdb5_util, krb5kdc, kerberos, inetd(8)

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


kproplog

title: kproplog(8)

text:
# kproplog(8)

## NAME
kproplog - display the contents of the Kerberos principal update log

## SYNOPSIS
kproplog [-h] [-e num] [-v] kproplog [-R]

## DESCRIPTION
The kproplog command displays the contents of the KDC database update log to standard output. It can be used to keep track of incremental updates to the principal database. The update log file contains the update log maintained by the kadmind process on the primary KDC server and the kpropd process on the replica KDC servers. When updates occur, they are logged to this file. Subsequently any KDC replica configured for incremental updates will request the current data from the primary KDC and update their log file with any updates returned.

The kproplog command requires read access to the update log file. It will display update entries only for the KDC it runs on.

If no options are specified, kproplog displays a summary of the update log. If invoked on the primary, kproplog also displays all of the update entries. If invoked on a replica KDC server, kproplog displays only a summary of the updates, which includes the serial number of the last update received and the associated time stamp of the last update.

## OPTIONS
-R

Reset the update log. This forces full resynchronization. If used on a replica then that replica will request a full resync. If used on the primary then all replicas will request full resyncs.

-h

Display a summary of the update log. This information includes the database version number, state of the database, the number of updates in the log, the time stamp of the first and last update, and the version number of the first and last update entry.

-e num

Display the last num update entries in the log. This is useful when debugging synchronization between KDC servers.

-v

Display individual attributes per update. An example of the output generated for one entry:

```
Update Entry

   Update serial # : 4

   Update operation : Add

   Update principal : test@EXAMPLE.COM

   Update size : 424

   Update committed : True

   Update time stamp : Fri Feb 20 23:37:42 2004

   Attributes changed : 6

         Principal

         Key data

         Password last changed

         Modifying principal

         Modification time

         TL data
```

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

## SEE ALSO
kpropd, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


title: krb5kdc(8)

summary: Kerberos V5 KDC

text:
# krb5kdc(8)

## NAME
krb5kdc - Kerberos V5 KDC

## SYNOPSIS
krb5kdc [-x db_args] [-d dbname] [-k keytype] [-M mkeyname] [-p portnum] [-m] [-r realm] [-n] [-w numworkers] [-P pid_file] [-T time_offset]

## DESCRIPTION
krb5kdc is the Kerberos version 5 Authentication Service and Key Distribution Center (AS/KDC).

## OPTIONS
The -r realm option specifies the realm for which the server should provide service. This option may be specified multiple times to serve multiple realms. If no -r option is given, the default realm (as specified in krb5.conf) will be served.

The -d dbname option specifies the name under which the principal database can be found. This option does not apply to the LDAP database.

The -k keytype option specifies the key type of the master key to be entered manually as a password when -m is given; the default is aes256-cts-hmac-sha1-96.

The -M mkeyname option specifies the principal name for the master key in the database (usually K/M in the KDC's realm).

The -m option specifies that the master database password should be fetched from the keyboard rather than from a stash file.

The -n option specifies that the KDC does not put itself in the background and does not disassociate itself from the terminal.

The -P pid_file option tells the KDC to write its PID into pid_file after it starts up. This can be used to identify whether the KDC is still running and to allow init scripts to stop the correct process.

The -p portnum option specifies the default UDP and TCP port numbers which the KDC should listen on for Kerberos version 5 requests, as a comma-separated list. This value overrides the port numbers specified in the [kdcdefaults] section of kdc.conf, but may be overridden by realm-specific values. If no value is given from any source, the default port is 88.

The -w numworkers option tells the KDC to fork numworkers processes to listen to the KDC ports and process requests in parallel. The top level KDC process (whose pid is recorded in the pid file if the -P option is also given) acts as a supervisor. The supervisor will relay SIGHUP signals to the worker subprocesses, and will terminate the worker subprocess if the it is itself terminated or if any other worker process exits.

The -x db_args option specifies database-specific arguments. See Database Options in kadmin for supported arguments.

The -T offset option specifies a time offset, in seconds, which the KDC will operate under. It is intended only for testing purposes.

## EXAMPLE
The KDC may service requests for multiple realms (maximum 32 realms). The realms are listed on the command line. Per-realm options that can be specified on the command line pertain for each realm that follows it and are superseded by subsequent definitions of the same option.

For example:

```
krb5kdc -p 2001 -r REALM1 -p 2002 -r REALM2 -r REALM3
```

specifies that the KDC listen on port 2001 for REALM1 and on port 2002 for REALM2 and REALM3. Additionally, per-realm parameters may be specified in the kdc.conf file. The location of this file may be specified by the KRB5_KDC_PROFILE environment variable. Per-realm parameters specified in this file take precedence over options specified on the command line. See the kdc.conf description for further details.

## ENVIRONMENT
See kerberos for a description of Kerberos environment variables.

As of release 1.22, krb5kdc supports systemd socket activation via the LISTEN_PID and LISTEN_FDS environment variables. Sockets provided by the caller must correspond to configured listener addresses (via the kdc_listen variable or equivalent) or they will be ignored. Any configured listener addresses that do not correspond to caller-provided sockets will be ignored if socket activation is used.

## SEE ALSO
kdb5_util, kdc.conf, krb5.conf, kdb5_ldap_util, kerberos

## AUTHOR
MIT

## COPYRIGHT
1985-2026, MIT


tlshd

package: ktls-utils

title: tlshd(8)

summary: TLS handshake for kernel TLS sockets

text:
# tlshd(8)

## NAME
tlshd - TLS handshake for kernel TLS sockets

## SYNOPSIS
/usr/sbin/tlshd [options]

## DESCRIPTION
The tlshd program implements a user agent that services TLS handshake requests on behalf of kernel TLS consumers. It materializes kernel socket endpoints in user space in order to perform TLS handshakes using a standard TLS library. After each handshake completes, tlshd plants TLS session metadata into the kernel socket to enable the use of kTLS to secure subsequent communication on that socket, and passes the socket back to the kernel.

## OPTIONS
-c or --config

When specified this option sets the location for tlshd's config file.

-h or --help

When specified tlshd displays a help message then exits immediately.

-s or --stderr

When specified this option forces messages to go to both stderr and the system log. By default, messages go only to the system log.

-v or --version

When specified tlshd displays build version information then exits immediately.

## ENVIRONMENT VARIABLES
The GnuTLS library provides certain capabilities that can be enabled by setting environment variables before tlshd is started. More information about these variables is available in GnuTLS library documentation.

SSLKEYLOGFILE

When set, this variable specifies the pathname of a file to which the GnuTLS library appends negotiated session keys in the NSS Key Log format. The NSS Key Log format can be read by wireshark, enabling decryption of recorded sessions.

GNUTLS_FORCE_FIPS_MODE

When set to `1', this variable forces the TLS library into FIPS mode if FIPS140-2 support is available.

## FILES
/etc/tlshd/config

Primary configuration file

/etc/tlshd.conf

Legacy configuration file (deprecated)

## SIGNALS
SIGHUP or SIGUSR1

Reload the configuration file. Debug verbosity and keyring associations are updated without terminating active TLS sessions. After reload completes, tlshd continues polling for netlink messages.

SIGINT or SIGTERM

Terminate the daemon cleanly.

## SEE ALSO
tls-session-tags(7), tlshd.conf(5), ssl(7)

## AUTHOR
Chuck Lever


laptop-mode.conf

package: laptop-mode-tools

title: laptop-mode.conf(8)

text:
# laptop-mode.conf(8)

## NAME
/etc/laptop-mode/laptop-mode.conf - Configuration file for laptop-mode-tools.

## DESCRIPTION
This manual page documents the options that can be set in the /etc/laptop-mode/laptop-mode.conf configuration file and in the modular configuration files in the /etc/laptop-mode/conf.d directory. For a description of what laptop mode does, see the laptop_mode(8) manual page.

## SETTINGS
The syntax of options is OPTION=value. There are some groups of options that specify values depending on power state and laptop mode is enabled. These use the prefix "LM_" to indicate that a value is used only when laptop mode is enabled, "NOLM_" to indicate the opposite, "AC_" to indicate that a value is used only when the system is running on AC power, and "BATT_" to indicate that a value is used only when the system is running on batteries. Settings are prefixed with a combination of an optional LM_/NOLM_ prefix and an optional AC_/BATT_. For instance, the combination LM_AC_ means "when the system is in laptop mode and on AC power". (Note that this situation happens only if ENABLE_LAPTOP_MODE_ALWAYS is enabled!) If one of the prefixes (either LM_/NOLM_ or AC_/BATT_) is missing, then the value is used independently of the state of laptop mode or AC power, respectively. Options that start with "CONTROL_" are boolean settings that determine whether laptop mode tools is allowed to control a certain aspect of your system. Boolean settings always expect "0" to indicate the false (negative/no/disabled) value, and "1" to indicate the true (positive/yes/enabled) value.

The following sections list the settings that are available in laptop-mode.conf and in the modular configuration files.

Note: Many settings were moved from the main configuration file to the modular configuration files. The settings here are split out by modular configuration file, but in installations upgraded from version 1.36 or earlier they may appear in both. In such cases, the configuration settings in the main configuration file override those in the modular configuration files. To avoid confusion, it is advised to move the settings from the main configuration files to the modular configuration files when this situation is detected.

### /etc/laptop-mode/conf.d/board-specific/
The board-specific settings framework is for users and distributors who would like to ship their local customized settings on top of the default settings shipped upstream.

Add local customized settings under this folder to override the system defaults.

### /etc/laptop-mode/laptop-mode.conf
This is the main configuration file. It contains the settings for enabling and disabling, plus the core features: the Linux kernel laptop mode feature and related settings.

ENABLE_LAPTOP_MODE_TOOLS

This module determines if laptop-mode-tools should be run or not. Default is 1 Set it to 0 if you would like to completely disable laptop-mode-tools

VERBOSE_OUTPUT

Set this to 1 if you want to see a lot of output when you start/stop laptop mode, and to 0 if you don't want this. Useful for debugging purposes.

LOG_TO_SYSLOG

Set this to 1 if you want to log messages to syslog when you start/stop laptop mode, and to 0 if you don't want this. Useful for debugging purposes.

DEBUG

Set this to 1 if you would like to execute the entire laptop-mode program in debug mode. WARNING: This will create a lot of text output. If you are debugging an individual module, perhaps you would want to enable each module specific debug mode (available in module conf files)

ENABLE_AUTO_MODULES

Set this to 1 to enable all laptop mode tools modules that are termed safe to be enabled and are marked auto. With this option alone, you can enable all auto modules. In case you need to fine-control the behavior of individual modules, you can modify them accordingly. Default is 1

ENABLE_LAPTOP_MODE_ON_BATTERY

ENABLE_LAPTOP_MODE_ON_AC

These options determine whether laptop mode will be activated when the computer is on battery or on AC power, respectively. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled. The ENABLE_LAPTOP_MODE_ON_AC setting is useful when you want to run on a headless machine, in low-power mode, for eg. a Jukebox.

ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED

When this option is enabled, laptop mode will be activated when the laptop's lid is closed, even if the system is not working on batteries. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled. This feature is only supported on ACPI.

MINIMUM_BATTERY_CHARGE_PERCENT

The minimum number of battery minutes, charge (in mAh) or charge (in mWh) that you want to have available while your laptop is in laptop mode. When the number of minutes/mAhs/mWhs goes below this value, the data loss sensitive features are automatically disabled. Note that some batteries do not report a discharge rate, which means that MINIMUM_BATTERY_MINUTES has no effect for these batteries. These options are only supported on ACPI.

DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL

If this option is enabled, the data loss sensitive features of laptop mode are disabled when the battery reports its state as "critical". This option is only supported on ACPI.

DISABLE_BATTERY_ALARM_CHECK

If this option is enabled, the alarm values are ignored from the battery. This is helpful if you have a broken battery which is reporting false alarms.

HD

The hard drives which laptop mode should operate upon. If you have multiple hard drives, you should list them all in this option, separated by spaces, for example: "/dev/hda /dev/hdb".

PARTITIONS

This option specifies the partitions or mount points that laptop mode should operate upon. Separate the partitions or mount points by spaces. You can include the entry "auto" to stand for the partitions on the hard drives specified in the HD option.

LM_BATT_MAX_LOST_WORK_SECONDS

LM_AC_MAX_LOST_WORK_SECONDS

The maximum number of seconds worth of data that you can lose when power runs out or when the computer crashes. This is the maximum number of seconds that laptop mode will keep modified data in memory without being written to disk. (Note that the NOLM value is missing: modifying this value when laptop mode is disabled is extremely useless, as it won't save you any power, and will only lose you work.)

CONTROL_READAHEAD

When this option is enabled, laptop mode tools controls the readahead on the filesystems it works upon.

LM_READAHEAD

NOLM_READAHEAD

The number of kilobytes to "read ahead" on your hard disks. Reading ahead means that whenever some data is read from disk, the data which is most likely to be accessed next is read as well, ahead of time. This then saves a hard disk spinup when the data is actually needed, because the data is then already in memory. Don't set this value too high, because the readahead applies to all files that are read!

CONTROL_NOATIME

When this option is enabled, laptop mode tools places the "noatime" option in the mount options of your filesystems when laptop mode is active. This option has the effect of disabling access time logging on files, which may save some disk activity. If you use programs that depend on access times (e.g., mutt), then you should disable this option, or enable the USE_RELATIME option.

USE_RELATIME

When this option is enabled together with the CONTROL_NOATIME option, laptop mode tools will use the relatime option instead of the noatime option. This option works for more applications, and still causes relatively low levels of disk writes. Note that this functionality is only available in recent kernel versions, and laptop mode tools will ignore this setting for kernels before 2.6.23.

CONTROL_HD_IDLE_TIMEOUT

When this option is enabled, laptop mode tools adjusts your hard drives' idle timeouts, i.e., the time of inactivity before they spin down.

LM_AC_HD_IDLE_TIMEOUT_SECONDS

LM_BATT_HD_IDLE_TIMEOUT_SECONDS

NOLM_HD_IDLE_TIMEOUT_SECONDS

These settings control the idle timeout for your hard drives. The values are specified in seconds. Values up to 20 minutes can be represented accurately by the hardware, anything above that is rounded down to half-hour precision. Use the value 0 to disable idle timeout.

CONTROL_HD_POWERMGMT

When this option is enabled, laptop mode tools adjusts your hard drives' power management settings.

BATT_HD_POWERMGMT

LM_AC_HD_POWERMGMT

NOLM_AC_HD_POWERMGMT

These values specify the power management level for your hard drives. The legal values for these options can be found in the hdparm(8) manual page, in the documentation of the -B option.

CONTROL_HD_WRITECACHE

When this option is enabled, laptop mode tools controls your hard drives' write cache settings.

NOLM_AC_HD_WRITECACHE

NOLM_BATT_HD_WRITECACHE

LM_HD_WRITECACHE

These options specify whether the write caches should be enabled for your hard drives.

CONTROL_SYSLOG_CONF (deprecated)

When this option is enabled, laptop mode tools controls /etc/syslog.conf as a symlink. This option is deprecated. Use the configuration-file-control module instead, which is configured in the /etc/laptop-mode/conf.d/configuration-file-control.conf module configuration file.

### Advanced laptop-mode.conf options
These options normally do not need to be modified from their default values. Do not tweak these settings unless you know what you are doing.

ASSUME_SCSI_IS_SATA

This option, enabled by default, tells laptop mode tools to assume that a device /dev/sdX is a SATA device, and that it should be controlled using hdparm. If your /dev/sdX drives are really SCSI drives, disable this option.

ACPI_WITHOUT_AC_EVENTS

Enable this option if you have a laptop with a buggy ACPI implementation that doesn't send out AC adapter events. Enabling this option will make laptop mode check the AC adapter state whenever the battery state changes, which achieves just about the same effect as responding to AC adapter events.

CONTROL_MOUNT_OPTIONS

When this option is enabled, laptop mode tools is allowed to control the mount options for your filesystems. Disabling this will break CONTROL_NOATIME, but it will most probably also break laptop mode itself, as changes to the mount options are crucial for achieving spun-down hard drives.

LM_DIRTY_RATIO

NOLM_DIRTY_RATIO

This option specifies the percentage of system memory that is allowed to contain unwritten modified data when laptop mode is active.

LM_DIRTY_BACKGROUND_RATIO

NOLM_DIRTY_BACKGROUND_RATIO

This option specifies the percentage of system memory that is allowed to contain unwritten modified data after the DIRTY_RATIO barrier has been crossed. The effect of this option is that when more than DIRTY_RATIO percent of memory contains modified data, the system will synchronously write back data until only DIRTY_BACKGROUND_RATIO percent of memory contains modified data.

DEF_UPDATE

DEF_XFS_AGE_BUFFER

DEF_XFS_SYNC_INTERVAL

DEF_XFS_BUFD_INTERVAL

DEF_MAX_AGE

These options contain the default (non-laptop-mode) values for some kernel options that are modified when laptop mode is active. You do not normally need to change these, they represent the normal kernel defaults.

XFS_HZ

This option specifies the number of units in a second that is utilized by a 2.4 kernel. If you run a 2.4 kernel with an XFS filesystem on non-Intel hardware, you need to change this option to reflect the kernel "ticks per second" value, which is the kernel variable HZ. Unfortunately this is not exposed anywhere, so you'll have to specify it manually.

LM_SECONDS_BEFORE_SYNC

The number of seconds that laptop mode waits after the disk goes idle before it starts a full sync. This should always be less than your hard disk idle timeout, because otherwise you'll have a sync directly after your drive spins down. Two seconds is usually a good value for this option.

XFS_HZ

This option expresses the unit of the XFS tuning parameters. The default is 100. This option is only useful for 2.4 kernels that have a value for HZ that is not 100. In the 2.6 kernel series, the XFS interfaces were modified to always use USER_HZ (which is currently always 100), so for these kernels you do not need to modify this value. Also, on 2.4 kernels the value of HZ is 100 for the most common architectures, so you need only change this value if you use a less common architecture.

### /etc/laptop-mode/conf.d/ethernet.conf
The ethernet module allows you to control the behavior of your ethernet devices during AC and battery states.

CONTROL_ETHERNET

Enable this to control various aspects of power savings in the ethernet devices.

BATT_THROTTLE_ETHERNET=1

LM_AC_THROTTLE_ETHERNET=0

NOLM_AC_THROTTLE_ETHERNET=0

These options specify the power states in which you would like to control the ethernet device

THROTTLE_SPEED

Here, you can specify the throttling speed for your ethernet device. The default is "slowest". Valid values are "slowest", "fastest" or the speed of your ethernet device, like 1000. To know the exact speed of your ethernet device, you can use the ethtool tool.

DISABLE_WAKEUP_ON_LAN

This setting controls the option to enable/disable the WoL (Wake On LAN) feature. It permanently disables the WOL feature on the ethernet device. Default is 1. Set it to 0 to enable the WOL feature.

ETHERNET_DEVICES

Specify the list of ethernet devices to control. Defaults to eth0

DISABLE_ETHERNET_ON_BATTERY

Set this to 1 if you want to completely disable your ethernet device when running on battery, and when no carrier is detected on the interface (e.g., no active cable is plugged in). Default is 0

### /etc/laptop-mode/conf.d/cpuhotplug.conf
The cpuhotplug module allows you to switch off the CPU cores when running on battery

CONTROL_CPU_HOTPLUG

When this option is enabled, Laptop Mode Tools can hotplug your CPU, thus switching it offline, and conserving some power. NOTE: This module is NOT enabled by default

### /etc/laptop-mode/conf.d/cpufreq.conf
The cpufreq module allows you to control the Linux kernel's CPU frequency scaling settings.

CONTROL_CPU_FREQUENCY

When this option is enabled, laptop mode tools controls your CPU's frequency scaling bounds and the scaling governor. This option is currently only supported on 2.6 kernels.

BATT_CPU_MAXFREQ

BATT_CPU_INFREQ

BATT_CPU_GOVERNOR

BATT_CPU_IGNORE_NICE_LOAD

LM_AC_CPU_MAXFREQ

LM_AC_CPU_MINFREQ

LM_AC_CPU_GOVERNOR

LM_AC_CPU_IGNORE_NICE_LOAD

NOLM_AC_CPU_MAXFREQ

NOLM_AC_CPU_MINFREQ

NOLM_AC_CPU_GOVERNOR

NOLM_AC_CPU_IGNORE_NICE_LOAD

These options specify the CPU frequency bounds and scaling governor in the various power states. You can change the MAXFREQ and MINFREQ values to any value listed in

/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies.

In addition, you can use "fastest" and "slowest". The GOVERNOR option controls the setting for /sys/devices/system/cpu/cpufreq/scaling_governor. The available options are dependent on the installed kernel. The most common ones are "conservative", "performance" and "ondemand". The IGNORE_NICE_LOAD option controls a setting that is available for the "conservative" and "ondemand" governors. Set this option to 1 if you want the frequency scaling governor to not increase the CPU frequency for the sake of low-priority ("nice") background processes.

CONTROL_CPU_THROTTLING

When this option is enabled, laptop mode tools controls your CPU's throttling level. It is only useful if your CPU doesn't support frequency scaling. This option is only supported on some ACPI hardware.

BATT_CPU_THROTTLING

LM_AC_CPU_THROTTLING

NOLM_AC_CPU_THROTTLING

These options specify the throttling level for the CPU in the various power states. You can change it to any level listed in /proc/acpi/processor/CPU0/throttling (use only the number!). In addition, you can use "maximum" (which is the slowest option), "minimum" (full speed) and "medium" (about halfway).

### /etc/laptop-mode/conf.d/sched-smt-power-savings.conf
The sched-smt-power-savings module controls the behavior of the process scheduler on SMT boxes, when running in battery mode.

CONTROL_SCHED_SMT_POWER_SAVINGS

Set this to 1 to enable power savings in the process scheduler for SMT processors.

### /etc/laptop-mode/conf.d/dpms-standby.conf
The dpms-standby module allows you to control the DPMS standby timeouts for X displays.

CONTROL_DPMS_STANDBY

When this option is enabled, laptop mode will control the DPMS standby timeout for all X displays on the machine that users have logged on to. In short, this allows laptop mode to control the time after which your screen is blanked. There is one limitation to this feature: the settings are not automatically applied to new X logons. This can be fixed by configuring the display manager. For the gdm display manager, configure a PostLogin directory (usually /etc/gdm/PostLogin or /etc/X11/gdm/PostLogin), and in that directory create a shell script called Default. In that file, include the command:

( sleep 60 ; /usr/sbin/laptop_mode force ) & Similar configurations are possible for other window managers. Please consult your window manager documentation for more information.

BATT_DPMS_STANDBY

LM_AC_DPMS_STANDBY

NOLM_AC_DPMS_STANDBY

These options specify the display standby timeouts for the X displays, in seconds.

### /etc/laptop-mode/conf.d/terminal-blanking.conf
The terminal-blanking module allows you to control the terminal blanking timeouts for the Linux text console.

CONTROL_TERMINAL

When this option is enabled, laptop mode will control the terminal blanking settings for Linux's virtual consoles.

TERMINALS

This option should contain a space-separated list of console device files that should be affected by the terminal blanking settings. Only one console device file needs to be included, because the settings are shared between all virtual consoles. By default this setting is set to /dev/tty1.

BATT_TERMINAL_BLANK_MINUTES

LM_AC_TERMINAL_BLANK_MINUTES

NOLM_AC_TERMINAL_BLANK_MINUTES

BATT_TERMINAL_POWERDOWN_MINUTES

LM_AC_TERMINAL_POWERDOWN_MINUTES

NOLM_AC_TERMINAL_POWERDOWN_MINUTES

These options specify the terminal blanking and powerdown timeouts, in minutes. The allowed ranges are 1-60 minutes, or 0 to disable blanking or powerdown. The values are cumulative: the powerdown value is counted from the moment of screen blanking, not from the start of inactivity.

### /etc/laptop-mode/conf.d/lcd-brightness.conf
The lcd-brightness module allows you to control the brightness of your LCD screen.

CONTROL_BRIGHTNESS

When this option is enabled, laptop mode will adjust your LCD screen's brightness settings, if possible. You must configure the following settings for this to work.

BATT_BRIGHTNESS_COMMAND

LM_AC_BRIGHTNESS_COMMAND

NOLM_AC_BRIGHTNESS_COMMAND

BRIGHTNESS_OUTPUT

The BRIGHTNESS_COMMAND settings specify commands that should be executed in order to set the brightness of your LCD. The BRIGHTNESS_OUTPUT setting specifies where the output of the command will be written. For instance, if your LCD's brightness is adjusted by writing a numeric value 3 to a file called /proc/brightness, you should set the command to "echo 3" and the output file to "/proc/brightness". If your LCD's brightness is adjusted using a utility like "toshset", you should include the entire toshset command line as the command, and set the output file to "/dev/null".

### /etc/laptop-mode/conf.d/kbd-backlight.conf
The kbd-backlight module allows you to control the brightness of your LCD screen.

CONTROL_KBDLIGHT

When this option is enabled, laptop mode will adjust your keyboard backlight brightness settings, if possible. You must configure the following settings for this to work.

BATT_KBDLIGHT_COMMAND

LM_AC_KBDLIGHT_COMMAND

NOLM_AC_KBDLIGHT_COMMAND

KBD_BRIGHTNESS_OUTPUT

The KBDLIGHT_COMMAND settings specify commands that should be executed in order to set the brightness of your keyboard backlight. The KBD_BRIGHTNESS_OUTPUT setting specifies where the output of the command will be written. For instance, if your keyboard's backlight brightness is adjusted by writing a numeric value 3 to a file called /proc/brightness, you should set the command to "echo 3" and the output file to "/proc/brightness". If your LCD's brightness is adjusted using a utility like "toshset", you should include the entire toshset command line as the command, and set the output file to "/dev/null".

CONTROL_VGASWITCHEROO

When this option is enabled, laptop mode will use the vgaswitcheroo interface to disable the unused hybrid graphics card. For this module to work, you need to ensure you have debugfs enabled/mounted

BATT_ENABLE_VGASWITCHEROO

LM_AC_ENABLE_VGASWITCHEROO

NOLM_AC_ENABLE_VGASWITCHEROO

VGASWITCHEROO_FILE

The above settings specify under what modes should vgaswitcheroo interface be used to enable/disable hybrid graphics. The VGASWITCHEROO_FILE setting specifies the vgaswitcheroo interface to talk to the Linux kernel for hybrid graphics power savings

### /etc/laptop-mode/conf.d/auto-hibernate.conf
The auto-hibernate module allows you to automatically hibernate your computer when the battery goes critical or when the battery level goes below a certain threshold.

ENABLE_AUTO_HIBERNATION

When this option is enabled, laptop mode will automatically hibernate your computer when the battery level reaches a certain configurable threshold. This feature is only available when ACPI is enabled.

HIBERNATE_COMMAND

This option specifies the command that laptop mode should execute when auto-hibernation is triggered. Normally, this is set to something like "/usr/sbin/hibernate".

AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT

The battery level threshold for auto-hibernation, as a percentage of total battery design capacity.

AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL

When this option is enabled, auto-hibernation will kick in when the battery reports its state as "critical".

### /etc/laptop-mode/conf.d/battery-level-polling.conf
Some battery hardware does not send out proper level change events, or too infrequent ones. For such hardware, laptop mode tools will not detect that the battery has reached a critical level. The battery-level-polling module allows you to use the auto-hibernate module and the other battery level dependent features of laptop mode tools even when your battery does not send out frequent ACPI to indicate a change in level.

CONTROL_BATTERY_LEVEL_POLLING

When this option is enabled, laptop mode tools will automatically poll the battery level every once in a while to see if the levels have changed, and to see if actions should be taken as a consequence.

### /etc/laptop-mode/conf.d/start-stop-programs.conf
The start-stop-programs module allows you to start or stop programs when the computer switches to a different power state.

CONTROL_START_STOP

If this option is enabled, laptop mode tools will automatically start and stop daemons or other programs for you. The actual configuration of which daemons are to be stopped/started is done by placing links to the daemons' init scripts in the following directories:

/etc/laptop-mode/batt-start

/etc/laptop-mode/batt-stop

/etc/laptop-mode/lm-ac-start

/etc/laptop-mode/lm-ac-stop

/etc/laptop-mode/nolm-ac-start

/etc/laptop-mode/nolm-ac-stop

As you have probably guessed, the directories of the form "X-stop-daemons" should contain init scripts of daemons that you want stopped in mode X, while the directories of the form "X-start-daemons" should contain init scripts of daemons that you want started in mode X. Of course, it is possible to put in your own handling of modes as well: the only requirement on the scripts in the directories is that they handle the "start" and "stop" commands, like init scripts usually do. The ordering of the script handling is as follows. When a mode is entered, the actions of the previous mode are undone, in reverse order. This means that if the previous mode had done "daemon1 stop", "daemon2 stop" and "daemon3 start", then the undoing actions will be "daemon3 stop", "daemon2 start", "daemon1 start". After that, the stop-scripts for the new mode are called, and then the start-scripts are called. Please note that there is no detection of commonalities between modes at this point, i.e., if the mode you're coming from and the mode you're going to both specify that a daemon "X" should be stopped, then the daemon will be un-stopped (that is, started) while leaving the previous mode, and then stopped again.

BATT_STOP

BATT_START

LM_AC_STOP

LM_AC_START

NOLM_AC_STOP

NOLM_AC_START

These options allow you to stop services (through their init scripts) in certain power states. Specify a space-separated list of service names in these options. These services are started/stopped together with the files from the directories mentioned above.

### /etc/laptop-mode/conf.d/ac97-powersave.conf
The ac97-powersave module allows you to enable the Intel AC97 integrated audio power saving mode.

CONTROL_AC97_POWER

If this option is enabled, laptop mode tools will automatically enable the AC97 power saving settings. The power saving settings are always enabled, not only on battery power. Note: On some machines it has been reported that the AC97 power savings triggers the annoying click sound during power state transitions

### /etc/laptop-mode/conf.d/nmi-watchdog.conf
The nmi-watchdog module allows you to enable the NMI Watchdog timer power savings. Enabling this module lowers down one hw-pmu counter.

CONTROL_NMI_WATCHDOG

If this option is enabled, laptop mode tools will automatically disable the NMI Watchdog timer when on battery. This module is part of auto modules. Thus enabling auto modules setting will activate this module automatically.

### /etc/laptop-mode/conf.d/nouveau.conf
The nouveau module allows you to enable the power savings for nvidia cards with the nouveau device driver. Enabling this module should lower down power consumption.

CONTROL_NOUVEAU

If this option is enabled, laptop mode tools will automatically apply the power savings values when on battery. This module is part of auto modules. Thus enabling auto modules setting will activate this module automatically. Please ensure that your nvidia card's power saving functionality are available through the nouveau driver. Also ensure to set the correct path for your device in "/sys/kernel/debug/dri/N/pstate" where N is the number enumerated for the device

### /etc/laptop-mode/conf.d/pci-aspm.conf
The pcie-aspm module allows you to enable the PCI Express (PCIe) Active State Power Management (ASPM).

CONTROL_PCI_ASPM

If this option is enabled, laptop mode tools will enable PCI ASPM powersave mode when on battery. This module is part of auto modules. Thus enabling auto modules setting will activate this module automatically. PCIe ASPM may require that the pcie_aspm=force kernel option is enabled.

### /etc/laptop-mode/conf.d/usb-autosuspend.conf
This option has been superseded by the new runtime-pm.conf settings

### /etc/laptop-mode/conf.d/runtime-pm.conf
The runtime-pm module allows you to enable the Runtime Power Management framework for the Linux kernel.

CONTROL_RUNTIME_AUTOSUSPEND

If this option is enabled, laptop mode tools will automatically enable the USB autosuspend feature for all devices. The USB autosuspend feature will always be enabled, not only on battery power.

AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST

Here, you can specify the list of USB IDs that should not use autosuspend. Use lsusb to find out the IDs of your USB devices. Example: AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST="046d:c025 0123:abcd"

AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST

Here, you can specify the list of device driver that should not use autosuspend. The driver type is given by "DRIVER=..." in a device's uevent file Example: AUTOSUSPEND_RUNTIME_DEVTYPE_BLACKLIST="usbhid usb-storage usbmouse"

AUTOSUSPEND_USE_WHITELIST

Set this to use opt-in/whitelist instead of opt-out/blacklist for deciding which devices should be autosuspended. AUTOSUSPEND_USE_WHITELIST=0 means AUTOSUSPEND_*_BLACKLIST will be used. AUTOSUSPEND_USE_WHITELIST=1 means AUTOSUSPEND_*_WHITELIST will be used.

AUTOSUSPEND_RUNTIME_DEVID_WHITELIST

The list of Device IDs that should use autosuspend. Use system commands or look into sysfs to find out the IDs of your devices. Example: AUTOSUSPEND_DEVID_WHITELIST="046d:c025 0123:abcd"

AUTOSUSPEND_RUNTIME_DEVTYPE_WHITELIST

The list of device driver types that should use autosuspend. The driver type is given by "DRIVER=..." in a device's uevent file. Example: AUTOSUSPEND_DEVTYPE_WHITELIST="usbhid usb-storage usbmouse"

### /etc/laptop-mode/conf.d/intel-hda-powersave.conf
The intel-hda-powersave module allows you to enable the Intel HDA integrated audio power saving mode.

CONTROL_INTEL_HDA_POWER

If this option is enabled, laptop mode tools will automatically enable the Intel HDA power saving settings. The power saving settings are always enabled, not only on battery power.

### /etc/laptop-mode/conf.d/configuration-file-control.conf
The configuration-file-control module allows you to switch between different configuration files when the computer is in different power states.

The primary use for this feature is for controlling the configuration files of syslog daemons. Syslog daemons have a tendency to sync their log files when entries are written to them. This causes disks to spin up, which is not very nice when you're trying to save power. The syslog.conf configuration file can be tweaked so that syslogd will not sync a given file, by prepending the log file name with a dash, like this:

mail.* -/var/log/mail/mail.log

Note: This feature will NOT work if CONTROL_SYSLOG_CONF is set in laptop-mode.conf. To start using this feature, remove the CONTROL_SYSLOG_CONF section in laptop-mode.conf, and then restart the laptop-mode-tools service. The new config files have different names than the old ones, and settings are NOT migrated. You will have to do this manually.

CONTROL_CONFIG_FILES

If this option is enabled, laptop mode tools will use the following options to switch configuration files depending on the power state.

CONFIG_FILES

This option should contain a space-separated list of configuration files that should be switched around depending on the power state.

For each configuration file, the specific configuration files will be named as follows:

<conffile>-nolm-ac

<conffile>-lm-ac

<conffile>-batt

The first file will be used when the system is on AC power and laptop mode is not active. The second file will be used when the system is on AC power and laptop mode is active. The third file will be used when the system is on battery power.

When the laptop mode tools service is enabled, it will replace the configuration files with a symlink to one of the three state-based configuration files. The original configuration file will be saved as <config file>.lmbackup, and it will be restored when the laptop mode tools service is disabled.

When you add files to this list, make sure to also add the appropriate programs and services to the configuration settings below.

You can create the alternate configuration files yourself. If you don't, they will be created by laptop mode tools the next time it is restarted. To force the files to be created, run the laptop-mode service init script with the "restart" parameter.

CONFIG_FILE_SIGNAL_PROGRAMS

This option should contain a space-separated list of programs that should be signalled after the config files have been switched around. This only works for programs that respond to the SIGHUP signal by reloading their configuration files.

CONFIG_FILE_RELOAD_SERVICES

This option should contain a space-separated list of services which should be reloaded after the config files have been switched around.

### /etc/laptop-mode/conf.d/wireless-power.conf
The wireless-power module allows you to alter the power management settings for wireless network adapters that support the iwconfig "power" option. This module is not usable for Intel network adapters that use the iwlwifi or ipw drivers, they are supported by separate modules described below.

CONTROL_WIRELESS_POWER_SAVING

If this option is enabled, laptop mode tools will set the wireless power saving mode settings based on the power state.

WIRELESS_AC_POWER_SAVING

WIRELESS_BATT_POWER_SAVING

These settings define the power saving modes on AC and on battery. The allowed values are 0 (to disable power saving mode) and 1 (to enable power saving mode).

### /etc/laptop-mode/conf.d/wireless-ipw-power.conf
The wireless-ipw-power module allows you to alter the power management settings for Intel PRO/Wireless 3945, 2100 and 2200 wireless network adapters. This module is intended for use with the ipw3945, ipw2100, ipw2200 drivers, not with the iwlwifi drivers.

CONTROL_IPW_POWER

If this option is enabled, laptop mode tools will set the wireless power management settings based on the power state.

IPW3945_AC_POWER

IPW3945_BATT_POWER

These settings define the power management levels for the ipw3945 driver. The defaults are 6 for AC, and 7 for battery mode. The allowed values are 1 (highest power) to 5 (lowest power), 6 (AC mode, full power) and 7 (battery mode, lowest power).

IPW2100_AC_POWER

IPW2100_BATT_POWER

These settings define the power management levels for the ipw2100 driver. The defaults are 0 for AC mode and 5 for battery mode.

### /etc/laptop-mode/conf.d/wireless-iwl-power.conf
The wireless-iwl-power module allows you to alter the power management settings for Intel PRO/Wireless 3945 and Intel WiFi Link 4965 wireless network adapters. This module is intended for use with the iwlwifi drivers, not with the old ipw drivers.

CONTROL_IWL_POWER

If this option is enabled, laptop mode tools will set the wireless power management settings based on the power state.

IWL_AC_POWER

IWL_BATT_POWER

These settings define the power management levels on AC and on battery. The defaults are 0 for AC, and 3 for battery mode. The allowed values are 0 (highest power) to 5 (lowest power), 6 (AC mode, full power) and 7 (battery mode, lowest power).

### /etc/laptop-mode/conf.d/exec-commands.conf
There can be many odd machines and many power savings settings, that laptop-mode-tools currently does not cover. If you run into a similar power saving problem, where you do not have a laptop-mode-tools module for it, you can use the exec-commands module to trigger the command during power state changes. Please do contribute back the power saving item as a module to the upstream developers.

CONTROL_EXEC_COMMANDS

Set this to 0 to disable execution of custom commands during power state changes. Default is auto.

BATT_EXEC_COMMAND_0=

BATT_EXEC_COMMAND_1=

LM_AC_EXEC_COMMAND_0=

LM_AC_EXEC_COMMAND_1=

NOLM_AC_EXEC_COMMAND_0=

NOLM_AC_EXEC_COMMAND_1=

Here you can specify your custom command that will need to be executed. The numbers can grow up to 9. The command needs to be specified in double quotes

### /etc/laptop-mode/conf.d/eee-superhe.conf
The eee-superhe module allows you to control the CPU frequency scalling on the EEE PC. It requires the eeepc_laptop kernel module to be loaded.

CONTROL_SUPERHE

It this option is enabled, laptop mode tools will automatically control the FSB speed on the EEE PC.

BATT_SUPERHE

LM_AC_SUPERHE

NOLM_AC_SUPERHE

These settings define the power management levels on AC and on battery. The defaults are 0 for LM_AC and NOLM_AC, and 2 for battery mode.

### /etc/laptop-mode/conf.d/hal-polling.conf
The hal-polling module allows you to control the polling of CD/DVD drives by HAL. The polling is needed for some drives to detect inserted CDs, but it uses a considerable amount of power. Enable this module to disable the polling, but only if our drive doesn't need it, or if you are willing to mount CDs manually in exchange for the power saving.

CONTROL_HAL_POLLING

If this option is enabled, laptop mode tools will control the HAL polling behaviour.

BATT_DISABLE_HAL_POLLING

AC_DISABLE_HAL_POLLING

These settings define the polling behaviour on AC and on battery. To disable polling, set the options to 1, to enable, set them to 0.

HAL_POLLING_DEVICES

This setting defines for which devices the polling behaviour will be altered. It should contain a space separated list of devices.

### /etc/laptop-mode/conf.d/bluetooth.conf
The bluetooth module allows you to enable/disable bluetooth depending on the power state.

CONTROL_BLUETOOTH

If this option is enabled, laptop mode tools will enable/disable bluetooth when the power state changes.

BATT_ENABLE_BLUETOOTH

AC_ENABLE_BLUETOOTH

These settings define whether bluetooth is enabled on AC and on battery. To disable bluetooth, set the options to 0, to enable, set them to 1.

BLUETOOTH_INTERFACES

This setting defines the interfaces the bluetooth module will control. It should contain a space separated list of interfaces. (Note that you probably have only one bluetooth interface, and it will probably be named "hci0".)

### /etc/laptop-mode/conf.d/intel-sata-powermgmt.conf
The intel-sata-powermgmt module allows you to enable the power saving mode for Intel AHCI compliant SATA controllers. This power saving mode is also known as Aggressive Link Power Management (ALPM).

CONTROL_INTEL_SATA_POWER

If this option is enabled, laptop mode tools will automatically enable the Intel SATA controller power saving settings. The power saving settings are always enabled, not only on battery power.

BATT_ACTIVATE_SATA_POWER=1

LM_AC_ACTIVATE_SATA_POWER=0

NOLM_AC_ACTIVATE_SATA_POWER=0

These settings control the behavior of the SATA devices under AC and battery power states

### /etc/laptop-mode/conf.d/sched-mc-power-savings.conf
The sched-mc-power-savings module allows you to tune the Linux kernel process scheduler to optimize for power usage on multi-core and multi-processor computers.

CONTROL_SCHED_MC_POWER_SAVINGS

If this option is enabled, laptop mode tools will automatically configure the kernel process scheduler to optimize for power usage on multi-core and multi-processor computers. The optimizations will only be enabled in battery mode.

### /etc/laptop-mode/conf.d/video-out.conf
The video-out module allows you to selectively disable video outputs depending on the power status. This works only for video hardware that supports xrandr.

CONTROL_VIDEO_OUTPUTS

If this option is enabled, laptop mode tools will automatically disable the configured video outputs.

BATT_DISABLE_VIDEO_OUTPUTS

LM_AC_DISABLE_VIDEO_OUTPUTS

NOLM_AC_DISABLE_VIDEO_OUTPUTS

These settings define which video outputs are to be disabled in which power state. The format is a space-separated list of outputs. The allowed names of the outputs depend on what the video hardware supports, they can be found by running the "xrandr" command.

## SEE ALSO
laptop_mode(8).

lm-profiler(8).

hdparm(8).

## AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.


title: laptop_mode(8)

summary: apply laptop mode settings

text:
# laptop_mode(8)

## NAME
/usr/sbin/laptop_mode - apply laptop mode settings

## SYNOPSIS
/usr/sbin/laptop_mode [ cmd ] [ force ]

## DESCRIPTION
This manual page documents briefly the /usr/sbin/laptop_mode command. laptop_mode is a program that applies the settings given in the /etc/laptop-mode/laptop-mode.conf configuration file. The primary use is to control the laptop mode feature included in Linux kernels with versions 2.6.6 and higher, and 2.4.23 and higher. This feature increases battery life by letting your hard drive spin down. This is achieved by grouping disk write activity into "chunks" that are spaced at larger intervals than they normally would be. In addition to supporting the Linux kernel's laptop mode feature, /usr/sbin/laptop_mode also supports various power saving modules which are configured through configuration files in the /etc/laptop-mode/conf.d directory.

It is not recommended to call /usr/sbin/laptop_mode directly to start or stop laptop mode, except in hardware event handlers. To apply new configuration settings from laptop-mode.conf, call the laptop-mode service init script with the reload parameter.

## COMMANDS
Specify force as the second parameter to force laptop_mode to re-apply a state even if the computer is already in that state. These are the values that are allowed for cmd :

auto

Enable or disable laptop mode based on the current power state. Note that this will not do anything if the laptop-mode service has not been started!

status

Display a status report about everything that laptop_mode affects.

## SEE ALSO
laptop-mode.conf(8).

## AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk) for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.


lm-profiler

title: lm-profiler(8)

summary: laptop mode profiler

text:
# lm-profiler(8)

## NAME
/usr/sbin/lm-profiler - laptop mode profiler

## SYNOPSIS
/usr/sbin/lm-profiler

## DESCRIPTION
This manual page documents briefly the /usr/sbin/lm-profiler command. lm-profiler is a tool for profiling disk operations. It is a part of laptop mode tools and is useful only in relation to rest of laptop mode tools. It helps you to detect programs and services that use up system resources and that cause disk activity, and it allows you to disable them when laptop mode is active.

When you start lm-profiler, it will execute a "profiling run", which can take some time. Start lm-profiler when you are working on batteries, preferably, because that will allow it to analyze the actual situation that it is supposed to optimize. During the profiling run, you can use your system normally; however, any disk activity caused by your actions will end up in the profiler's results. When the profiling run is finished, you will be presented with a list of programs that deserve your attention, either because they listen on a network (which is not usually useful when you are working offline) or because they caused disk activity in a disk-spindown-unfriendly pattern. When lm-profiler can guess an init script that belongs to a program, it presents you with the opportunity to disable the program when you are working on battery. It does this by placing a link to the init script in /etc/laptop-mode/batt-stop. Any programs that lm-profiler cannot find an init script for is simply reported, so that you can stop the program manually if you want to.

WARNING ABOUT DISABLING PROGRAMS: It may not be safe to disable some programs. They may be needed for proper operation of your system. Disable services only if you know what they do and why you don't need them.

## FILES
/etc/lm-profiler.conf

lm-profiler retrieves its profiling rules from this file.

## SEE ALSO
lm-profiler.conf(8).

laptop-mode.conf(8).

daemons.conf(8).

## AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk) and Jan Polacek (jerome@ucw.cz) for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.


lm-profiler.conf

title: lm-profiler.conf(8)

text:
# lm-profiler.conf(8)

## NAME
/etc/laptop-mode/lm-profiler.conf - Configuration file for lm-profiler, a profiler for laptop-mode-tools.

## DESCRIPTION
This manual page documents the options that can be set in the /etc/laptop-mode/lm-profiler.conf configuration file. For a description of what lm-profiler does, see the lm-profiler(8) manpage.

## SETTINGS
The syntax of options is OPTION=value.

The following settings are available in lm-profiler.conf:

VERBOSE_OUTPUT

Set this to 1 if you want to see a lot of output when you run lm-profiler, and 0 if you don't want this. Useful for debugging purposes. (Currently does nothing.)

PROFILE_RUN_LENGTH

The length of a profiling run, in seconds. This should be a while, so that lm-profiler can gather enough information. The default is 10 minutes (600 seconds).

ACTIVITY_INTERVAL_MIN

ACTIVITY_INTERVAL_MAX

The behaviour that you want to avoid when you have your hard drive spun down, is disk accesses that are spread out over time, because your hard drive will have to spin up for each access. lm-profiler detects when applications perform disk accesses that are at least some time apart (otherwise they can be considered part of the same access) but not TOO far apart (otherwise they are no problem). These settings configure what lm-profiler considers "at least some time apart" and "too far apart", respectively, in seconds.

RECOMMEND_DEFAULT_SERVICES

DEFAULT_SERVICES

If RECOMMEND_DEFAULT_SERVICES is set to 1 (enabled), then lm-profiler will always suggest turning off the services listed in DEFAULT_SERVICES (separated by spaces).

IGNORE_PROGRAMS

Programs listed in this option, separated by spaces, will be ignored for disk activity profiling. The default settings (which can be referenced as $DEF_IGNORE_PROGRAMS) include common utility programs and all programs used by lm-profiler itself.

RECOMMEND_NETWORK_SERVICES

When this option is enabled (value 1), lm-profiler will detect any services that are listening on network ports, and it will suggest that you disable them.

IGNORE_NETWORK_SERVICES

Services listed in this configuration option (separated by spaces) are not suggested as a network service by lm-profiler. The default values can be accessed as $DEF_IGNORE_NETWORK_SERVICES.

## SEE ALSO
lm-profiler(8).

laptop_mode(8).

laptop-mode.conf(8).

## AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.


lm-syslog-setup

title: lm-syslog-setup(8)

text:
# lm-syslog-setup(8)

## NAME
/usr/sbin/lm-syslog-setup - configure laptop mode tools to switch syslog.conf based on power state

## SYNOPSIS
/usr/sbin/lm-syslog-setup

## DESCRIPTION
This manual page documents briefly the /usr/sbin/lm-syslog-setup command. lm-syslog-setup was a command to set up the necessary things to enable laptop mode to switch between different configuration files based on the power state. This feature and this command has been deprecated in favor of the configuration-file-control module, which is configured in the /etc/laptop-mode/conf.d/configuration-file-control.conf configuration file. This new module does not require any manual setup. Existing configurations using the old feature are still supported, however, new usages of the old feature are not allowed, and lm-syslog-setup has been disabled accordingly.

## SEE ALSO
laptop-mode.conf(8).

## AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.


latencytop

package: latencytop

title: latencytop(8)

text:
# latencytop(8)

## NAME
latencytop - a tool for developers to visualize system latencies

## SYNOPSIS
latencytop [options] [processes...]

## DESCRIPTION
This manual page documents briefly the latencytop command.

latencytop is a Linux tool for software developers (both kernel and userspace), aimed at identifying where in the system latency is happening, and what kind of operation/action is causing the latency to happen so that the code can be changed to avoid the worst latency hiccups.

LatencyTOP focuses on the cases where the applications want to run and execute useful code, but there's some resource that's not currently available (and the kernel then blocks the process). This is done both on a system level and on a per process level, so that you can see what's happening to the system, and which process is suffering and/or causing the delays.

You can walk the processes by using the cursor keys. If you press s followed by a letter, then only active processes starting with that lettter are displayed and walked. If you press s followed by 0 then that filter is reset.

## OPTIONS
-d

Dump once to console (without curses interface)

--unknown

Dump unknown symbols

## KEY BINDINGS
In the curses interface, the following keys are recognized:

Z,A,D,Up,Back

previous process

X,B,C,Down,Forward

forward one process

Q

Quit latencytop

R

Refresh data

## SEE ALSO
powertop(1)

The program is more fully described at http://www.latencytop.org

## AUTHOR
latencytop was written by Arjan van de Ven <arjan@linux.intel.com>.

This manual page was written by Giacomo Catenazzi <cate@debian.org>, for the Debian project (but may be used by others).