Fix the listing of all rsync PIDs on the system. Fixes #24 #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for issue #24.
The argument '$2' for the awk command need to be escaped as '$2' to correctly reach the awk process (just like it's also done multiple other places in the script).
To show the problem and the result of the suggested fix, I have added a debug statement as well (feel free to cut that out if you like). This debug statement says:
Before the fix was applied:
DEBUG: PIDs of all rsync procs on the system: efam-da+ 28824 0.4 0.0 27972 9592 ? Ss 12:31 0:00 perl /home/mb/git/parsyncfp/parsyncfp -NP=3 --rsyncopts=--partial -v --info=BACKUP,FLIST0,STATS0 --maxbw=19200 --chunksize=2G --debug --verbose=2 --nowait --startdir=/home/mb/data . serv2:/tmp/dest jph 17682 0.0 0.0 23556 2932 ? Ss Jun17 0:00 rsync --server -vulogDtprze.iLsfx . /home/jph/data/ jph 17683 0.1 0.0 23816 1688 ? S Jun17 1:54 rsync --server -vulogDtprze.iLsfx . /home/jph/data2/ miba 25650 0.0 0.0 53940 8584 pts/0 S+ 12:29 0:00 vi parsyncfp/parsyncfp root 10517 44.3 0.1 209784 141996 ? R Jun17 469:24 /usr/bin/rsync --daemon --no-detach root 13644 0.0 0.0 4504 736 ? S 12:18 0:00 sh -c timeout 86400 rsync -avz -y --delete-during --stats --numeric-ids --partial serv3:/tmp/tmp_rsync/ /tmp/data3/ 2>&1 | tee /tmp/rsync-FQdta root 13645 0.0 0.0 11556 828 ? S 12:18 0:00 timeout 86400 rsync -avz -y --delete-during --stats --numeric-ids --partial serv3:/tmp_rsync3/ /tmp/data4/ root 13646 0.0 0.0 7296 668 ? S 12:18 0:00 tee /tmp/virtual_envs-live-rsync-gazelle-live_rsync-FQdta
After the fix was applied:
DEBUG: PIDs of all rsync procs on the system: 820 1947 1949 1958 1960 1969 1971 10517 13644 13645 13646 13647 13696 17682 17683 27954 31608