What is system d ?
System d stands for system demon. It is the first process started by the kernel. It manage startup of Linux operating system, including startup and general service management. It works behind the operating system means in system backgrounds.
What is System d units?
Units are the objects that systemd knows how to manage. It is file that describe information about services, a sockets, mount points, swap partition details which is controlled by systemd .
There are mainly 11 types of service Units are there in a Linux machine.
( .service) = it controls and manage the system demons by systemd. Such like a web server.
(.socket ) = It represent IPC sockets that systemd should monitor. If a client connect to the socket, systemd will start a deamon and pass connection to it.
( .path ) = It mainly deals with file and folder so it check the existence file and create them as needed.
- ( .slice) = It manage the resources.
( .snapshots ) = Takes the of current state of the system.
( .swap ) = Create and use swap and swap partitions.
- ( .timer ) = Activate the action based on a timer.
( .target ) = It is used to grouping the units and syncing the points during startup.
( .mount ) = It is collect information about mount points managed and controlled by systemd.
- ( .device ) = It is used t define dependencies between device. It encodes the info. About sysfs/udev devices.
( .sockets) =
Systemd general information commands.
To find the version of systemctl :-
→ systemctl –version
- To find the binaries of systemctl :-
→ whereis systemctl
- To know the process is linked with systemd :-
→ ps -ef | grep systemd
Boot process of System d in linux :-
- Systemd is the first process started by the kernel.
- It is a replacement of old init process . Which is slower then new systemd .
- Because it starts the process of loading all the programs and load immediately.
- Each program can be loaded without waiting the unrelated programs starting.
- While in loder init loads the program one by one so it was taking so long time to boot the operating system, which is too much time consuming.
Some commands about Boot process :-
1. To find the Boot-up performance :-
systemd-analyze
2. To find the boot-up performance with time consume by each task :-
systemd-analyze blame
3. To find important /critical chain boot:-
systemd-analyze critical-chain
4. View critical chain with service unit :-
systemd-analyze critical-chain sshd.service
5. view critical chain by target :-
systemd-analyze critical-chain basic.target | grep target
systemd unit commands :-
1. Listing the all units available in machine :-
systemctl list-unit-files
2. Listing the all running Units in machine :-
systemctl list-units–state=active
3. Listing the fail Units in machine :-
systemctl list-units-files –state=failed
4. Listing the Units by service types :-
systemctl list-units-files – – type=service
5. Listing the Units by Mount points :-
systemctl list-units-files – -type=mount
6. Listing the Units by sockets :-
systemctl list-unit-files – – type=socket
7. Listing the Units by Slice :-
systemctl list-unit-files – – type= slice
8. Listing the Units by swap :-
systemctl list-unit-files – – type=swap
9. Listing the snapshot :-
systemctl list-unit-files – – type=snapshot
10. Listing the path :-
systemctl list-unit-files – – type=path
11. Listing the timer :-
systemctl list-unit-files – – type=timer
Leave a Reply