1

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 ?,+,- ?

Raja G
  • 102,391
  • 106
  • 255
  • 328

2 Answers2

2

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

steeldriver
  • 136,215
  • 21
  • 243
  • 336
0

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
phoibos
  • 21,456