[pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log

Leo Nunner l.nunner at proxmox.com
Mon Nov 14 13:23:27 CET 2022


On 11/14/22 13:12, Thomas Lamprecht wrote:

> Am 14/11/2022 um 13:01 schrieb Leo Nunner:
>> dd supports a 'status' flag, which enables it to show the copied bytes,
>> duration, and the transfer rate, which then get printed to stderr.
>>
> can you post an excerpt of what it looks like and how frequent it outputs?

Currently, the output looks as following:

    2022-11-14 12:01:00 236978176 bytes (237 MB, 226 MiB) copied, 1 s,
    237 MB/s
    2022-11-14 12:01:01 596377600 bytes (596 MB, 569 MiB) copied, 2 s,
    298 MB/s
    2022-11-14 12:01:02 947388416 bytes (947 MB, 904 MiB) copied, 3 s,
    316 MB/s
    2022-11-14 12:01:03 1308295168 bytes (1.3 GB, 1.2 GiB) copied, 4 s,
    327 MB/s
    2022-11-14 12:01:04 1673527296 bytes (1.7 GB, 1.6 GiB) copied, 5 s,
    335 MB/s
    […]

> as unlike a TTY it cannot tell the console to override existing lines, so I
> guess this will do some periodic printing?

Yes, as of right now, it prints a new line every second. Maybe one 
option to make it "prettier"
would be to limit the lines printed (by, say, only printing every nth 
line/second), which should
be rather simple to implement by matching the dd output in Storage.pm, 
where log lines are
already being parsed [1].

[1] https://git.proxmox.com/?p=pve-storage.git;a=blob;f=PVE/Storage.pm#l824



More information about the pve-devel mailing list