Who’s down with systemd?

Written by James McDonald

October 26, 2011

Fedora 16 take a bow…

Gnome 3 makes me feel like I own an Apple. I feel really smart and stylish using it.

Even better is the bump from the 2.* series kernels up to 3.

However progress means change and for years I’ve been comfortable with chkconfig –list to display and manage my SysV services

Enter systemd

How do I list my services now that chkconfig has been replaced by systemctl?
http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

ls /lib/systemd/system/*.service /etc/systemd/system/*.service
systemctl list-units --all # this doesn't seem to list all the *.services

How do I start/stop, enable/disable systemd services?
https://fedoraproject.org/wiki/Systemd#How_do_I_start.2Fstop_or_enable.2Fdisable_services.3F

 

Does the service exist

# firstly does the service exist
# command split over multiple lines for readability
[root@mybox ~]# ls /lib/systemd/system/*.service \
/etc/systemd/system/*.service \
| grep -i nx
# output
/lib/systemd/system/freenx-server.service

Enable a Service

# enable it
[root@mybox ~]# systemctl enable freenx-server.service
#output follows
ln -s '/lib/systemd/system/freenx-server.service' \
'/etc/systemd/system/multi-user.target.wants/freenx-server.service'

Start a Service

# start it 
[root@mybox ~]# systemctl start freenx-server.service 
[root@mybox ~]# ps -ef | grep -i nx 
root 9209 8936 0 11:09 pts/2 00:00:00 grep --color=auto -i nx

Check the Status

[root@mybox ~]# systemctl status freenx-server.service 
freenx-server.service - FreeNX Server Loaded: loaded 
(/lib/systemd/system/freenx-server.service; enabled) 
Active: active (exited) since Wed, 26 Oct 2011 11:07:55 +1100; 27s ago 
Process: 9131 ExecStart=/usr/libexec/nx/nxserver --start (code=exited, status=0/SUCCESS) 
Process: 9052 ExecStartPre=/usr/libexec/nx/nxserver --cleanup (code=exited, status=1/FAILURE) 
CGroup: name=systemd:/system/freenx-server.service # ooh it's not working why?

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...