nuttcp

package: nuttcp

title: nuttcp(8)

summary: network performance measurement tool

text:
# nuttcp(8)

## NAME
nuttcp - network performance measurement tool

## SYNOPSIS
nuttcp -h

nuttcp -V

nuttcp -t [ -bdDsuv ] [ -cdscp_value ] [ -lbuffer_len ] [ -nnum_bufs ]

[ -wwindow_size ] [ -wsserver_window ] [ -wb ]

[ -pdata_port ] [ -Pcontrol_port ]

[ -Nnum_streams ] [ -Rxmit_rate_limit [m|g] ]

[ -Txmit_timeout [m] ] host [ < input ]

nuttcp -r [ -bBdsuv ] [ -cdscp_value ] [ -lbuffer_len ] [ -nnum_bufs ]

[ -wwindow_size ] [ -wsserver_window ] [ -wb ]

[ -pdata_port ] [ -Pcontrol_port ]

[ -Nnum_streams ] [ -Rxmit_rate_limit [m|g] ]

[ -Txmit_timeout [m] ] [ host ] [ > output ]

nuttcp -S [ -Pcontrol_port ]

nuttcp -1 [ -Pcontrol_port ]

## DESCRIPTION
nuttcp is a network performance measurement tool intended for use by network and system managers. Its most basic usage is to determine the raw TCP (or UDP) network layer throughput by transferring memory buffers from a source system across an interconnecting network to a destination system, either transferring data for a specified time interval, or alternatively transferring a specified number of bytes. In addition to reporting the achieved network throughput in Mbps, nuttcp also provides additional useful information related to the data transfer such as user, system, and wall-clock time, transmitter and receiver CPU utilization, and loss percentage (for UDP transfers).

nuttcp is based on nttcp, which in turn was an enhancement by someone at Silicon Graphics (SGI) on the original ttcp, which was written by Mike Muuss at BRL sometime before December 1984, to compare the performance of TCP stacks by U.C. Berkeley and BBN to help DARPA decide which version to place in the first BSD Unix release. nuttcp has several useful features beyond those of the basic ttcp/nttcp, such as a server mode, rate limiting, multiple parallel streams, and timer based usage. More recent changes include IPv6 support, IPv4 multicast, and the ability to set the maximum segment size or TOS/DSCP bits. nuttcp is continuing to evolve to meet new requirements that arise and to add desired new features. nuttcp has been successfully built and run on a variety of Solaris, SGI, and PPC/X86 Linux systems, and should probably work fine on most flavors of Unix. It has also been used successfully on various versions of the Windows operating system.

There are two basic modes of operation for nuttcp. The original or classic mode is the transmitter/receiver mode, which is also the way the original ttcp and nttcp worked. In this mode, a receiver is first initiated on the destination host using "nuttcp -r", and then a transmitter must be started on the source host using "nuttcp -t". This mode is somewhat deprecated and is no longer recommended for general use. The preferred and recommended mode of operation for nuttcp is the new client/server mode. With this mode, a server is first started on one system using "nuttcp -S" (or "nuttcp -1"), and then a client may either transmit data to (using "nuttcp -t") or receive data from (using "nuttcp -r") the server system. All the information provided by nuttcp is reported by the client, including the information from the server, thus providing a full snapshot of both the transmitter and receiver ends of the data transfer.

The server may be started by a normal, non-privileged user by issuing either a "nuttcp -S" or a "nuttcp -1" command. However, the optimal and recommended method of running a server is to run "nuttcp -S" via the inetd/xinetd daemon. This method has several significant advantages, including being more robust, allowing multiple simultaneous connections, and providing for access control over who is allowed to use the nuttcp server via the hosts.allow (and hosts.deny) file. By default, the nuttcp server listens for commands on port 5000, and the actual nuttcp data transfers take place on port 5001.

The host parameter must be specified for the transmitter, and provides the host name or IP address of the receiver. In classic transmitter/receiver mode, the host parameter may not be specified for the receiver. In client/server mode, when the client is the receiver, the host parameter specifies the host name or IP address of the transmitter (server).

Normally, a nuttcp data transfer is memory-to-memory. However, by using the "-s" option, it is possible to also perform memory-to-disk, disk-to-memory, and disk-to-disk data transfers. Using the "-s" option with the transmitter will cause nuttcp to read its data from the standard input instead of using a prefabricated memory buffer, while using the "-s" option on the receiver causes nuttcp to write its data to standard output. All these types of data transfers are possible with the classic transmitter/receiver mode. For security reasons, the "-s" option is disabled on the server, so it is not possible to access the disk on the server side of a data transfer.

The allowed options to nuttcp are:

## OPTIONS
-h

Print out a usage statement. Running nuttcp with no arguments will also produce a usage statement.

-V

Prints the nuttcp version number. The nuttcp version is also printed as part of the normal nuttcp output when the "-v" verbose output is used (but not when using the default brief output). In client/server mode, the version number of both the client and server is identified.

-t

Indicates that this nuttcp is the transmitter. In client/server mode, this means the server specified by the host parameter is the receiver.

-r

Indicates that this nuttcp is the receiver. In client/server mode, this means the server specified by the host parameter is the transmitter.

-S

Indicates that this nuttcp is the server. The only option that may be specified to the server is the "-P" option, which allows one to change the control port used by the server, but only when the server is started by a normal, non-privileged user. When the server is initiated by inetd/xinetd, the server control port should be specified in the services file.

-1

Basically the same as the "-S" option, but indicates a one-shot server, i.e. the server exits after the first data transfer initiated by a client. The "-1" option should only be used when the server is started by a normal, non-privileged user. This option will probably rarely need to be used, but can be useful for a quick test and eliminates the possibilty of leaving a non-access controlled nuttcp server running on the system (which can happen when using the "-S" option and forgetting to kill the nuttcp server after finishing a series of tests).

-b

Produce brief one-line output, which includes the amount of data transferred in MB (1024**2 bytes), the time interval in seconds, the TCP (or UDP) network throughput in Mbps (millions of bits per second), the transmitter and/or receiver CPU utilization, and for UDP data transfers also outputs the loss percentage. In client/server mode, most of the printed statistics are from the viewpoint of the receiver. This is the default output format.

-B

This option is only valid for the receiver, and forces the receiver to read a full buffer (as specified by the "-l" buffer length option) from the network. It is mainly intended to be used with the "-s" option to only output full buffers to standard output (e.g. for use with tar). It is also implicitly set whenever the number of streams as specified by the "-N" option is greater than 1. This option is not passed to the server.

-d

For TCP data transfers, sets the SO_DEBUG option on the data socket. This option is not passed to the server. It is a rarely used option which may possibly be removed or renamed in a future version of nuttcp.

-D

This option is only valid for the transmitter, and only for TCP data transfers, in which case it sets the TCP_NODELAY option on the data socket, which turns off the Nagle algorithm causing data packets to be sent as soon as possible without introducing any unnecessary delays. This option is not passed to the server. It is a rarely used option which may possibly be removed or renamed in a future version of nuttcp.

-s

Setting the "-s" option causes nuttcp to either read its data from standard input rather than using prefabricated memory buffers (for "nuttcp -t"), or to write its data out to standard output (for "nuttcp -r"). The "-s" option is disabled for security reasons on the server.

-u

Use UDP for the data transfer instead of the default of TCP.

-v

Verbose output that provides some additional information related to the data transfer. In client/server mode, the server is always verbose (implicit "-v" option), but the client controls the extent and type of output via the "-v" and "-b" options.

-cdscp_value

Sets the socket option to support COS. Either takes a dscp value or with the t|T modifier it takes the full TOS field.

-lbuffer_len

Length of the network write/read buffer in bytes for the transmitter/receiver. It defaults to 64 KB (65536) for TCP data transfers and to 8 KB (8192) for UDP. For client/server mode, it sets both the client and server buffer lengths.

-nnum_bufs

Specifies the number of source buffers written to the network (default is unlimited), and is ignored by the receiver. For client/server mode, if the client issues a "nuttcp -r" command making it the receiver, this parameter is passed to the server since the server is the transmitter in this case. This parameter is also ignored if the "-s" parameter is specified to the transmitter.

-wwindow_size

Indicates the window size in KB of the transmitter (for "nuttcp -t") or receiver (for "nuttcp -r"). Actually, to be technically correct, it sets the sender or receiver TCP socket buffer size, which then effectively sets the window size. For client/server mode, both the transmitter and receiver window sizes are set. The default window size is architecture and system dependent. Note recent Linux systems, out of a misguided desire to be helpful, double whatever window size is actually specified by the user (this is not a bug with nuttcp but a bug/feature of the Linux kernel). Also, with these Linux systems, the actual window size that's used on the intervening network, as observed with tcpdump, is greater than the requested window size, but less than the doubled value set by Linux.

-wsserver_window

For client/server mode, the "-ws" option provides a mechanism for setting a different window size on the server than the client window size as specified with the "-w" option.

-wb

Normally, to conserve memory, the transmitter only sets the TCP send socket buffer size and the receiver only sets the TCP receive socket buffer size. However, if the "-wb" option is used, the transmitter will also set the TCP receive socket buffer size and the receiver will also set the TCP send socket buffer size. Under normal circumstances, this should never be necessary. This option was implemented because certain early braindead Solaris 2.8 systems would not properly set the TCP window size unless both the TCP send and receive socket buffer sizes were set (later Solaris 2.8 systems have corrected this deficiency). Thus the 'b' in this option can stand either for "braindead" or "both".

-pdata_port

Port number used for the data connection, which defaults to port 5001. If multiple streams are specified with the "-N" option, the "-p" option specifies the starting port number for the data connection. For example, if four streams are specified using the default data connection port number, nuttcp will use ports 5001, 5002, 5003, and 5004 for the four TCP (or UDP) connections used to perform the data transfer.

-Pcontrol_port

For client/server mode, specifies the port number used for the control connection between the client and server, and defaults to port 5000. On the server side, the "-P" option should only be used when the server is started manually by the user. If the server is started by inetd/xinetd (the preferred method), the control connection must be specified by adding a nuttcp entry to the services file.

-Nnum_streams

Species the number of parallel TCP (or UDP) data streams to be used for the data transfer, with the default being a single data stream. The maximum number of parallel data streams that can be used is 128. If the number of streams is greater than one, the "-B" option is implicitly set. The current implementation does not fork off separate processes for each data stream, so specifying multiple streams on an SMP machine will not take advantage of its multiple processors. Of course it is always possible to run multiple nuttcp commands in parallel on an SMP system to determine if there is any advantage to running on multiple processors. This is especially simple to do when running in client/server mode when the server is started from the inetd/xinetd daemon. When running multiple nuttcp commands in parallel, the "-T" transmitter timeout option may be used to insure that all the nuttcp commands finish at approximately the same time.

-Rxmit_rate_limit[m|g]

The transmitter rate limit throttles the speed at which the transmitter sends data to the network, and by default is in Kbps, although the 'm' or 'g' suffix may be used to specify Mbps or Gbps. This option may be used with either TCP or UDP data streams. Because of the way this option is currently implemented, it will consume all the available CPU on the transmitter side of the connection so the "%TX" stats are not meaningful when using the rate limit option. By default the rate limit is applied to the average rate of the data transfer in real time, and not in CPU time, so if nuttcp is switched out of the processor for any reason, when it is switched back in, it is possible that the instantaneous rate may momentarily exceed the specified value. There is an 'i' qualifier to the rate limit option (specified as "-Ri") that will restrict the instantaneous rate at any given point in time to the specified value, although in this case the final rate reported by nuttcp may be less than the specified value since nuttcp won't attempt to catch up if other processes gain control of the CPU. The default is no rate limit. Note another way to throttle the throughput of TCP data streams is to reduce the window size.

-Txmit_time_limit[m]

Limits the amount of time that the transmitter will send data to the specified number of seconds, or number of minutes if the 'm' suffix is used. Normally a data transfer will either specify a fixed amount of data to send using the "-n" option, or a fixed period of time to send using the "-T" option. However, if both the "-n" and "-T" options are used, the data transfer will be stopped by whichever option takes affect first. The default is a 10 second time limit for the data transfer.

## USAGE
Under Construction

For now, consult the README file for basic usage guidelines.

## EXAMPLES
Under Construction

For now, see the examples.txt file for some examples of using nuttcp.

## SEE ALSO
ping(8), traceroute(8), tracepath(8), pathchar(8), netstat(1), mtrace(8)

## AUTHORS
Developed by Bill Fink based on nttcp which in turn was an enhancement of the original ttcp developed by Mike Muuss at BRL. IPv6 capability and some other fixes and enhancements contributed by Rob Scott. Many useful suggestions and testing performed by Phil Dykstra and others.

The current version is available via anonymous ftp from:

ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp/

The authors can be reached at nuttcp@lcp.nrl.navy.mil.

## BUGS
Please send bug reports to nuttcp-bugs@lcp.nrl.navy.mil.


nvmetcli

package: nvmetcli

title: nvmetcli(8)

summary: Configure NVMe\-over\-Fabrics Target.

text:
# nvmetcli(8)

## NAME
nvmetcli - Configure NVMe-over-Fabrics Target.

## USAGE

```
nvmetcli
nvmetcli clear
nvmetcli restore [filename.json]
```

## DESCRIPTION
nvmetcli is a program used for viewing, editing, saving, and starting a Linux kernel NVMe Target, used for an NVMe-over-Fabrics network configuration. It allows an administrator to export a storage resource (such as NVMe devices, files, and volumes) to a local block device and expose them to remote systems based on the NVMe-over-Fabrics specification from http://www.nvmexpress.org.

nvmetcli is run as root and has two modes:

1.An interactive configuration shell

2.Command-line mode which uses an argument

## BACKGROUND
The term NQN used throughout this man page is the NVMe Qualified Name format which an NVMe endpoint (device, subsystem, etc) must follow to guarantee a unique name under the NVMe standard. Any name in a network system setup can be used, but if it does not follow the NQN format, it may not be unique on an NVMe-over-Fabrics network.

Note that some of the fields set for an NVMe Target port under interactive mode are defined in the "Discovery Log Page" section of NVMe-over-Fabrics specification. Each NVMe Target has a discovery controller mechanism that an NVMe Host can use to determine the NVM subsystems it can access. nvmetcli can be used to add a new record to the discovery controller upon each new subsystem entry and port entry that the newly created subsystem entry binds to (see OPTIONS and EXAMPLES sections). Each NVMe Host only gets to see the discovery entries defined in /subsystems/[NQN NAME]/allowed_hosts and the IP port it is connected to the NVMe Target. An NVMe Host can retrieve these discovery logs via the nvme-cli tool (https://github.com/linux-nvme/nvme-cli).

## OPTIONS
Interactive Configuration Shell

To start the interactive configuration shell, type nvmetcli on the command-line. nvmetcli interacts with the Linux kernel NVMe Target configfs subsystem starting at base nvmetcli directories /port, /subsystem, and /host. Configuration changes entered by the administrator are made immediately to the kernel target configuration. The following commands can be used while in the interactive configuration shell mode:

cd

Allows to move around the tree.

ls

Lists contents of current tree node.

create [NQN name]/[#]

Create a new object using the specified name or number. If a [NQN name]/[#] is not specified, a random entry will be used.

delete [NQN name]/[#]

Delete an object with the specified name or number.

set attr allow_any_host=[0/1]

Used under /subsystems/[NQN name] to specify if any NVMe Host can connect to the subsystem.

set device path=[device path]

Used under /subsystems/[NQN name]/namespaces to set the (storage) device to be used.

set device nguid=[string]

Used under /subsystems/[NQN name]/namespaces to set the unique id of the device to the defined namespace.

enable/disable

Used under /subsystems/[NQN name]/namespaces to enable and disable the namespace.

set addr [discovery log page field]=[string]

Used under /ports/[#] to create a port which access is allowed. See EXAMPLES for more information.

saveconfig [filename.json]

Save the NVMe Target configuration in .json format. Without specifying the filename this will save as /etc/nvmet/config.json. This file is in JSON format and can be edited directly using a prefered file editor.

exit

Quits interactive configuration shell mode.

Command Line Mode

Typing nvmetcli [cmd] on the command-line will execute a command and not enter the interactive configuration shell.

restore [filename.json]

Loads a saved NVMe Target configuration. Without specifying the filename this will use /etc/nvmet/config.json.

clear

Clears a current NVMe Target configuration.

ls

Dumps the current NVMe Target configuration.

## EXAMPLES
Make sure to run nvmetcli as root, the nvmet module is loaded, your devices and all dependent modules are loaded, and configfs is mounted on /sys/kernel/config using:

```
mount -t configfs none /sys/kernel/config
```

The following section walks through a configuration example.

•To get started with the interactive mode and the nvmetcli command prompt, type (in root):

```
# ./nvmetcli
...>
```

•Create a subsystem. If you do not specify a name a NQN will be generated, which is probably the best choice. We don’t do it here as the name would be random:

```
> cd /subsystems
...> create testnqn
```

•Add access for a specific NVMe Host by it’s NQN:

```
...> cd /hosts
...> create hostnqn
...> cd /subsystems/testnqn
...> set attr allow_any_host=0
...> cd /subsystems/testnqn/allowed_hosts/
...> create hostnqn
```

•Remove access of a subsystem by deleting the Host NQN:

```
...> cd /subsystems/testnqn/allowed_hosts/
...> delete hostnqn
```

•Alternatively this allows any Host to connect to the subsystsem. Only use this in tightly controlled environments:

```
...> cd /subsystems/testnqn/
...> set attr allow_any_host=1
```

•Create a new namespace. If you do not specify a namespace ID the fist unused one will be used:

```
...> cd /subsystems/testnqn/namespaces
...> create 1
...> cd 1
...> set device path=/dev/nvme0n1
...> enable
```

Note that in the above setup the device_nguid attribute does not have to be set for correct NVMe Target functionality (but to correctly match a namespace to the exact device upon clear and restore operations, it is advised to set the device_nguid parameter).

•Create a loopback port that can be used with nvme-loop module on the same physical machine...

```
...> cd /ports/
...> create 1
...> cd 1/
...> set addr trtype=loop
...> cd subsystems/
...> create testnqn
```

•or create an RDMA (IB, RoCE, iWarp) port using IPv4 addressing. 4420 is the IANA assigned default port for NVMe over Fabrics using RDMA:

```
...> cd /ports/
...> create 2
...> cd 2/
...> set addr trtype=rdma
...> set addr adrfam=ipv4
...> set addr traddr=192.168.6.68
...> set addr trsvcid=4420
...> cd subsystems/
...> create testnqn
```

•or create an FC port. traddr is the WWNN/WWPN of the FC port.

```
...> cd /ports/
...> create 3
...> cd 3/
...> set addr trtype=fc
...> set addr adrfam=fc
...> set addr traddr=nn-0x1000000044001123:pn-0x2000000055001123
...> set addr trsvcid=none
...> cd subsystems/
...> create testnqn
```

•Saving the NVMe Target configuration:

```
./nvmetcli
...> saveconfig test.json
```

•Loading an NVMe Target configuration:

```
  ./nvmetcli restore test.json
```

•Clearing a current NVMe Target configuration:

```
  ./nvmetcli clear
```

## ADDITIONAL INFORMATION
nvmetcli has the ability to start and stop the NVMe Target configuration on boot and shutdown through the systemctl Linux utility via a .service file. nvmetcli package comes with nvmet.service which when installed, it can automatically restore the default, saved NVMe Target configuration from /etc/nvmet/config.json. nvmet.service can be installed in directories such as /lib/systemd/system.

To explicitly enable the service, type:

```
  systemctl enable nvmet
```

To explicitly disable the service, type:

```
  systemctl disable nvmet
```

See also systemctl(1).

## AUTHORS
This man page was written by Jay Freyensee[1]. nvmetcli was originally written by Christoph Hellwig[2].

## REPORTING BUGS & DEVELOPMENT
Please send patches and bug reports to linux-nvme@lists.infradead.org[3] for review and acceptance.

## LICENSE
nvmetcli is licensed under the Apache License, Version 2.0. Software distributed under this license is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.

## NOTES
1.

Jay Freyensee

mailto:james.p.freyensee@intel.com

2.

Christoph Hellwig

mailto:hch@infradead.org

3.

linux-nvme@lists.infradead.org

mailto:linux-nvme@lists.infradead.org


biosinfo

package: nvram-wakeup

title: biosinfo(8)

text:
# biosinfo(8)

## NAME
biosinfo - Shows type, revision and vendor of the mainboard as well as vendor version and release date of the BIOS.

## SYNOPSIS
biosinfo [--debug]

## DESCRIPTION
biosinfo is a (small) program, that shows you some information about the installed mainboard and BIOS. This may help you troubleshooting problems with nvram-wakeup. For support requests, please include the output of this program.

## OPTIONS
--debug

This option enables printing debug messages.

## SEE ALSO
nvram-wakeup(8)

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


title: cat_nvram(8)

summary: Dumps  the  contents  of  nvram  to  STDOUT.

text:
# cat_nvram(8)

## NAME
cat_nvram - Dumps the contents of nvram to STDOUT.

## SYNOPSIS
cat_nvram upper_method

## DESCRIPTION
cat_nvram is a helper program from the package nvram-wakeup. It dumps the contents of nvram to stdout using direct I/O functions.

## OPTIONS
upper_method

specifies the method which should be used to access the upper part of NVRAM. See nvram-wakeup.conf(5) for a list of possible values.

## SEE ALSO
nvram-wakeup(8), nvram-wakeup.conf(5)

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


guess

title: guess(8)

text:
# guess(8)

## NAME
guess - Tries to guess the configuration by comparing four dumps of the NVRAM.

## SYNOPSIS
guess

## DESCRIPTION
guess tries to figure out the position of the wakeup time settings in the NVRAM. Just run guess from within the directory, where the four NVRAM dumps at stored as "31.23.59.59+", "11.12.13.14+", "01.00.00.00+" and "01.00.00.00-". The file names denote the wakeup time, you have to set manually, before dumping the NVRAM:

<DD>.<HH>.<MM>.<SS><status>

<DD> = Day of month

<HH> = Hour

<MM> = Minute

<SS> = Second

<status> = wakeup enabled (+) or disabled (-)

## SEE ALSO
nvram-wakeup(8), guess-helper(8), README.mb

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


guess-helper

title: guess-helper(8)

text:
# guess-helper(8)

## NAME
guess-helper - Tries to guess the configuration by comparing four dumps of the NVRAM.

## SYNOPSIS
guess-helper

## DESCRIPTION
guess-helper is a helper program from the package nvram-wakeup. It will guide you through the procedure of creating the files needed for the program guess and eventually will run guess at the end. The output will be a configuration file which might even work ;-) Don't change any other BIOS settings you are not told to change until the procedure is finished.

See README.mb for more details.

## SEE ALSO
nvram-wakeup(8), guess(8), README.mb

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


nvram-wakeup

title: nvram-wakeup(8)

text:
# nvram-wakeup(8)

## NAME
nvram-wakeup - a (small) program that can read and write the WakeUp time in the BIOS.

## SYNOPSIS
nvram-wakeup [-l|--syslog] [-D|--debug] [-A|--directisa] [-N|--nowrite] [-d|--disable] [-s|--settime time] [-C|--configfile filename] [-I|--iwname string] [-v|--version] [-h|--help]

## DESCRIPTION
nvram-wakeup is a (small) program that can read and write the WakeUp time in the BIOS (via /dev/nvram on kernels >= 2.4.6 or using direct I/O). On this WakeUp time the computer will be powered on automatically from the soft-off state.

## OPTIONS
If run without options, nvram-wakeup will read the current wakeup settings from the NVRAM and print them on stdout.

-l, --syslog

This option will let nvram-wakeup log all output via syslogd to the system log instead of stdout/stderr. This option should always be the first one.

-D, --debug

This option enables printing debug messages.

-A, --directisa

Use direct I/O port access to access the nvram instead of /dev/nvram. This option must be used if the configuration option upper_method is set. The device /dev/rtc is still used. WARNING: If you use the option --directisa and some other programm tries to access nvram and/or rtc at the same time, you might screw up all your nvram (i.e. all CMOS settings).

-N, --nowrite

This option disables writing into the nvram and rtc devices. But all the values for the bytes are calculated. Write them down and go set the same date/time via BIOS Setup, run nvram-wakeup and see if the values you written down correspond to the values set by the BIOS.

-s time, --settime=time

Specify the time on which the computer should be up and running. The time is specified as a time_t value, i.e., number of seconds since epoch (Jan 1 1970, 00:00:00). See EXAMPLES below on how to set a "human readable" wakeup time.

Set time to 0 to disable the wakeup feature.

You can specify multiple -s|--settime options on the command line, as far as they all have the same time value. See EXAMPLES below.

-d, --disable

A synonym for --settime=0

-C filename, --configfile=filename

Read mainboard configuration from configuration file filename. See nvram-wakeup.conf(5) for information on the syntax of the file.

See BOARD CONFIGURATION below for general information on getting board configurations.

-I name, --iwname=name

If the DMI entries of your mainboard are broken, you may specify a DMI infowriter name here. (it's the name of one of the functions from nvram-wakeup-mb.c) If you specify --configfile as well as the --iwname option, then --iwname is ignored.

See BOARD CONFIGURATION below for general information on getting board configurations.

-w minutes, --wakeupbefore=minutes

Specify how many minutes before the programmed wakeuptime the computer should wake up. The default is to start 5 minutes before the programmed wakeup time.

-h, --help

Print a help message and exit.

-v, --version

Display version and author information.

## BOARD CONFIGURATION
By default, the mainboard is autodetected by reading DMI information from the BIOS. If the DMI entries are broken, you can specify the name of the infowriter to be used with the --iwname option. This only works if the board configuration is aleready compiled into the program. The list of existing infowriters can be found in the source.

Example: On my Biostar M6VCG the whole DMI entry is broken (maybe a BIOS update would help, but I never tried it), but the configuration of the board is known, so only the autodetection doesn't work. Thus look up (in boards.yaml) the name of the infowriter to beused, which is 'bio_m6vcg' and call

nvram-wakeup --iwname bio_m6vcg

If nvram-wakeup doesn't know anything about your board, you can put the board configuration into a file and pass the file name via the --configfile option to nvram-wakeup. Look nvram-wakeup.conf(5) for more information on the configuration file syntax.

If you specify --configfile as well as the --iwname option, then --iwname is ignored.

## EXAMPLES
You can specify multiple -d or -s options at the command line, but they must specify the same time, e.g.

nvram-wakeup --settime=0 -s0 -s 0 -d -ddds0 # is O.K.

nvram-wakeup -s1002722247 -s1002722247 # is O.K.

nvram-wakeup -s1002722247 -s1002722248 # is not O.K.

nvram-wakeup -s1002722247 --disable # is not O.K.

If you want the machine to be up and running in 20 minutes, call

nvram-wakeup -s $((`date +%s` + 20 * 60))

If you want the machine to be up and running at 18:30 today, call

nvram-wakeup -s `date +%s -d "18:30"`

Note that this is really "today" so if you run this after 18:30, the time will be in the past.

If you want the machine to be up and running on a particular day, at a particular time, say at 18:30 on Apr. 23rd, call

nvram-wakeup -s `date +%s -d "Apr 23 18:30"`

For "tomorrow" you can use something like that:

nvram-wakeup -s $((`date +%s -d "18:30"` + 60*60*24))

## EXIT STATUS
0

Successful program execution. The new date and time were set successfully.

1

Successful program execution. The computer must be rebooted for the changes to take effect.

2

An error occured. Something went wrong.

## FILES
/dev/nvram

NVRAM character device. This one is used for reading/writing the nvram values if the command line option --directisa is not used.

/dev/rtc

RTC character device. This one is used to determine if the RTC clock is running localtime or UTC/GMT. Furthermore, some motherboards use the RTC alarm time for the wakeup feature.

/dev/mem

Memory character device. This one is used to get DMI information for board autodetection.

nvram-wakeup.conf

Configuration file for a mainboard not supported out-of-the-box. See nvram-wakeup.conf(5) for information on the syntax of the file.

## SEE ALSO
nvram-wakeup.conf(5)

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


rtc

title: rtc(8)

text:
# rtc(8)

## NAME
rtc - Prints the RTC Alarm values using ioctls on /dev/rtc.

## SYNOPSIS
rtc

## DESCRIPTION
rtc is a helper program from the package nvram-wakeup.

## SEE ALSO
nvram-wakeup(8)

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


title: set_timer(8)

text:
# set_timer(8)

## NAME
set_timer - Assuming a fixed wakeup time in the BIOS, it modifies the system time, so that it will wake up after the specified sleep time.

## SYNOPSIS
set_timer timer_enabled sleep_time

## DESCRIPTION
set_timer is for BIOSes nvram-wakeup can't handle, because there is no way (known to the author) to change the wakeup time in the NVRAM. One of the reasons might be that the settings are stored in the upper nvram and the manufacturer is not cooperative in sharing the information how to access it. One of the reasons is that the checksum is computed in a way we can't see and the manufacturer is not cooperative in sharing the information how the checksum is computed.

For such boards the wake up time must be set to 23:59:59 the day must be set to 31. If your board supports a month setting for the wakeup, set it to July. set_timer will modify the time in the hardware clock in a way that the computer will wake up at the right time. It will also remember, by which amount of time the clock was changed and restore the correct time on boot.

The System should not update the hardware clock in the shutdown process. In Debian Woody set HWCLOCKACCESS=no in /etc/default/rcS

## OPTIONS
timer_enabled

if 0 disables the wakeup, otherwise enables it.

sleep_time

the number of seconds from now, when the system should wake up

## HOMEPAGE
http://sf.net/projects/nvram-wakeup/

## AUTHOR
Written by Hans-Hermann Redenius <redenius@gmx.de>

## REPORTING BUGS
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list nvram-wakeup-devel@lists.sourceforge.net

## COPYRIGHT
Copyright © 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


nvramtool

package: nvramtool

title: nvramtool(8)

summary: read/write coreboot-related information

text:
# nvramtool(8)

## NAME
nvramtool - read/write coreboot-related information

## SYNOPSIS
nvramtool [OPTS] [-n] -r NAME

nvramtool [OPTS] -e NAME

nvramtool [OPTS] -a

nvramtool [OPTS] -w NAME=VALUE

nvramtool [OPTS] -p INPUT_FILE

nvramtool [OPTS] -i

nvramtool [OPTS] -c [VALUE]

nvramtool [OPTS] -l [ARG]

nvramtool [OPTS] -d

nvramtool [OPTS] -Y

nvramtool [OPTS] -b OUTPUT_FILE

nvramtool [OPTS] -B INPUT_FILE

nvramtool [OPTS] -x

nvramtool [OPTS] -X DUMPFILE

nvramtool [OPTS] -v

nvramtool [OPTS] -h

## DESCRIPTION
nvramtool is a utility for reading/writing coreboot parameters and displaying information from the coreboot table.

The coreboot table resides in low physical memory. It is created at boot time by coreboot, and contains various system information such as the type of mainboard in use. It specifies locations in the CMOS (nonvolatile RAM) where the coreboot parameters are stored.

This program is intended for (x86-based) systems that use coreboot. For information about coreboot, see

http://www.coreboot.org/.

## PARAMETERS
[-n] -r NAME

Show the value of the coreboot parameter given by NAME. If -n is specified, show only the value. Otherwise show both parameter name and value.

-e NAME

Show all possible values for parameter given by NAME.

-a

Show the names and values for all coreboot parameters.

-w NAME=VALUE

Assign VALUE to coreboot parameter given by NAME.

-p INPUT_FILE

Assign values to coreboot parameters according to the contents of INPUT_FILE. The format of this file is described below.

-i

This is similar to the -p option, except that the contents of the input file are taken from standard input.

-c [VALUE]

If VALUE is present then set the CMOS checksum for the coreboot parameters to VALUE. Otherwise, show the checksum value.

-l [ARG]

If ARG is present then show information from the coreboot table as specified by ARG. Otherwise show all possible values for ARG.

-d

Do a low-level dump of the coreboot table.

-Y

Write CMOS layout information to standard output. If redirected to a file, the layout information may be used as input for the '-y LAYOUT_FILE' option (see below).

-b OUTPUT_FILE

Write the contents of CMOS memory to the binary file OUTPUT_FILE. The first 14 bytes of OUTPUT_FILE do not contain actual CMOS data, and are always written as zeros. This is because the first 14 bytes of the CMOS area do not contain CMOS memory. These bytes are involved with the functioning of the real time clock.

-B INPUT_FILE

Read binary data from INPUT_FILE and write the data to CMOS memory. The first 14 bytes of INPUT_FILE are skipped and data is written to CMOS starting at the 15th byte of the CMOS area. This is because the first 14 bytes of the CMOS area do not contain CMOS memory. These bytes are involved with the functioning of the real time clock.

-x

Show a hex dump of all CMOS data. The first 14 bytes of the dump do not contain actual CMOS data, and are always shown as zeros. This is because the first 14 bytes of the CMOS area do not contain CMOS memory. These bytes are involved with the functioning of the real time clock.

-X DUMPFILE

Read binary data from DUMPFILE (presumably a CMOS dumpfile created using the -b OUTPUT_FILE option) and show a hex dump of the data.

-v

Show version information for this program.

-h

Show a help message for this program.

## OPTIONS
In all cases above, [OPTS] evaluates to the following:

[-y LAYOUT_FILE | -t]

The '-y LAYOUT_FILE' option tells nvramtool to obtain CMOS layout information from the contents of LAYOUT_FILE. Likewise, the '-t' option tells nvramtool to obtain CMOS layout information from the CMOS option table (contained within the coreboot table). If neither option is specified, the CMOS option table is used by default. LAYOUT_FILE follows the format of the cmos.layout files provided by coreboot.

If the coreboot installed on your system was built without specifying CONFIG_HAVE_OPTION_TABLE, then the coreboot table will not contain a CMOS option table. In this case, the '-y LAYOUT_FILE' option must be used.

These two options are silently ignored when used in combination with other options (such as -h, for instance) for which they are not applicable.

## FILE FORMAT
For the -p option, INPUT_FILE must consist of a sequence of lines such that each line is either a blank line, a comment, or an assignment. A blank line consists only of zero or more whitespace characters (spaces and tabs). A comment is constructed as follows:

[ws]#[text]

Here, [ws] indicates optional whitespace characters and [text] indicates optional text. Blank lines and comments are both ignored. An assignment is constructed as follows:

[ws]NAME[ws]=[ws]VALUE[ws]

Here, NAME is the name of a coreboot parameter and VALUE is the value that will be assigned to NAME. VALUE is allowed to contain whitespace characters, but it must begin and end with nonwhitespace characters. Note that each comment must appear on a line by itself. If you attempt to add a comment to the end of an assignment, then the comment will be interpreted as part of VALUE. It is useful to observe that the output produced by both the -a and the '[-n] NAME' options (without -n specified) adheres to this file format.

## BUGS
This program does not implement any type of synchronization to ensure that different processes don't stomp on each other when trying to access the nonvolatile RAM simultaneously. Therefore, corruption of the BIOS parameter values may occur if multiple instances of this program are executed concurrently.

## AUTHORS
David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>

Stefan Reinauer <stepan@coresystems.de>


title: debugfs.ocfs2(8)

summary: OCFS2 file system debugger.

text:
# debugfs.ocfs2(8)

## NAME
debugfs.ocfs2 - OCFS2 file system debugger.

## SYNOPSIS
debugfs.ocfs2 [-f cmdfile] [-R command] [-s backup] [-nwV?] [device]

debugfs.ocfs2 -l [tracebit ... [allow|off|deny]] ...

debugfs.ocfs2 -d, --decode lockname

debugfs.ocfs2 -e, --encode lock_type block_num [generation | parent]

## DESCRIPTION
The debugfs.ocfs2 program is an interactive file system debugger useful in displaying on-disk OCFS2 filesystem structures on the specified device.

## OPTIONS
-d, --decode lockname

Display the information encoded in the lockname.

-e, --encode lock_type block_num [generation | parent]

Display the lockname obtained by encoding the arguments provided.

-f, --file cmdfile

Executes the debugfs commands in cmdfile.

-i, --image

Specifies device is an o2image file created by o2image tool.

-l [tracebit ... [allow|off|deny]] ...

Control OCFS2 filesystem tracing by enabling and disabling trace bits. Do debugfs.ocfs2 -l to get the list of all trace bits.

-n, --noprompt

Hide prompt.

-R, --request command

Executes a single debugfs command.

-s, --superblock backup-number

mkfs.ocfs2 makes up to 6 backup copies of the superblock at offsets 1G, 4G, 16G, 64G, 256G and 1T depending on the size of the volume. Use this option to specify the backup, 1 thru 6, to use to open the volume.

-w, --write

Opens the filesystem in RW mode. By default the filesystem is opened in RO mode.

-V, --version

Display version and exit.

-?, --help

Displays help and exit.

## SPECIFYING FILES
Many debugfs.ocfs2 commands take a filespec as an argument to specify an inode (as opposed to a pathname) in the filesystem which is currently opened by debugfs.ocfs2. The filespec argument may be specified in two forms. The first form is an inode number or lockname surrounded by angle brackets, e.g., <32>. The second form is a pathname; if the pathname is prefixed by a forward slash ('/'), then it is interpreted relative to the root of the filesystem which is currently opened by debugfs.ocfs2. If not, the path is interpreted relative to the current working directory as maintained by debugfs.ocfs2, which can be modified using the command cd. If the pathname is prefixed by a double forward slash ('//'), then it is interpreted relative to the root of the system directory of the filesystem opened by debugfs.ocfs2.

## LOCKNAMES
Locknames are specially formatted strings used by the file system to uniquely identify objects in the filesystem. Most locknames used by OCFS2 are generated using the inode number and its generation number and can be decoded using the decode command or used directly in place of an inode number in commands requiring a filespec. Like inode numbers, locknames need to be enclosed in angle brackets, e.g., <M000000000000000040c40c044069cf>. Use the encode command to generate all possible locknames for an object.

## COMMANDS
This is a list of the commands which debugfs.ocfs2 supports.

bmap filespec logical_block

Display the physical block number corresponding to the logical block number logical_block in the inode filespec.

cat filespec

Dump the contents of inode filespec to stdout.

cd filespec

Change the current working directory to filespec.

chroot filespec

Change the root directory to be the directory filespec.

close

Close the currently opened filesystem.

controld dump

Display information obtained from ocfs2_controld.

curdev

Show the currently open device.

decode <lockname>

Display the inode number encoded in the lockname.

dirblocks <filespec>

Display the directory blocks associated with the given filespec.

dlm_locks [-f <file>] [-l] [<lockname(s)>]...

Display the status of all lock resources in the o2dlm domain that the file system is a member of. This command expects the debugfs filesystem to be mounted as mount -t debugfs debugfs /sys/kernel/debug. Use lockname(s) to limit the output to the given lock resources, -l to include contents of the lock value block and -f <file> to specify a saved copy of /sys/kernel/debug/o2dlm/<DOMAIN>/locking_state.

dump [-p] filespec outfile

Dump the contents of the inode filespec to the output file outfile. If the -p is given, set the owner, group, timestamps and permissions information on outfile to match those of filespec.

dx_dump filespec

Display the indexed directory information for the given directory.

dx_leaf <block#>

Display the contents of the given indexed directory leaf block.

dx_root <block#>

Display the contents of the given indexed directory root block.

dx_space filespec

Display the directory free space list.

encode filespec

Display the lockname for the filespec.

extent <block#>

Display the contents of the extent structure at block#.

findpath [<lockname>|<inode#>]

Display the pathname for the inode specified by lockname or inode#. This command does not display all the hard-linked paths for the inode.

frag filespec

Display the inode's number of extents to clusters ratio.

fs_locks [-f <file>] [-l] [-B] [<lockname(s)>]...

Display the status of all locks known by the file system. This command expects the debugfs filesystem to be mounted as mount -t debugfs debugfs /sys/kernel/debug. Use lockname(s) to limit the output to the given lock resources, -B to limit the output to only the busy locks, -l to include contents of the lock value block and -f <file> to specify a saved copy of /sys/kernel/debug/ocfs2/<UUID>/locking_state.

group <block#>

Display the contents of the group descriptor at block#.

grpextents <block#>

Display free extents in the chain group.

hb

Display the contents of the heartbeat system file.

help, ?

Print the list of commands understood by debugfs.ocfs2.

icheck block# ...

Display the inodes that use the one or more blocks specified on the command line. If the inode is a regular file, also display the corresponding logical block offset.

lcd directory

Change the current working directory of the debugfs.ocfs2 process to the directory on the native filesystem.

locate [<lockname>|<inode#>] ...

Display all pathnames for the inode(s) specified by locknames or inode#s.

logdump [-T] slot#

Display the contents of the journal for slot slot#. Use -T to limit the output to just the summary of the inodes in the journal.

ls [-l] filespec

Print the listing of the files in the directory filespec. The -l flag will list files in the long format.

net_stats [-f <file>] [interval [count]]

Display the net statistics. This command expects the debugfs filesystem to be mounted at /sys/kernel/debug. The interval is in seconds. Use the -f parameter to specify a saved copy of /sys/kernel/debug/o2net/stats.

ncheck [<lockname>|<inode#>] ...

See locate.

open device

Open the filesystem on device.

quit, q

Quit debugfs.ocfs2.

rdump [-v] filespec outdir

Recursively dump directory filespec and all its contents (including regular files, symbolic links and other directories) into the outdir which should be an existing directory on the native filesystem.

refcount [-e] filespec

Display the refcount block, and optionally its tree, of the specified inode.

slotmap

Display the contents of the slotmap system file.

stat [-t|-T] filespec

Display the contents of the inode structure for the filespec. The -t ("traverse") option selects traversal of the inode's metadata. The extent tree, chain list, or other extra metadata will be dumped. This is the default. The -T option turns off traversal to reduce the I/O required when basic inode information is needed.

stat_sysdir

Display the contents of all objects in the system directory.

stats [-h] [-s backup-number]

Display the contents of the superblock. Use -s to display a specific backup superblock. Use -h to hide the inode.

xattr [-v] <filespec>

Display extended attributes associated with the given filespec.

## ACKNOWLEDGEMENT
This tool has been modelled after debugfs, a debugging tool for ext2.

## SEE ALSO
fsck.ocfs2(8) fsck.ocfs2.checks(8) mkfs.ocfs2(8) mount.ocfs2(8) mounted.ocfs2(8) o2cluster(8) o2image(8) o2info(1) ocfs2(7) tunefs.ocfs2(8)

## AUTHOR
Oracle Corporation

## COPYRIGHT
Copyright © 2004, 2012 Oracle. All rights reserved.


title: defragfs.ocfs2(8)

text:
# defragfs.ocfs2(8)

## NAME
defragfs.ocfs2 - online defragmenter for ocfs2 filesystem

## SYNOPSIS
defragfs.ocfs2 [-c] [-v] [-l] [-g] [-h][target]...

## DESCRIPTION
defragfs.ocfs2 reduces fragmentation of ocfs2 based file. The file targeted by defragfs.ocfs2 is created on ocfs2 filesystem The targeted file gets more contiguous blocks and improves the file access speed.

target is a regular file, a directory, or a device that is mounted as ocfs2 filesystem. If target is a directory, defragfs.ocfs2 reduces fragmentation of all files in it. If target is a device, defragfs.ocfs2 gets the mount point of it and reduces fragmentation of all files in this mount point.

## OPTIONS
-c

Print the numbers of files that should be processed

-v

verbose mode, the current fragmentation count and the ideal fragmentation count are printed for each file.

If this option is specified, target is never defragmented.

-l

defragfs.ocfs2 will run in low io mode, which means it will regularly yield cpu to allow other processes to run.

-g

defragfs.ocfs2 regularly records the current progress. So if it is interrupted, the next time you run defragfs.ocfs2 with this option, it will resume from the recorded progress. Note that if this option is specified, other options are ignored and replaced by those that were recorded.

-h

Print help info

## NOTES
defragfs.ocfs2 does not support files in lost+found directory. When target is a device or a mount point, defragfs.ocfs2 doesn't defragment files in mount point of other device.

It is completely not recommended to run against a file while it is actively in another application. Since the read/write of a file involves a dlm lock, this can result in a performance slowdown to both defragfs.ocfs2 and the application due to contention.

If the file system's free space is fragmented, or if there is insufficient free space available, defragfs.ocfs2 may not be able to improve the file's fragmentation.

Non-privileged users can execute defragfs.ocfs2 to their own file. Therefore, it is desirable to be executed by root user.

## AUTHOR
Written by Larry Chen <lchen@suse.com>


title: fsck.ocfs2(8)

summary: Check an OCFS2 file system.

text:
# fsck.ocfs2(8)

## NAME
fsck.ocfs2 - Check an OCFS2 file system.

## SYNOPSIS
fsck.ocfs2 [ -pafFGnuvVy ] [ -b superblock block ] [ -B block size ] device

## DESCRIPTION
fsck.ocfs2 is used to check an OCFS2 file system.

device is the file where the file system is stored (e.g. /dev/sda1). It will almost always be a device file but a regular file will work as well.

## OPTIONS
-a

This option does the same thing as the -p option. It is provided for backwards compatibility only: it is suggested that people use the -p option whenever possible.

-b superblock block

Normally, fsck.ocfs2 will read the superblock from the first block of the device. This option specifies an alternate block that the superblock should be read from. (Use -r instead of this option.)

-B blocksize

The block size, specified in bytes, can range from 512 to 4096. A value of 0, the default, is used to indicate that the blocksize should be automatically detected.

-D

Optimize directories in filesystem. This option causes fsck.ocfs2 to coalesce the directory entries in order to improve the filesystem performance.

-f

Force checking even if the file system is clean.

-F

By default fsck.ocfs2 will check with the cluster services to ensure that the volume is not in-use (mounted) on any node in the cluster before proceeding. -F skips this check and should only be used when it can be guaranteed that the volume is not mounted on any node in the cluster. WARNING: If the cluster check is disabled and the volume is mounted on one or more nodes, file system corruption is very likely. If unsure, do not use this option.

-G

Usually fsck.ocfs2 will silently assume inodes whose generation number does not match the generation number of the super block are unused inodes. This option causes fsck.ocfs2 to ask the user if these inodes should in fact be marked unused.

-n

Give the 'no' answer to all questions that fsck will ask. This guarantees that the file system will not be modified and the device will be opened read-only. The output of fsck.ocfs2 with this option can be redirected to produce a record of a file system's faults.

-p

Automatically repair ("preen") the file system. This option will cause fsck.ocfs2 to automatically fix any problem that can be safely corrected without human intervention. If there are problems that require intervention, the descriptions will be printed and fsck.ocfs2 will exit with the value 4 logically or'd into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts.

-P

Show progress.

-r backup-number

mkfs.ocfs2 makes up to 6 backup copies of the superblock at offsets 1G, 4G, 16G, 64G, 256G and 1T depending on the size of the volume. Use this option to specify the backup, 1 thru 6, to use to recover the superblock.

-t

Show I/O statistics. If this option is specified twice, it shows the statistics on a pass by pass basis.

-y

Give the 'yes' answer to all questions that fsck will ask. This will repair all faults that fsck.ocfs2 finds but will not give the operator a chance to intervene if fsck.ocfs2 decides that it wants to drastically repair the file system.

-v

This option causes fsck.ocfs2 to produce a very large amount of debugging output.

-V

Print version information and exit.

## EXIT CODE
The exit code returned by fsck.ocfs2 is the sum of the following conditions:

0 - No errors

1 - File system errors corrected

2 - File system errors corrected, system should

be rebooted

4 - File system errors left uncorrected

8 - Operational error

16 - Usage or syntax error

32 - fsck.ocfs2 canceled by user request

128 - Shared library error

## SEE ALSO
debugfs.ocfs2(8) fsck.ocfs2.checks(8) mkfs.ocfs2(8) mount.ocfs2(8) mounted.ocfs2(8) o2cluster(8) o2image(8) o2info(1) tunefs.ocfs2(8)

## AUTHORS
Oracle Corporation. This man page entry derives some text, especially the exit code summary, from e2fsck(8) by Theodore Y. Ts'o <tytso@mit.edu>.

## COPYRIGHT
Copyright © 2004, 2012 Oracle. All rights reserved.