I'm on a Linux busybox 1.27
only system so no output=progress
available, no busybox's own implementation of pv
which is pipe_progress
nor pv
itself.
I have two questions. The first is based on https://www.linux.com/training-tutorials/show-progress-when-using-dd/. It says that by sending the USR1
signal to dd
it "pauses" the process and dd
after printing its current status will continue with the job it was doing. I'm trying to do some benchmark tests with dd
so I would like to have minimal impact on the dd
operation. I want to get an output of the current operation every second because the data that's passing through dd
is fluctuating and it is important to me to recognize when the transfer rate drops.
First question: Is it true that 'dd' "pauses" every time it receives a USR1
signal?
If dd
pauses every second then I'll be adding hours to the operation when tens of gigabytes are being transferred.
Second question: Assuming yes as an answer to the first question, I would like to know if it's possible to get dd
to print its current status without sending any signal to the process, maybe some kind of redirection for STDOUT
(like 2>&1)?
What I'm referring to is:
# bs with 1Mib so I can have more control on the test.
dd if=/dev/zero of=/dev/null bs=1048576 count=1024
Printing current operation status.
sudo kill -USR1 $dd_pid
time dd …
without and withwhile sleep 1; do kill -s USR1 $(pidof dd); done
running aside. It may be the delay turns out to be acceptable to you. – Kamil Maciorowski Nov 02 '21 at 07:18dd
ing? Typically the CPU usage is not the limiting factor fordd
(watchtop
whiledd
is in progress!), so while "pausing" the process for some microseconds the transfer will probably continue to write data from the cache via DMA and have no influence at all on the transfer speed. – Philippos Nov 02 '21 at 07:51time
due to cache/buffering happening. I'm not quite sure how the mechanisms behind the scene are going to interfere when measuring withtime
but is worth trying to get an idea. Hopefully it will not make much of a difference, a minimum delay is ok. – abacox Nov 02 '21 at 07:59chroot
) and computer's NIC 10/100 (one way or another I was able to connect them all). So consistency is very important, as far as I can stick with standard practices/tools I should be fine. All of them over TCP directly or TCP tunneling (TCP over different protocols likeRNDIS
, not "real" TCP). I really don't want to start transferring several gigabytes of data without any expectation of what might happen. But I have hope on cache/buffer. – abacox Nov 02 '21 at 08:08