[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT - Convert output of byte count to GB count?



This is off-topic because it's on OS/X instead of Debian, but you folks are the smartest, so....

The GNU dd command, when sent the -USR1 signal, pauses processing long enough to spit out a status line, like so:

18335302+0 records in
18335302+0 records out 9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s

But the OS/X version (requiring the -SIGINFO signal instead of -USR1, which kills the process instead of just pausing it), spits out a status line like so:

5346+0 records in
5346+0 records out
5605687296 bytes transferred in 1890.826832 secs (2964675 bytes/sec)

The command I'm using to get this status message is:

kill -SIGINFO 32816

(32816 is the PID of the dd command in this case)

Is there any thing I can throw at this command, perhaps a sed or awk command, etc, which would convert the status' bytes output to GB output?

Thanks!


--
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Reply to: