# service sshd restart



## macaujohn2000 (Jul 31, 2012)

Dear all,

I am a junior user in FreeBSD, I have used VMware 8.x for installing FreeBSD 9.0, some problems might show as:

1. When I use one vCPU, if I issued service sshd restart, the screen showed stopping sshd and starting sshd.
When I use two vCPU, if I issued service sshd restart, the screen showed waiting for PIDS: 1185 and starting sshd.

Even if there are no problems to services, but I want to ask why different message showing in above case?


----------



## SirDice (Jul 31, 2012)

The second message just indicates that there was still something using it and it had to wait.

Both are normal messages.


----------



## macaujohn2000 (Aug 1, 2012)

I think that these message can make IT administrators to be confused, but why the core team in FreeBSD do not fix this issue? "stopping sshd and starting sshd" is a better to show to users.


----------



## mwatkins (Aug 1, 2012)

Restarting a core system daemon isn't an "end-user" experience. "IT administrators" should not be confused by the following output:


```
% /etc/rc.d/sshd start
sshd already running? (pid=1523).

 % /etc/rc.d/sshd restart
Stopping sshd.
Waiting for PIDS: 1523.
Starting sshd.
```

What is happening is very clear. Worse would be a pause with no explanation while the system restarts.

Likewise, if one kills a running sshd independent of the rc script, you get another informative message:


```
% /etc/rc.d/sshd restart
sshd not running? (check /var/run/sshd.pid).
Starting sshd.
```

There is nothing to "fix" here.


----------



## SirDice (Aug 1, 2012)

mwatkins said:
			
		

> There is nothing to "fix" here.


I agree.


----------



## fluca1978 (Aug 2, 2012)

macaujohn2000 said:
			
		

> Even if there are no problems to services, but I want to ask why different message showing in above case?



I would be a lot more confused by having less messages or even no messages at all!
Now, in this specific case the _waiting for pids_ sentence could be made more clear using something like _waiting for processes to quit (pids = ...)_ but you have tp consider that a system administrator knows the relation between a process and its pid and that short messages are easiest to report, to display on consoles without having to scroll.


----------

