Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I am used a command as service --status-all

oot@frank-Jai:~#  service --status-all 
 [ ? ]  acpi-support
 [ ? ]  acpid
 [ ? ]  alsa-restore
 [ ? ]  alsa-store
 [ ? ]  anacron
 [ + ]  apache2
 [ + ]  apparmor
 [ ? ]  apport
 [ ? ]  avahi-cups-reload
 [ ? ]  avahi-daemon
 [ ? ]  binfmt-support
 [ ? ]  bluetooth
 [ - ]  bootlogd
 [ - ]  brltty
 [ ? ]  console-font
 [ ? ]  console-setup
 [ ? ]  cron
 [ ? ]  cups
 [ ? ]  cups-browsed
 [ ? ]  dbus
 [ ? ]  dmesg
 [ ? ]  dns-clean
 [ - ]  dnsmasq
 [ ? ]  failsafe-x
 [ ? ]  friendly-recovery
 [ - ]  grub-common
 [ - ]  hostapd
 [ ? ]  hostname
 [ ? ]  hwclock
 [ ? ]  hwclock-save
 [ ? ]  irqbalance
 [ ? ]  kdm
 [ - ]  kerneloops
 [ ? ]  killprocs
 [ ? ]  kmod
 [ ? ]  lightdm
 [ ? ]  modemmanager
 [ ? ]  mysql
 [ ? ]  network-interface
 [ ? ]  network-interface-container
 [ ? ]  network-interface-security
 [ ? ]  network-manager
 [ ? ]  networking
 [ ? ]  networking.dpkg-new
 [ ? ]  ondemand
 [ ? ]  plymouth
 [ ? ]  plymouth-log
 [ ? ]  plymouth-ready
 [ ? ]  plymouth-splash
 [ ? ]  plymouth-stop
 [ ? ]  plymouth-upstart-bridge
 [ ? ]  powernap
 [ ? ]  pppd-dns
 [ ? ]  procps
 [ ? ]  pulseaudio
 [ ? ]  rc.local
 [ ? ]  resolvconf
 [ ? ]  rfkill-restore
 [ ? ]  rfkill-store
 [ - ]  rsync
 [ ? ]  rsyslog
 [ + ]  saned
 [ ? ]  sendsigs
 [ ? ]  setvtrgb
 [ ? ]  speech-dispatcher
 [ - ]  stop-bootlogd
 [ - ]  stop-bootlogd-single
 [ - ]  sudo
 [ ? ]  udev
 [ ? ]  udev-fallback-graphics
 [ ? ]  udev-finish
 [ ? ]  udevmonitor
 [ ? ]  udevtrigger
 [ ? ]  ufw
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ - ]  unattended-upgrades
 [ - ]  urandom
 [ ? ]  vboxautostart-service
 [ ? ]  vboxballoonctrl-service
 [ ? ]  vboxdrv
 [ ? ]  vboxweb-service
 [ + ]  vmware
 [ ? ]  vmware-USBArbitrator
 [ + ]  vmware-workstation-server
 [ ? ]  whoopsie
 [ - ]  x11-common
root@frank-Jai:~# 

what's they are exactly trying to convey from those ?,+,- ?

share|improve this question
    
@ændrük yeah closing it. Thank you. –  raaz Aug 24 '13 at 16:26
add comment

marked as duplicate by ændrük, raaz, fossfreedom Aug 24 '13 at 17:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

As far as I know,

[ + ] means the service is running
[ - ] means the service is stopped
[ ? ] means the status of the service cannot be determined

I don't know exactly the circumstances in which a service's status cannot be determined, but in some cases it's because the service control has been moved from a traditional init script to an upstart job - in which case you can see its status using initctl instead e.g.

$ service --status-all 2>&1 | grep mysql
 [ ? ]  mysql

$ initctl status mysql
mysql start/running, process 1182

The equivalent to service --status-all for upstart jobs is initctl list

share|improve this answer
add comment

Take a look what service actually is:

user@box:~$ sudo file $(which service)
/usr/sbin/service: POSIX shell script, ASCII text executable

It's a shell script, so you can examine it.

service --status-all checks each init script in /etc/init.d if it supports a status parameter. If it does, it calls the init script again, this time with the status parameter and checks if the service is running.

So that means:

[ + ] Service running
[ - ] Service not running

and

[ ? ] Service might or might not be running, the script seemingly does not support a status parameter
share|improve this answer
add comment

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