BlueOnyx 5209R System Administrator Cheat Sheet

BlueOnyx 5209R on EL7 clones (CentOS7 or Scientific Linux 7) does a few things differently than previous BlueOnyx users might be used to.

The major difference is Systemd, which replaces the previous Init-services. You can still use /sbin/service to stop or start services. In most cases this will just redirect to the proper systemctl command of Systemd. But in most cases you can no longer use /etc/init.d/<service-name> <command> to stop, start or restart services.

So here are the new commands that you should pick up along the way:

/usr/bin/systemctl

As this command resides in /usr/bin/ you can simply call it without the path. To check the status of a service you would use it this way:

#> systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: active (running) since Mi 2015-02-04 06:01:34 PET; 2 days ago
 Main PID: 7207 (/usr/sbin/httpd)
   Status: "Total requests: 263; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─4529 /usr/sbin/httpd -DFOREGROUND
           ├─4530 /usr/sbin/httpd -DFOREGROUND
           ├─4531 /usr/sbin/httpd -DFOREGROUND
           ├─4532 /usr/sbin/httpd -DFOREGROUND
           ├─4533 /usr/sbin/httpd -DFOREGROUND
           ├─4534 /usr/sbin/httpd -DFOREGROUND
           ├─7207 /usr/sbin/httpd -DFOREGROUND
           ├─7208 /usr/sbin/httpd -DFOREGROUND
           ├─7212 /usr/sbin/httpd -DFOREGROUND
           ├─7213 /usr/sbin/httpd -DFOREGROUND
           ├─7215 /usr/sbin/httpd -DFOREGROUND
           └─9452 /usr/sbin/httpd -DFOREGROUND

Feb 04 06:01:34 5209r systemd[1]: Started The Apache HTTP Server.

As you can see: The output is a bit more detailed than you might be used to. It tells us that the service is enabled and currently running. It tells us the main PID and which child processes it has spawned. It also shows relevant log entries at the bottom of the listing. Errors or warnings that happened during startup will be shown there as well.

To stop, start, restart or reload the service (in our examples below we use http.service) you would use these commands:

Stop:

#> systemctl stop httpd.service

Start:

#> systemctl start httpd.service

Restart:

#> systemctl restart httpd.service

Reload:

#> systemctl reload httpd.service

Kill: (To kill off all active processes of a spawned service)

#> systemctl kill httpd.service

To turn off a service (to prevent it from starting during a reboot) you use systemctl as well:

Disable a service:

#> systemctl disable httpd.service

Enable a service:

#> systemctl enable httpd.service

Debugging:

To debug the status of all Systemd services you can use this command, which will show the most recent relevant Systemd activity:

#> journalctl -xl

More information:

For a deeper look into the available options of the commands "systemctl" and "journalctl" please see their help pages or man pages:

Systemctl:

#> systemctl --help 
#> man systemctl

Journalctl:

#> journalctl --help 
#> man journalctl

Special notice on CCEd:

BlueOnyx servers use the daemon CCEd as backend. CCEd is also managed via Systemctl. To stop, start or restart CCEd you use these commands:

#> systemctl stop cced.init.service
#> systemctl start cced.init.service 
#> systemctl restart cced.init.service

However, CCEd also supports "rehash" as optional method for starting it without running the constructors. Systemd does not support non-standard options such as "rehash". So if you need to rehash CCEd, you can do it this way:

#> /usr/sausalito/sbin/cced.init rehash

This will rehash CCEd to re-initialize the database connectors and schemas without running the constructors.