PIPESZ(1) | Dienstprogramme für Benutzer | PIPESZ(1) |
BEZEICHNUNG
pipesz - Pipe- und FIFO-Puffergrößen festlegen oder untersuchen
ÜBERSICHT
pipesz [Optionen] [--set Größe] [--] [Befehl [Argument] …]
pipesz [Optionen] --get
BESCHREIBUNG
Pipes und FIFOs verwalten einen internen Puffer, der zum Übertragen von Daten zwischen der Leseseite und der Schreibseite verwendet wird. In einigen Fällen kann die Standardgröße dieses internen Puffers den Erfordernissen nicht entsprechen. Dieses Programm bietet Möglichkeiten, die Größe dieser Puffer zu setzen und zu untersuchen.
The --set operation sets pipe buffer sizes. If it is specified, it must be specified with an explicit size. Otherwise, it is implied and the size is read from /proc/sys/fs/pipe-max-size. The kernel may adjust size as described in fcntl(2). To determine the actual buffer sizes set, use the --verbose option. If neither --file nor --fd are specified, --set acts on standard output.
The --set operation permits an optional command to execute after setting the pipe buffer sizes. This command is executed with the adjusted pipes.
The --get operation outputs data in a tabular format. The first column is the name of the pipe as passed to pipesz. File descriptors are named as "fd N". The second column is the size, in bytes, of the pipe’s internal buffer. The third column is the number of unread bytes currently in the pipe. The columns are separated by tabs ('\t', ASCII 09h). If --verbose is specified, a descriptive header is also emitted. If neither --file nor --fd are specified, --get acts on standard input.
Unless the --check option is specified, pipesz does not exit if it encounters an error while manipulating a file or file descriptor. This allows pipesz to be used generically without fear of disrupting the execution of pipelines should the type of certain files be later changed. For minimal disruption, the --quiet option prevents warnings from being emitted in these cases.
The kernel imposes limits on the amount of pipe buffer space unprivileged processes can use, though see BUGS below. The kernel will also refuse to shrink a pipe buffer if this would cause a loss of buffered data. See pipe(7) for additional details.
pipesz supports specifying multiple short options consecutively, in the usual getopt(3) fashion. The first non-option argument is interpreted as command. If command might begin with '-', use '--' to separate it from arguments to pipesz. In shell scripts, it is good practice to use '--' when parameter expansion is involved. pipesz itself does not read from standard input and does not write to standard output unless --get, --help, or --version are specified.
OPTIONEN
-g, --get
-s, --set Größe
-f, --file Pfad
-n, --fd Dateideskriptor
-i, --stdin
-o, --stdout
-e, --stderr
-c, --check
-q, --quiet
-v, --verbose
-h, --help
-V, --version
BEISPIELE
pipesz dd if=Datei bs=1M | ...
pipesz -s1M -cf /run/mein-dienst.fifo
echo hello | pipesz -g
find /proc/PID/fd -exec pipesz -gqf '{}' ';'
ANMERKUNGEN
Linux unterstützt die Größenanpassung von Pipe-Puffern seit Kernel 2.6.35. In dieser Version wurde außerdem /proc/sys/fs/pipe-max-size eingeführt.
Dieses Programm verwendet F_GETPIPE_SZ/F_SETPIPE_SZ aus fcntl(2), um die Pipe-Puffergrößen zu ermitteln und zu setzen.
Dieses Programm verwendet FIONREAD aus ioctl(2), um die Menge der ungelesenen Daten in Pipes zu ermitteln. Falls dies aus irgendeinem Grund fehlschlägt, wird die Menge der ungelesenen Daten als 0 gemeldet.
FEHLER
Vor Linux 4.9 beeinträchtigten einige Fehler das Erzwingen bestimmter Ressourcenbeschränkungen beim Setzen von Pipe-Puffergrößen. In pipe(7) finden Sie Details hierzu.
AUTOREN
Nathan Sharp <nwsharp@live.com>
SIEHE AUCH
FEHLER MELDEN
For bug reports, use the issue tracker https://github.com/util-linux/util-linux/issues.
VERFÜGBARKEIT
Der Befehl pipesz ist Teil des Pakets util-linux, welches aus dem Linux-Kernel-Archiv https://www.kernel.org/pub/linux/utils/util-linux/ heruntergeladen werden kann.
2025-03-29 | util-linux 2.41 |