how can you see if an rsync job is running or finished?

Warren Jenkins

Dabbler
Joined
Jul 21, 2013
Messages
11
Hi.

I have setup an rsync job to rsync from one freenas box to another. I am watching the folders on the receiving nas, but am curious to know how can I see, a) if a job is still running? and b)know when it has finished?
I though ssh'ing in to both nas's would show something and maybe it is, but I'm not sure what to look for??

Thanks in advance.
Woz.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
You have two options:
  1. Look for the rsync process using "ps ax | grep rsync". Run this on the box that has the rsync task defined. If you use "rsync over SSH" you will also see a rsync process on the other box, however if you use "rsync module" the other box will show a "rsync --daemon" process that runs permanently.
  2. FreeNAS rsync task creates a file lock on the rsync path directory (the path you are rsyncing). You can use "fstat [path]" to check if a lockf process is holding the lock.
Use any of the two methods. The process and the lock will be active while the task is running. They will disappear after the task finishes.
 

Warren Jenkins

Dabbler
Joined
Jul 21, 2013
Messages
11
Thanks - that was just what I was looking for.

On a side note, do you know what would be the command to stop the rsync task while it is running?

Thanks again.

Woz.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
"killall rsync" will stop all running rsync processes.
If you have more rsyncs running in parallel and want to stop just one of them: "kill [process_ID]". You can get the process_ID from ps ax (it's the first column).
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Is there a way to see a progress bar or a report that shows real time status like 25% of 100% completed?
 

Chapindad

Cadet
Joined
Oct 27, 2017
Messages
4
I did find one way. The FreeNAS Task uses a Tmp directory in the destination folder: ".~tmp~".

I just did a "sudo ls .~tmp~" in the directory to see the files it has copied.
 

artis1sysop

Dabbler
Joined
Jul 31, 2017
Messages
21
Is there a way to see a progress bar or a report that shows real time status like 25% of 100% completed?

I would also like to see this in FreeNAS

We're rsync'ing large amounts of data from FreeNAS to FreeNAS across a site-to-site VPN and it could take hours or more. I'd like to get an idea when it will be done.
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
yes, me too, im used to watching rsync running with the --progress flag (i may go back to using my own manual rsync tasks between my FN boxes even though its no recommended, just for this reason).

it would be nice if maybe in the logs, at each 1% it would output the % complete, and speed (into logger or messages , as a rough example/temp solution)
 
Top