dspinellis/pmonitor

Progress for the same file read by different processes wrong

BenBE opened this issue · 0 comments

BenBE commented

When reading the same file with multiple processes the output repeats the progress for the file in a strange way.

Sample output:

$ pmonitor -i 1 -f /mnt/work/entries.txt
/mnt/work/entries.txt 45.78% 
/mnt/work/entries.txt 58.62% 
/mnt/work/entries.txt 0.00% 
/mnt/work/entries.txt 45.79% ETA 9:01:08
/mnt/work/entries.txt 58.64% ETA 0:00:09
/mnt/work/entries.txt 0.00% ETA 0:00:09
/mnt/work/entries.txt 45.79% ETA 8:00:59
/mnt/work/entries.txt 58.66% ETA 0:00:12
/mnt/work/entries.txt 0.00% ETA 0:00:12
/mnt/work/entries.txt 45.80% ETA 7:12:50
/mnt/work/entries.txt 58.67% ETA 0:00:19
/mnt/work/entries.txt 0.00% ETA 0:00:19

I'd expect the thrid entry to be without an ETA (or if it really was at the beginning to have a quite high one)

Raw output from lsof:

$ LANG=C LC_ALL=C lsof -w -o0 -o -- /mnt/work/entries.txt | grep entries; sleep 1; LANG=C LC_ALL=C lsof -w -o0 -o -- /mnt/work/entries.txt | grep entries

pigz    20241 user     3r   REG   0,56 0t2528116736 6196851 /mnt/work/entries.txt
brotli  22412 user     3r   REG   0,56 0t3430154240 6196851 /mnt/work/entries.txt
mc      23499 user     9r   REG   0,56       0t8192 6196851 /mnt/work/entries.txt

pigz    20241 user     3r   REG   0,56 0t2528378880 6196851 /mnt/work/entries.txt
brotli  22412 user     3r   REG   0,56 0t3431202816 6196851 /mnt/work/entries.txt
mc      23499 user     9r   REG   0,56       0t8192 6196851 /mnt/work/entries.txt

The file is 5233358936 bytes.

For process 23499 there should be no ETA, the other processes should show appropriate ETAs, which I doubt for pigz (10318 seconds from the lsof output) and brotli (4991 seconds from lsof output).