Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print interim statistics to STDERR on demand #111

Open
salsferrazza opened this issue Mar 5, 2023 · 0 comments
Open

Print interim statistics to STDERR on demand #111

salsferrazza opened this issue Mar 5, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@salsferrazza
Copy link
Collaborator

One could run the transcoder with debug options, but this slows down processing since the output is a function of a file. In some instances, one might desire seeing where a txcode process is with it's current batch non-destructively. One way to do this might be trapping kill -s INFO signal in main thread and then dump a snapshot of the progress up to that point. The dd command has a similar feature:

Sending an `INFO' signal to a running `dd' process makes it print
I/O statistics to standard error and then resume copying.  In the
example below, `dd' is run in the background to copy 10 million blocks.
The `kill' command makes it output intermediate I/O statistics, and
when `dd' completes, it outputs the final statistics.

     $ dd if=/dev/zero of=/dev/null count=10MB & pid=$!
     $ kill -s INFO $pid; wait $pid
     3385223+0 records in
     3385223+0 records out
     1733234176 bytes (1.7 GB) copied, 6.42173 seconds, 270 MB/s
     10000000+0 records in
     10000000+0 records out
     5120000000 bytes (5.1 GB) copied, 18.913 seconds, 271 MB/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant