dexen/pv-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dexen/pv-php

Composer 安装命令:

composer require dexen/pv-php

包简介

Drop in replacement for pv, the veritable pipe viewer.

README 文档

README

Description

Monitor progress of transfer of large archives, DB backup/restore, etc.

A pure PHP implementation of the pv CLI tool. Useful in case of shared web hostings when you have SSH access, but cannot install packages.

Quoting original pv's manual:

pv shows the progress of data through a pipeline by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.

To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error.

pv will copy each supplied FILE in turn to standard output (- means standard input), or if no FILEs are specified just standard input is copied. This is the same behaviour as cat(1).

Usage

A subset of options of original pv is supported. The aim is to eventually become fully compatible.

-s SIZE / --size SIZE - assume SIZE bytes to be transferred, for purposes of ETA and completion percentage calculation. Supports 'K' / 'M' / 'G' / 'T' suffix to specify larger units (IEC standard - multiplies of 1024).

-i INTERVAL / --interval INTERVAL - udate display at about INTERVAL seconds. Decimal values are supported. Default: 0.2 seconds.

Environment

Environment variables influencing the script

$TERM - terminal type, influences method of line erase. Supported: xterm / linux - use CR; dumb/any other: use multiple ASCII BS.

$COLUMNS - width of terminal in colums influences output width. Used in case tput cols does not return usable information. Fallback value: 80.

Examples

Restore MySQL backup from a dump file, monitor progress.

pv < mysql-backup-20201122.sql | mysql -u USER -p MY_DATABASE

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固