1
1
Is there a way to get shorter/custom output from systemctl status? I really only need the active line prepended with the name of the service. So something like this:
apache2: active (running) since Thu 2020-02-06 17:20:42 +03; 16min ago
mongodb: inactive (dead) since Thu 2020-02-06 17:20:47 +03; 16min ago
rabbitmq-server: active (running) since Thu 2020-02-06 17:20:52 +03; 16min ago
mongodb-server: active (running) since Thu 2020-02-06 17:20:54 +03; 16min ago
mysql: active (running) since Thu 2020-02-06 17:20:57 +03; 16min ago
only with color feedback. But I would settle for it without color. Or on two lines plus a blank line like:
● apache2.service - The Apache HTTP Server
Active: active (running) since Thu 2020-02-06 17:20:42 +03; 16min ago
● mongodb.service - An object/document-oriented database
Active: inactive (dead) since Thu 2020-02-06 17:20:47 +03; 16min ago
● redis-server.service - Advanced key-value store
Active: active (running) since Thu 2020-02-06 17:20:52 +03; 16min ago
● rabbitmq-server.service - RabbitMQ Messaging Server
Active: active (running) since Thu 2020-02-06 17:20:54 +03; 16min ago
● mysql.service - MySQL Community Server
Active: active (running) since Thu 2020-02-06 17:20:57 +03; 16min ago
This kind of satisfies the latter btw:
systemctl status apache2.service mongodb.service \
redis.service rabbitmq-server.service mysql.service | grep -e Active -e ●
But it messes up the colors doesn't have the whitespace and I kind of expect there is a systemctl option or configuration somewhere where I can get exactly what I want.