pv
- Pipe Viewer - is a terminal-based
tool for monitoring the progress of data through a pipeline. It can be
inserted into any normal pipeline between two processes to give a visual
indication of how quickly data is passing through, how long it has taken,
how near to completion it is, and an estimate of how long it will be until
completion.
Additional support is available for multiple instances working in tandem, to given a visual indicator of relative throughput in a complex pipeline:
Source for all systems and RPMs for RPM-based systems are available in the download area.
Comments, bug reports, and patches can be sent using the Contact Form.
Debian / Ubuntu: | Run "apt-get install pv " to get the latest packaged version from "unstable" / "testing". (Debian QA page here.) |
---|---|
CentOS / RHEL: | Set up my YUM repository or use RepoForge, then do "yum install pv ". |
Fedora: | Run "yum install pv "; the "extras " repository may be required. (Fedora package status here.) |
openSUSE Leap 15.3: | Run "sudo zypper install pv ". (Keith Guitar) |
Slackware: | Use this SlackBuild script. |
Cygwin: | Available as a package. (Christian Franke) |
FreeBSD: | Listed on FreshPorts. |
OpenBSD: | Listed under ports. |
Solaris: | Download binary packages from OpenCSW. |
OpenSolaris: | Includes pv version 1.1.4 in the "/dev " repository (as of build 119). Install with "pkg install SUNWpipe-viewer ". (Menno Lageman) |
AIX: | An RPM from Pawel Piatek is in the downloads section. |
SerenityOS: | Ported to SerenityOS. (Brian Gianforcaro) |
MacPorts: | Run "port install pv " to get the latest version. (Brandon Crawford) |
Mac HomeBrew: | Run "brew install pv " to get the latest version. (Justin Campbell) |
Exherbo: | Run "cave resolve -x app-misc/pv " to get the latest version. (Wulf C. Krueger) |
Gentoo: | Run "emerge sys-apps/pv " to get the latest version. (S. Lockwood-Childs; update from Peter Broadwell) |
IRIX Nekoware: | Available in the Nekoware "beta" repository. (Mark Round) |
Syabas PopcornHour: | Someone posted this port in a forum. |
Nix: | Run "nix-env -i pv ". (Erick Ochoa) |
Spack: | Run "spack install pv " to get the latest version. (Christoph Junghans) |
(7 Feb 2022) - Jacek Wielemborek writes:
pgrep -x gzip | xargs -n1 -I{} bash -c 'tmux split-window -l 1 pv -ptebar -d {}:3; tmux last-pane'
You can run this in a tmux session and it's going to display a progress bar for each currently running gzip decompression process. Quite often I run a massively parallel job and it's difficult to estimate ETA when the process is not uniform. This way I'm getting a lot of progress bars and I can get a better feel of the system's performance.
(29 Nov 2013) - Lee Yiu Chung writes:
I tried to compile pv under SmartOS (a fork from OpenSolaris), but I found a compiler error that struct stat
is redefined.
After some tracing I found that /usr/include/sys/stat.h
have BOTH "struct stat
" and "struct stat64
" defined, and the "define stat64 stat
" macro in autoconf/header.in
happily replacing stat64
to stat
, thus causing the compiler error.
As a result I have to modify autoconf/header.in
so that the offending macro is disabled in Solaris platform. Below is the diff file:
--- autoconf/header.in.orig 2013-08-01 03:39:15.000000000 +0800 +++ autoconf/header.in 2013-11-29 20:07:21.697885164 +0800 @@ -70,6 +70,7 @@ # define stat64 stat # define fstat64 fstat # endif +# elif defined(__sun) && defined(__SVR4) # else # define stat64 stat # define fstat64 fstat
Author notes: Large file support is not implemented very portably at the moment. I will try to fix it so it does not do things like redefining stat
in future, so this should be fixed in a future version. In the meantime please try the above patch that has been kindly supplied.
stddef.h
include to number.c
(Sam James)-B
, -A
, or -T
now switches on -C
implicitly (Johannes Gerer, André Stapf)--help
" translations (Richard Fonfara)/dev/sda
in the manual (Pranav Peshwe)-B 1024
" in the manual (Jan Venekamp)autoconf/scripts/index.sh
(Juan Picca)%llu
instead of %Lu
for better compatibility (Eric A. Borisch)-B
) being ignored (AndCycle, Ilya Basin, Antoine Beaupré)-d
" if process fd directory is unreadable, or if process disappears before we start the main loop (Jacek Wielemborek)lstat64
support when unavailable - separate patches supplied by Ganael Laplanche and Peter Korsgaard-D
" / "--delay-start
" to only show bar after N seconds (Damon Harper)--fineta
" / "-I
" to show ETA as time of day rather than time remaining - patch supplied by Erkki Seppälä (r147)--eta
/ -e
) so that days are given if the hours remaining are 24 or more (Jacek Wielemborek)--watchfd PID
, when PID exitsawk
bug in tests/016-numeric-timer
in decimal "," localesmake rpm
" and "make srpm
", extend "make release
" to sign releasessplice()
(Jan Seda)--watchfd
to look at block devices--watchfd PID:FD
work with --size N
--watchfd
- suggested by Jacek Wielemborek and "fdwatch"splice()
--buffer-percent
, suggested by Kim Krecht--last-written
, suggested by Kim Krecht--no-splice
--null
- patch supplied by Zing Shishak-lc128
) - with help from Pawel Piatek-c
fixes - with help from Pawel Piateksplice()
not using stdin - patch from Zev Weiss-R
" on Cygwin
|