Giter Club home page Giter Club logo

progress's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

progress's Issues

Ignore things that are always there

Every time I do progress -m I see this stuff:

[8958] cat /home/cheater/.xsession-errors 100.0% (728.2 KiB / 728.2 KiB) 0/s
[8959] cat /home/cheater/.xsession-errors 100.0% (728.2 KiB / 728.2 KiB) 0/s

This is from google chrome. I have no idea why it's doing that but I wouldn't like to see it. Please provide a way for me to stop seeing this. Important: this should not include adding new command line parameters. So either read a config file or figure out that the parent pid of that cat is chrome.

Here's what chrome looks like in pstree:

 |         |         |              |-mate-panel-+-chrome-+-2*[cat]
 |         |         |              |            |        |-chrome-+-chrome-+-chrome---29*[{chrome}]
 |         |         |              |            |        |        |        |-chrome---156*[{chrome}]
 |         |         |              |            |        |        |        |-13*[chrome---10*[{chrome}]]
 |         |         |              |            |        |        |        |-chrome---21*[{chrome}]
 |         |         |              |            |        |        |        |-2*[chrome---13*[{chrome}]]
 |         |         |              |            |        |        |        |-53*[chrome---9*[{chrome}]]
 |         |         |              |            |        |        |        |-2*[chrome---8*[{chrome}]]
 |         |         |              |            |        |        |        |-chrome---{chrome}
 |         |         |              |            |        |        |        |-2*[chrome---7*[{chrome}]]
 |         |         |              |            |        |        |        |-3*[chrome---11*[{chrome}]]
 |         |         |              |            |        |        |        |-chrome---14*[{chrome}]
 |         |         |              |            |        |        |        |-chrome---19*[{chrome}]
 |         |         |              |            |        |        |        |-chrome---24*[{chrome}]
 |         |         |              |            |        |        |        `-chrome---17*[{chrome}]
 |         |         |              |            |        |        `-nacl_helper
 |         |         |              |            |        |-chrome-+-chrome
 |         |         |              |            |        |        `-3*[{chrome}]
 |         |         |              |            |        `-45*[{chrome}]

restructure the output to make it more readable

Please make the command the last element of the readout because it varies in width considerably and it's fairly difficult to follow that way. Especially applicable if you have something like mv running and it's going over many files of different file name lengths. The new order should be: speed, progress%, progress numbers, command name. ("progress numbers" means X MiB/Y MiB).

Add supporting for Cygwin and MingW?

when compile cv in Cygwin or MingW, compiler complain missing header:

CYGWIN:
cv.c:37:22: fatal error: linux/fs.h: No such file or directory
MINGW32:
cv.c:32:23: fatal error: sys/ioctl.h: No such file or directory

by googling those issue has no quick fix in header level, can you add support to then by modify the source code? thanks.

Not accurate when writing to the network

I used mv to copy a local 1Gb file to a nas.
mv told me that the progress was 100% after a few seconds while it last a few minutes before completing.
My assumption is that mv is monitoring the read once the file was all read and that the write was actually buffered and syncing. I am not sure it is consistent with the fact that mv did not exit.

Support running commands “under” cv

Hello,

I am highly interested in this software, which I would like to package for Debian as soon as I get some time (which, unfortunately, may only happen in some months…). Anyway, I thought about one possible way of using cv which could be useful:

$ cv COMMAND

For instance:

$ cv cp bigfile /tmp

That would be the same kind of usage than commands like nice for instance, and would imply for cv to fork; in the child, to exec() the command specified in its arguments, and in the parent, to monitor continuously its child.

Time format

Could the time format for ETC/ETA be changed to make it look more like a time?

The output looks like:

[ 1099] dd /dev/sde 5.7% (26.7 GiB / 465.8 GiB) 13.9 MiB/s eta 8:59:59

which makes me wonder if the ETC is really a countdown for the amount of time remaining.

Could it be in a standard time format instead

slow startup

When starting up progress and -w, -W, -m, or -M are set, only wait for 0.1s before displaying the UI, otherwise progress feels sluggish. Further updates should happen according to whatever has been set or default (1 second).

The target size is used in 'dd' while the progress should estimated by source.

When dd one device to another, size of the target is shown. This is ok, when source size > target size, but this situation is weird.
Common usage is to dd equal devices or smaller to bigger. In last case, the amount of bytes (blocks) to copy is determined by source device size.
But cv uses target device size thus giving wrong estimation.

Won't compile because of missing header

$ make && make install 
gcc -g -Wall -D_FILE_OFFSET_BITS=64 -c cv.c
cv.c:32:20: fatal error: curses.h: No such file or directory
 #include <curses.h>
                    ^
compilation terminated.
make: *** [cv.o] Error 1

Simpler screenshots

The screenshots use a highly customized shell which detracts from what the tool actually does. Perhaps do PS1='$ ' before taking the screenshots?

Total progress when copying or moving multiple files?

When copying or moving multiple files using e.g. the command cp 1 2 3 target/directory/, those parameters are visible using ps aux.

I'm aware it's also possible to find the current working directory of a process using /proc/<pid>/cwd, so you could use that to determine which files cp / mv has already been operated on, as well as which files it's going to operate on. The command-line arguments are relative to the working directory, but it seems we could easily get that information and find out the full file paths.

With that information, wouldn't it be possible for cv to show the total progress (counting all files to be copied or moved) as well as the current file progress?

I would be willing to work on a pull request for this, but would first want to make sure you think it's doable, whether it's a good idea, etc.

Thanks.

no progress output for dd to /dev/null

Perhaps this is related to issue #15 .
Following command:

dd if=/dev/urandom of=/dev/null bs=1M count=100000

does not yield output in 'progress'. It does detect a running dd command, since the warning "No command currently running" does not appear, but does not show any progress output.

Changing the output file to /tmp/foo fixes that.

Perhaps it is impossible to get accurate progress information in this case, but I'd expect a message telling me that.

Support monitoring by PID

Hello,

I think it could be useful to be able to let cv monitor a running process, or a list of processes, by PID, that is:

$ cv -p PID [PID…]

That would allow to specify exact processes instead of relying on the command names; in addition it would make it possible to use tools such as pgrep to do that selection, for instance:

$ cv -p $(pgrep -f bigfile)

(in this example, pgrep prints the PIDs of processes which have the string “bigfile” in their full commande line, and this list is passed as argument after “cv -p”)

'rm' support

It would be nice to have support for the 'rm' command.

The description of the project tell's rm is supported but it is not in the list of commands that are monitored by default.

progress -c rm also didn't work.

Make failed on ubuntu 14.04

gcc -Wall -lncurses -lm cv.o sizes.o hlist.o -o cv anabrodov@tomsk
cv.o: In function nprintf': /home/anabrodov/bin/cv/cv.c:72: undefined reference tovwprintw'
cv.o: In function nfprintf': /home/anabrodov/bin/cv/cv.c:83: undefined reference tovwprintw'
cv.o: In function nperror': /home/anabrodov/bin/cv/cv.c:91: undefined reference toprintw'
cv.o: In function monitor_processes': /home/anabrodov/bin/cv/cv.c:465: undefined reference tostdscr'
/home/anabrodov/bin/cv/cv.c:465: undefined reference to wclear' /home/anabrodov/bin/cv/cv.c:466: undefined reference tostdscr'
/home/anabrodov/bin/cv/cv.c:466: undefined reference to wrefresh' /home/anabrodov/bin/cv/cv.c:514: undefined reference tostdscr'
/home/anabrodov/bin/cv/cv.c:514: undefined reference to wclear' /home/anabrodov/bin/cv/cv.c:515: undefined reference tostdscr'
/home/anabrodov/bin/cv/cv.c:515: undefined reference to wrefresh' cv.o: In functionint_handler':
/home/anabrodov/bin/cv/cv.c:581: undefined reference to endwin' cv.o: In functionmain':
/home/anabrodov/bin/cv/cv.c:597: undefined reference to initscr' /home/anabrodov/bin/cv/cv.c:609: undefined reference tostdscr'
/home/anabrodov/bin/cv/cv.c:609: undefined reference to wrefresh' /home/anabrodov/bin/cv/cv.c:614: undefined reference toendwin'
hlist.o: In function set_hlist_size': /home/anabrodov/bin/cv/hlist.c:12: undefined reference toceil'
collect2: error: ld returned 1 exit status

Some missing dependencies?

PROGRESS_ARGS causes segfaults

PROGRESS_ARGS=' ' progress works, as does PROGRESS_ARGS='-M' progress and PROGRESS_ARGS='-M' progress -M, but then we have:

$ PROGRESS_ARGS='-M' progress -M -M
Segmentation fault (core dumped)

$ PROGRESS_ARGS='-M' progress --ignore-file ~/.xsession-errors
Segmentation fault (core dumped)

Execute command with progress

Set up a way to execute commands and monitor them.

e.g.:

progress -C "cp -a /media/cdrom/x /storage/c/"

will fork cp in the background, and monitor it on the stdin. This allows me to run the progress and cp in one tty only.

rsync support

It would be nice to have support for the rsync command.

Cannot compile on FreeNAS 9.10

I get this error:

progress.c:48:11: fatal error: 'linux/fs.h' file not found

Is there any way to make it compatible with FreeBSD?

cp / mv on many small files shows errors

Hi,

when you copy / move a lot of small files, cv is too slow to open the fd information. So there are permantly some errors showing in monitor mode.
Just stumbled about it while moving my photo collection to my new ssd, maybe this error is not reproducable with normal hard drives.

Suggested change: A file not found error should be ignored and not printed out in monitor mode. Maybe redirect it to stderr.

Regards,
Simon

Command shown: cv -mw
a

Unable to install ncurses via pkg-config

Hi,

Since today I'm running into an issue while trying to install progress on Ubuntu 14.04, here is the output I get, apparently it has something to do with 96a39c2. Are there any new installation steps on top of installing libncurses5-dev ?

Anyway, using release v0.12.1 is still working.

---- Begin output of cd /home/vagrant/progress && make && sudo make install ----
STDOUT: cc -Wall progress.o sizes.o hlist.o -o progress -lm
STDERR: Package ncurses was not found in the pkg-config search path.
Perhaps you should add the directory containing `ncurses.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ncurses' found
progress.o: In function `nprintf':
/home/vagrant/progress/progress.c:96: undefined reference to `vwprintw'
progress.o: In function `nfprintf':
/home/vagrant/progress/progress.c:107: undefined reference to `vwprintw'
progress.o: In function `nperror':
/home/vagrant/progress/progress.c:115: undefined reference to `printw'
progress.o: In function `monitor_processes':
/home/vagrant/progress/progress.c:700: undefined reference to `stdscr'
/home/vagrant/progress/progress.c:700: undefined reference to `wclear'
/home/vagrant/progress/progress.c:701: undefined reference to `stdscr'
/home/vagrant/progress/progress.c:701: undefined reference to `wrefresh'
/home/vagrant/progress/progress.c:767: undefined reference to `stdscr'
/home/vagrant/progress/progress.c:767: undefined reference to `wclear'
/home/vagrant/progress/progress.c:830: undefined reference to `stdscr'
/home/vagrant/progress/progress.c:830: undefined reference to `wrefresh'
progress.o: In function `int_handler':
/home/vagrant/progress/progress.c:840: undefined reference to `endwin'
progress.o: In function `main':
/home/vagrant/progress/progress.c:874: undefined reference to `initscr'
/home/vagrant/progress/progress.c:886: undefined reference to `stdscr'
/home/vagrant/progress/progress.c:886: undefined reference to `wrefresh'
/home/vagrant/progress/progress.c:891: undefined reference to `endwin'
collect2: error: ld returned 1 exit status
make: *** [progress] Error 1
---- End output of cd /home/vagrant/progress && make && sudo make install ----

Thanks

Add to Brew for Mac

Trying the utility now - I'll respond if I end up working on this ticket.

Support sparse files?

I'm copying some sparse files (VMDKs created by VMware). The apparent size of one of the files is 900GB, while the actual size of the file is 434GB. While copying the file with cp (which properly supports copying sparse files), progress reports the size of the file as the apparent size rather than the actual size.

Is proper support for sparse files on the roadmap at all?

Do not update the whole screen in -m mode

When in -m, do not update the whole screen. Have the cursor move around the screen and only rewrite the parts that are necessary to update. This is, for example, how "watch" does this, as well as all the others (top, irssi, ...). Updating the whole screen makes it impossible to copy stuff out of the terminal, which is super annoying.

You can likely do this by using the right lib for terminal display or the right options to it.

HomeBrew Port

This would be awesome if it was installable by home brew?

Is this something the project has looked at doing

Change to a more fitting name

cv, as much as it's an amazing short name, doesn't really relate to what the thing does. I wager a bet that most people won't use the command as any other one-syllable commands (cat, cp, mv, cd, ...) so a longer, more descriptive name would be more fitting. The first thought is "progress" but someone might have a better idea. Typing prog^I will be enough to run it at least on my system (which is a very non-special Ubuntu install)

Make -M default

I always just use progress -M. I would like to be able to omit -M. When doing top you always get the "live monitoring" view as well, rather than the "one-shot" display.

Random Question

What font are you using for powerline in those screenshots? And what powerline lib? Zsh or Bash?

Thanks. I'm using Menlo and I don't care for it as much.

PROGRESS_ARGS documentation sparse

It is not clear how to add multiple arguments, please add an example which contains multiple long-form and short-form arguments.

It is not mentioned which arguments take precedence (env or command line).

Enable travis-ci

You have a .travis.yml file but it is not being used for your branches and incoming pull requests. If you go to travis-ci.org and login with Github you can enable Travis testing for every commit.

`du` support

Would be great to have support for du. Is this possible?

I don't understand progress output

Hi,
Really progress is a nice idea. But I've tried and I don't understand what it does.

For example:

 progress  -c firefox
[13536] firefox /home/sergio/.local/share/baloo/index
        0.0% (0 / 641.3 MiB)

It always shows the same thing. No matter Firefox does, and does not show anything when download a file.

Could you explain what I am missing of this tool?

Thanks in advance

shell 'for' loop support?

Of course, for is not a executable but a built-in command so I this is pretty difficult, but is there any possibility? Can you find the information needed with ptrace() on an sh or bash process?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.