Is there a way to get precise list of services with "is running"/"is not running" statuses specified.

service --status-all

outputs more than 30 ? services.

Why is that output is so not informative? Is it that difficult to determine if service is running or not? And how to get the exact statuses for all services?

zerkms@ubuntu-server-11:~$ sudo service --status-all 2>&1|grep cron
 [ ? ]  cron
zerkms@ubuntu-server-11:~$ sudo service cron status
cron start/running, process 804
  • @Rinzwind: it returns several services with + and -, but most of services are marked with ?. It is just installed ubuntu-server 11.04 – zerkms Aug 6 '11 at 6:40
  • @Rinzwind: added the output sample to clarify what I mean – zerkms Aug 6 '11 at 6:44

It seems a bug in the service script. Changing the grep pattern in line 77 with this gives better results:



Found a bug report in Debian on this. A patch is available, functionally equivalent to what I write above: service doesn't correctly parse "cron" init.d. Launchpad do not recognize the project sysvinit-utils.

  • Yep, now looks much better. Could you please file a bug then? (I'm not proficient in ubuntu at all, and don't even know where their bug tracker is) ;-) – zerkms Aug 6 '11 at 7:24
  • Of course, i'll do, if it is not signaled yet – enzotib Aug 6 '11 at 7:26
  • ok. Checked your answer. PS: please add a reference to a bug then after, so I could track it ;-) – zerkms Aug 6 '11 at 7:28
  • thanks for the reference. Surprisingly the bug committer chose the cron too ;-) – zerkms Aug 6 '11 at 8:52
  • Thanks, that fixed most of the ?s, though not all. Among others Citadel is still showing a ?. – Lance Roberts Aug 21 '11 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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