service --status-all takes too long

Bug #1742410 reported by OwN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-service (Ubuntu)
New
Undecided
Unassigned

Bug Description

The command:

service --status-all

Takes too long to iterate through all of the services. There should be a faster way (perhaps a --quick flag that doesn't actually check the status of the service, but just output its name) to search services. With Ubuntu 14.04 and Ubuntu 16.04 using different service names for php-fpm (php5-fpm in Ubuntu 14.04 and php7.0-fpm in Ubuntu 16.04), developers supporting multiple platforms need to be able to determine the service name.

If I run the below command on a slower computer:

service --status-all 2>&1 | grep -F -- "-fpm" | awk '{print $4}'

It takes several seconds (up to 5 seconds) to return "php7.0-fpm".

That, or I think we should be able to do something like this

service --status-all fpm

In which the listed services only include services that contain the characters "fpm" in them.

Developers that have to interact with these services need a faster way to determine the name of the service since they continually change from one OS version to another.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.