Quantcast
Channel: How big is the pipe buffer? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 9 View Live

Answer by unhammer for How big is the pipe buffer?

If you need the value in Python>=3.3, here's a simple method (assuming you can run call out to dd): from subprocess import Popen, PIPE, TimeoutExpired p = Popen(["dd", "if=/dev/zero", "bs=1"],...

View Article



Answer by chan for How big is the pipe buffer?

Here are some further alternatives to explore the actual pipe buffer capacity using shell commands only: # get pipe buffer size using Bash yes produce_this_string_as_output | tee >(sleep 1) | wc -c...

View Article

Answer by Jeff for How big is the pipe buffer?

This is a quick and dirty hack on Ubuntu 12.04, YMMV cat >pipesize.c #include <unistd.h> #include <errno.h> #include </usr/include/linux/fcntl.h> #include <stdio.h> void...

View Article

Answer by Asain Kujovic for How big is the pipe buffer?

this shell-line can show pipe buffer size too: M=0; while true; do dd if=/dev/zero bs=1k count=1 2>/dev/null; \ M=$(($M+1)); echo -en "\r$M KB" 1>&2; done | sleep 999 (sending 1k chunks to...

View Article

Answer by Chris Johnsen for How big is the pipe buffer?

The capacity of a pipe buffer varies across systems (and can even vary on the same system). I am not sure there is a quick, easy, and cross platform way to just lookup the capacity of a pipe. Mac OS X,...

View Article


How big is the pipe buffer?

As a comment in I'm confused as to why "| true" in a makefile has the same effect as "|| true" user cjm wrote: Another reason to avoid | true is that if the command produced enough output to fill up...

View Article

Answer by HappyFace for How big is the pipe buffer?

The accepted answer adapted to zsh:#+begin_src bsh.dash :results verbatim :exports both :wrap exampletest-buffer() { test $# -ge 1 || { echo "usage: $0 write-size [wait-time]"; return 1; } test $# -ge...

View Article

Answer by Akib Azmain for How big is the pipe buffer?

As simple as executing this:echo "$(($(ulimit -p)*512)) bytes"

View Article

Browsing latest articles
Browse All 9 View Live


Latest Images