Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to understand the output of the service --status-all command on Ubuntu 13.10, since the man page doesn't explain it. For example:

[ + ]  rsyslog
[ - ]  sendmail
[ ? ]  sendsigs
[ + ]  setvtrgb
[ - ]  ssh

What do +, -, ? mean? I can't figure it out. I had sendmail installed before but I stopped and removed it with apt-get remove sendmail*. I guess that didn't get rid of the init script in /etc/init.d/ and that's why it shows it in the output, but at least it's a -, so I assume it's not running. Then, SSH. I'm actually SSH-ing into the server, so I assume the SSH service should be running, but it's a - there anyway. And then there's the cryptic ?. Somebody please shed some light on what this actually means.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The service --status-all command tries to figure out for every init script in /etc/init.d if it supports a status command (by grepping the script for status).

If it doesn't find that string it will print [ ? ] for that service.

Otherwise it will run /etc/init.d/$application status.
If the return code is 0 it prints [ + ].
If it's not 0 it prints [ - ].

Why does ssh print [ - ] even though it's still running?
ssh is controlled by upstart in Ubuntu (13.10).
Running /etc/init.d/ssh status will produce no output and a return code of 1.

share|improve this answer
    
Oh, upstart. Thanks for the detailed reply, service --status-all is much more clear to me now. So to get a full picture I should also use initctl list and kind of "or" the results together? Is there some more complete and comprehensive way? –  p4sh4 Jul 20 at 11:49
    
Yep use also initctl list or just general ps ..., at least until systemd is being used... –  faker Jul 20 at 11:57
    
Thanks for pointing out systemd, now I'm looking forward to 14.10... –  p4sh4 Jul 20 at 13:02
    
As far as I know 14.10 doesn't use systemd yet, but I'm not a Ubuntu guy. I could be wrong. –  faker Jul 20 at 13:03
    
14.10 isn't out yet, they're planning to offer it as an alternative to upstart but both will work in the near future apparently –  p4sh4 Jul 21 at 6:05

Your Answer

 
discard

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.