Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Unix machine

$ uname -a
SunOS machine-name 5.10 Generic_127112-11 i86pc i386 i86pc

How would I get the number of rsync process running on my unix box. I tried

$ ps -ef | grep rsync 

But it showing me the list of all rsync processes. Is there any way to get exact number of rsync process running?.

in /etc/rsyncd.conf I have set max_connections=150

share|improve this question
up vote 2 down vote accepted

Try something like:

ps -ef | grep rsync | wc -l

wc -l will count lines. You should have one line per rsync process.

share|improve this answer
thanks Matt...wc -l helped me.... – meMangesh Mar 21 '13 at 9:18
careful with that.. ps -ef | grep rsync also returns the running grep command, so wc -l may return "1" even if no rsync process is running (at least on my linux box it does) -> use ps -ef | grep rsync | grep -v grep | wc -l instead – Gryphius Mar 21 '13 at 10:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.