Re: how to know the progressive state of dd
On Mon, Jun 25, 2018 at 06:07:23PM -0600, Todd C. Miller wrote: > As someone else mentioned you would use pkill on OpenBSD. > > However, you will also need to use SIGINFO, not SIGUSR1, to get > dd's status. BSD systems have traditionally used SIGINFO for this > purpose. Linux lacks SIGINFO so there is no consistent signal for > this kind of a thing there. > > - todd ... and do not send random signals to all processes. Find some way to target the right signal to the right process. For example from a shell script starting a dd background process use kill $! which will send a signal to the most recent background command. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Re: how to know the progressive state of dd
On 2018-06-26, Ax0n wrote: > When I'm dd-ing images (e.g. flashing SD Cards for raspberry pi), I > occasionally use pv from packages to do the file reading e.g. > > pv armv7.img | doas dd bs=1M of=/dev/rsd1c > > pv will send the file/device contents to stdout as fast as it can read it, > and dd will read stdin to write the file to disk (or to the raw device). pv > outputs a status bar, throughput statistics and ETA to stderr so you can > watch the progress. pv can be useful, but it can also slow things down a lot sometimes. A common shell config on BSDs is to have this: stty status ^T Then you can press ^T to send SIGINFO to the active process, it works for a few things (some other common ones besides dd are ping and fsck).
Re: how to know the progressive state of dd
When I'm dd-ing images (e.g. flashing SD Cards for raspberry pi), I occasionally use pv from packages to do the file reading e.g. pv armv7.img | doas dd bs=1M of=/dev/rsd1c pv will send the file/device contents to stdout as fast as it can read it, and dd will read stdin to write the file to disk (or to the raw device). pv outputs a status bar, throughput statistics and ETA to stderr so you can watch the progress. On Tue, Jun 26, 2018 at 4:21 AM, Tuyosi T wrote: > thanks for kind advises . > > on linux > - > # dd if=/dev/sdb of=./OpenBSD-8G-snapshot.img bs=32k > 58195+0 records in > 58194+0 records out > 1906900992 bytes (1.9 GB, 1.8 GiB) copied, 25.1818 s, 75.7 MB/s > 109011+0 records in > 109010+0 records out > 3572039680 bytes (3.6 GB, 3.3 GiB) copied, 56.2196 s, 63.5 MB/s > 154198+0 records in > 154198+0 records out > 5052760064 bytes (5.1 GB, 4.7 GiB) copied, 87.9162 s, 57.5 MB/s > 185970+0 records in > 185970+0 records out > 6093864960 bytes (6.1 GB, 5.7 GiB) copied, 116.37 s, 52.4 MB/s > 227547+0 records in > 227546+0 records out > 7456227328 bytes (7.5 GB, 6.9 GiB) copied, 147.202 s, 50.7 MB/s > 241920+0 records in > 241920+0 records out > 7927234560 bytes (7.9 GB, 7.4 GiB) copied, 154.806 s, 51.2 MB/s > > > regards >
Re: how to know the progressive state of dd
thanks for kind advises . on linux - # dd if=/dev/sdb of=./OpenBSD-8G-snapshot.img bs=32k 58195+0 records in 58194+0 records out 1906900992 bytes (1.9 GB, 1.8 GiB) copied, 25.1818 s, 75.7 MB/s 109011+0 records in 109010+0 records out 3572039680 bytes (3.6 GB, 3.3 GiB) copied, 56.2196 s, 63.5 MB/s 154198+0 records in 154198+0 records out 5052760064 bytes (5.1 GB, 4.7 GiB) copied, 87.9162 s, 57.5 MB/s 185970+0 records in 185970+0 records out 6093864960 bytes (6.1 GB, 5.7 GiB) copied, 116.37 s, 52.4 MB/s 227547+0 records in 227546+0 records out 7456227328 bytes (7.5 GB, 6.9 GiB) copied, 147.202 s, 50.7 MB/s 241920+0 records in 241920+0 records out 7927234560 bytes (7.9 GB, 7.4 GiB) copied, 154.806 s, 51.2 MB/s regards
Re: how to know the progressive state of dd
Todd C. Miller wrote: > As someone else mentioned you would use pkill on OpenBSD. > > However, you will also need to use SIGINFO, not SIGUSR1, to get > dd's status. BSD systems have traditionally used SIGINFO for this > purpose. Linux lacks SIGINFO so there is no consistent signal for > this kind of a thing there. Hah, it goes beyond that. Sending SIGUSR1 to a random process kills it. What a hoot
Re: how to know the progressive state of dd
Tuyosi T wrote: > hi all . > > on Linux > > dd-progress.bat < > --- > while true > do > date > killall -USR1 dd > echo > echo > sleep 30 > done > > but killall is not possibele on OpenBSD . > --- > regards true. doesn't work for me on windows either
Re: how to know the progressive state of dd
As someone else mentioned you would use pkill on OpenBSD. However, you will also need to use SIGINFO, not SIGUSR1, to get dd's status. BSD systems have traditionally used SIGINFO for this purpose. Linux lacks SIGINFO so there is no consistent signal for this kind of a thing there. - todd
Re: how to know the progressive state of dd
I do not understand what are you trying to achieve, but instead of killall you may use pkill(1) On Tue, Jun 26, 2018 at 1:33 AM, Tuyosi T wrote: > hi all . > > on Linux > > dd-progress.bat < > --- > while true > do > date > killall -USR1 dd > echo > echo > sleep 30 > done > > but killall is not possibele on OpenBSD . > --- > regards >
how to know the progressive state of dd
hi all . on Linux dd-progress.bat < --- while true do date killall -USR1 dd echo echo sleep 30 done but killall is not possibele on OpenBSD . --- regards