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.

After executing the command service --status-all I get a listing of all the services on my machine. I get an output like this.

[ ? ]  acpi-fakekey
[ ? ]  acpi-support
[ + ]  acpid
[ - ]  anacron
[ + ]  apache2
[ + ]  atd
[ - ]  bootlogd

What does a ? mean? I have always assumed a + means the process is started and a - means the process is stoppped. What state is a service preceded by ? in?

Here's the contents of my /proc/version file incase it helps anyone to answer me.

Linux version 2.6.32-5-amd64 (Debian 2.6.32-45)

Thanks in advance!

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The question mark in the output of service --status-all is printed when the /usr/sbin/service script does not find status line in the case structure in the related script under /etc/init.d.

If you look at the /usr/sbin/service script, you can find an if statement like this:

if ! grep -qs "\Wstatus)" "$SERVICE"; then
    #printf " %s %-60s %s\n" "[?]" "$SERVICE:" "unknown" 1>&2
    echo " [ ? ]  $SERVICE" 1>&2
    continue
else
share|improve this answer
1  
... and since that regular expression is not correct, it will also falsely print a ? if the status) line does not have a non-"[:alnum:]" character in front of it. –  faker Nov 7 '12 at 17:02

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.