'\" t .\" Title: pipesz .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.23 .\" Date: 2025-03-29 .\" Manual: Dienstprogramme für Benutzer .\" Source: util-linux 2.41 .\" Language: English .\" .TH "PIPESZ" "1" "2025-03-29" "util\-linux 2.41" "Dienstprogramme für Benutzer" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "BEZEICHNUNG" pipesz \- Pipe\- und FIFO\-Puffergrößen festlegen oder untersuchen .SH "ÜBERSICHT" .sp \fBpipesz\fP [Optionen] [\-\-set \fIGröße\fP] [\-\-] [\fIBefehl\fP [Argument] …] .sp \fBpipesz\fP [Optionen] \-\-get .SH "BESCHREIBUNG" .sp 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. .sp The \fB\-\-set\fP operation sets pipe buffer sizes. If it is specified, it must be specified with an explicit \fIsize\fP. Otherwise, it is implied and the size is read from \fB/proc/sys/fs/pipe\-max\-size\fP. The kernel may adjust \fIsize\fP as described in \fBfcntl\fP(2). To determine the actual buffer sizes set, use the \fB\-\-verbose\fP option. If neither \fB\-\-file\fP nor \fB\-\-fd\fP are specified, \fB\-\-set\fP acts on standard output. .sp The \fB\-\-set\fP operation permits an optional \fIcommand\fP to execute after setting the pipe buffer sizes. This command is executed with the adjusted pipes. .sp The \fB\-\-get\fP operation outputs data in a tabular format. The first column is the name of the pipe as passed to \fBpipesz\fP. File descriptors are named as "fd \fIN\fP". The second column is the size, in bytes, of the pipe\(cqs internal buffer. The third column is the number of unread bytes currently in the pipe. The columns are separated by tabs (\*(Aq\(rst\*(Aq, ASCII 09h). If \fB\-\-verbose\fP is specified, a descriptive header is also emitted. If neither \fB\-\-file\fP nor \fB\-\-fd\fP are specified, \fB\-\-get\fP acts on standard input. .sp Unless the \fB\-\-check\fP option is specified, \fBpipesz\fP does \fInot\fP exit if it encounters an error while manipulating a file or file descriptor. This allows \fBpipesz\fP 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 \fB\-\-quiet\fP option prevents warnings from being emitted in these cases. .sp The kernel imposes limits on the amount of pipe buffer space unprivileged processes can use, though see \fBBUGS\fP below. The kernel will also refuse to shrink a pipe buffer if this would cause a loss of buffered data. See \fBpipe\fP(7) for additional details. .sp \fBpipesz\fP supports specifying multiple short options consecutively, in the usual \fBgetopt\fP(3) fashion. The first non\-option argument is interpreted as \fIcommand\fP. If \fIcommand\fP might begin with \*(Aq\-\*(Aq, use \*(Aq\-\-\*(Aq to separate it from arguments to \fBpipesz\fP. In shell scripts, it is good practice to use \*(Aq\-\-\*(Aq when parameter expansion is involved. \fBpipesz\fP itself does not read from standard input and does not write to standard output unless \fB\-\-get\fP, \fB\-\-help\fP, or \fB\-\-version\fP are specified. .SH "OPTIONEN" .sp \fB\-g\fP, \fB\-\-get\fP .RS 4 Report the size of pipe buffers to standard output and exit. As a special behavior, if neither \fB\-\-file\fP nor \fB\-\-fd\fP are specified, standard input is examined. It is an error to specify this option in combination with \fB\-\-set\fP. .RE .sp \fB\-s\fP, \fB\-\-set\fP \fIGröße\fP .RS 4 Set the size of the pipe buffers, in bytes. This option may be suffixed by \fIK\fP, \fIM\fP, \fIG\fP, \fIKiB\fP, \fIMiB\fP, or \fIGiB\fP to indicate multiples of 1024. Fractional values are supported in this case. Additional suffixes are supported but are unlikely to be useful. If this option is not specified, a default value is used, as described above. If this option is specified multiple times, a warning is emitted and only the last\-specified \fIsize\fP is used. As a special behavior, if neither \fB\-\-file\fP nor \fB\-\-fd\fP are specified, standard output is adjusted. It is an error to specify this option in combination with \fB\-\-get\fP. .RE .sp \fB\-f\fP, \fB\-\-file\fP \fIPfad\fP .RS 4 Set the buffer size of the FIFO or pipe at \fIpath\fP, relative to the current working directory. You may specify this option multiple times to affect different files, and you may do so in combination with \fB\-\-fd\fP. Generally, this option is used with FIFOs, but it will also operate on anonymous pipes such as those found in \fB/proc/PID/fd\fP. Changes to the buffer size of FIFOs are not preserved across system restarts. .RE .sp \fB\-n\fP, \fB\-\-fd\fP \fIDateideskriptor\fP .RS 4 Set the buffer size of the pipe or FIFO passed to \fBpipesz\fP as the specified file descriptor number. You may specify this option multiple times to affect different file descriptors, and you may do so in combination with \fB\-\-file\fP. Shorthand options are provided for the common cases of fd 0 (stdin), fd 1 (stdout), and fd 2 (stderr). These should suffice in most cases. .RE .sp \fB\-i\fP, \fB\-\-stdin\fP .RS 4 Kürzel für \fB\-\-fd 0\fP. .RE .sp \fB\-o\fP, \fB\-\-stdout\fP .RS 4 Kürzel für \fB\-\-fd 1\fP. .RE .sp \fB\-e\fP, \fB\-\-stderr\fP .RS 4 Kürzel für \fB\-\-fd 2\fP. .RE .sp \fB\-c\fP, \fB\-\-check\fP .RS 4 beendet das Programm, ohne den \fIBefehl\fP auszuführen, falls beim Manipulieren einer Datei oder eines Dateideskriptors ein Fehler auftrat. Falls diese Option nicht angegeben ist, wird standardmäßig eine Warnung in die Standardfehlerausgabe geschrieben und die Programmausführung fortgesetzt. .RE .sp \fB\-q\fP, \fB\-\-quiet\fP .RS 4 schreibt keine nicht\-schwerwiegenden Diagnosemeldungen in die Standardfehlerausgabe. Die normale Ausgabe von \fB\-\-get\fP, \fB\-\-verbose\fP, \fB\-\-help\fP oder \fB\-\-version\fP wird hiervon nicht beeinflusst. .RE .sp \fB\-v\fP, \fB\-\-verbose\fP .RS 4 veranlasst \fBpipesz\fP, eine beschreibende Überschrift über der Tabelle auszugeben, wenn dies mit \fB\-\-get\fP angegeben wird. Wenn Sie es ansonsten angeben, schreibt \fBpipesz\fP die vom Kernel festgelegten tatsächlichen Puffergrößen in die Standardfehlerausgabe. .RE .sp \fB\-h\fP, \fB\-\-help\fP .RS 4 zeigt einen Hilfetext an und beendet das Programm. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 Display version and exit. .RE .SH "BEISPIELE" .sp \fBpipesz\fP \fBdd\fP if=\fIDatei\fP bs=1M | ... .RS 4 Runs \fBdd\fP(1) with an expanded standard output pipe, allowing it to avoid context switches when piping around large blocks. .RE .sp \fBpipesz\fP \-s1M \-cf \fI/run/mein\-dienst.fifo\fP .RS 4 Setzt die Pipe\-Puffergröße einer Dienst\-FIFO auf 1.048.576 Byte. Falls die Puffergröße nicht gesetzt werden kann, wird \fBpipesz\fP mit einem Fehler beendet. .RE .sp \fBecho\fP hello | \fBpipesz\fP \-g .RS 4 gibt die Größe der Pipe aus, die von der Shell verwendet wird, um Eingaben an \fBpipesz\fP zu übergeben. Da \fBpipesz\fP nicht aus der Standardeingabe liest, können auch 6 ungelesene Bytes in die Pipe gelangen, abhängig von relativen Timings. .RE .sp \fBfind\fP /proc/\fIPID\fP/fd \-exec \fBpipesz\fP \-gqf \*(Aq{}\*(Aq \*(Aq;\*(Aq .RS 4 gibt die Größe und Anzahl ungelesener Bytes aller Pipes aus, die von \fIPID\fP verwendet werden. Falls einige Pipes routinemäßig voll sind, kann \fBpipesz\fP einen Flaschenhals bei der Verarbeitung mildern. .RE .SH "ANMERKUNGEN" .sp Linux unterstützt die Größenanpassung von Pipe\-Puffern seit Kernel 2.6.35. In dieser Version wurde außerdem \fB/proc/sys/fs/pipe\-max\-size\fP eingeführt. .sp Dieses Programm verwendet \fBF_GETPIPE_SZ\fP/\fBF_SETPIPE_SZ\fP aus \fBfcntl\fP(2), um die Pipe\-Puffergrößen zu ermitteln und zu setzen. .sp Dieses Programm verwendet \fBFIONREAD\fP aus \fBioctl\fP(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. .SH "FEHLER" .sp Vor Linux 4.9 beeinträchtigten einige Fehler das Erzwingen bestimmter Ressourcenbeschränkungen beim Setzen von Pipe\-Puffergrößen. In \fBpipe\fP(7) finden Sie Details hierzu. .SH "AUTOREN" .sp .MTO "nwsharp\(atlive.com" "Nathan Sharp" "" .SH "SIEHE AUCH" .sp \fBpipe\fP(7) .SH "FEHLER MELDEN" .sp For bug reports, use the \c .URL "https://github.com/util\-linux/util\-linux/issues" "issue tracker" "." .SH "VERFÜGBARKEIT" .sp Der Befehl \fBpipesz\fP ist Teil des Pakets util\-linux, welches aus dem \c .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux\-Kernel\-Archiv" "" heruntergeladen werden kann.