2

How do I kill these rsync daemons that keep respawning

root@que2 ~ # ps aux | grep rsync
root      9660  0.0  0.0  19928  2844 ?   S    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto28/ /remote-backups/.que2.domain.com/home/.moto28/
root      9661  0.2  0.0  19988  3276 ?   S    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto27/ /remote-backups/.que2.domain.com/home/.moto27/
root      9662  0.0  0.0  18064  1948 ?   D    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto28/ /remote-backups/.que2.domain.com/home/.moto28/
root      9663  0.1  0.0  19756  2252 ?   S    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto27/ /remote-backups/.que2.domain.com/home/.moto27/
root      9664  0.0  0.0  19920  2332 ?   D    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto27/ /remote-backups/.que2.domain.com/home/.moto27/
root      9667  0.0  0.0  19892  1812 ?   S    13:35   0:00 rsync -rlptD --progress --delete --exclude=server/files/* /home/.moto28/ /remote-backups/.que2.domain.com/home/.moto28/
root     12308  0.0  0.0  14612  2356 pts/1    S+   13:36   0:00 grep --color=auto rsync

On Ubuntu 14.01

root@que2 ~ # sysv-rc-conf --level 2345 rsync off
root@que2 ~ # sysv-rc-conf --list rsync
rsync        0:off      1:off   2:off   3:off   4:off   5:off   6:off
root@que2 ~ # service rsync status
 * rsync is not running

Do I kill each individual process id?

for i in $(pgrep -f rsync); do kill -9 "$i"; done ;

Or can I killall rsync?

killall rsync
Vituvo
  • 337
  • 2
  • 5
  • 16
  • 1
    You can use either of the two methods. Should do the same at the bottom line. I would not use `kill -9` in the first place and only use `-9` as a last resort. The processes in `D` state probably may take some time to go away. – Thomas Mar 04 '18 at 07:41

0 Answers0