CentOS7 Systemd의 이해와 활용

System Story/CentOS 7 2016. 2. 13. 18:40



이번 게시물에서는 Centos7 / RHEL7 에 본격 적용이 된 Systemd 에 대해서 알아보고 다양한 활용 예시에 대해서 알아보고자 한다. 

 

Systemd는 Centos6 버전까지 기반이였던 SystemV init을 대체하는 System 통합제어 프로세스로서 PID 1로 기동된다.

 

SystemV Init 의 역활은 전통적 Unix 와 같이 Kernel Level에서 작동하는 시스템 최상위 초기자로서 하위에 생성되는 모든 Process들 통제하고 관리한다.

 

하지만 Systemd는 단순 시스템 초기자의 역활만이 아닌 시스템의 통합 로그 관리자는 물론 서비스, HW, Timezone 등 다양한 시스템 영역을 관여하고 있다.

 

Systemd 에 대한 보다 자세한 사항은 아래 Sysemd 개발 Site을 참고하자 - https://www.freedesktop.org/wiki/Software/systemd/

 

 

 

 

1. 시스템에 설치되어있는 전체 서비스 상태 확인하기

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl -at service
  UNIT                                        LOAD      ACTIVE   SUB     DESCRIPTION
  abrt-ccpp.service                           loaded    active   exited  Install ABRT coredump hook
  abrt-oops.service                           loaded    active   running ABRT kernel log watcher
  abrt-vmcore.service                         loaded    inactive dead    Harvest vmcores for ABRT
  abrt-xorg.service                           loaded    active   running ABRT Xorg log watcher
  abrtd.service                               loaded    active   running ABRT Automated Bug Reporting Tool
  accounts-daemon.service                     loaded    active   running Accounts Service
  alsa-restore.service                        loaded    inactive dead    Restore Sound Card State
  alsa-state.service                          loaded    active   running Manage Sound Card State (restore and stor
  alsa-store.service                          loaded    inactive dead    Store Sound Card State
● apparmor.service                            not-found inactive dead    apparmor.service
  atd.service                                 loaded    active   running Job spooling tools
  auditd.service                              loaded    active   running Security Auditing Service
  auth-rpcgss-module.service                  loaded    inactive dead    Kernel Module supporting RPCSEC_GSS
  avahi-daemon.service                        loaded    active   running Avahi mDNS/DNS-SD Stack
  blk-availability.service                    loaded    active   exited  Availability of block devices
  bluetooth.service                           loaded    active   running Bluetooth service
  brandbot.service                            loaded    inactive dead    Flexible Branding Service
  chronyd.service                             loaded    active   running NTP client/server
  colord.service                              loaded    active   running Manage, Install and Generate Color Profil
  cpupower.service                            loaded    inactive dead    Configure CPU power related settings
  crond.service                               loaded    active   running Command Scheduler


 

※ 시스템에 설치되어있는 전체 Service 파일에 대한 수동 조회

 

[root@centos7 ~]#
[root@centos7 ~]# find /usr/lib/systemd/system/ -name \*.service
/usr/lib/systemd/system/tog-pegasus.service
/usr/lib/systemd/system/vboxadd.service
/usr/lib/systemd/system/systemd-halt.service
/usr/lib/systemd/system/autovt@.service
/usr/lib/systemd/system/systemd-kexec.service
/usr/lib/systemd/system/basic.target.wants/rhel-autorelabel-mark.service
/usr/lib/systemd/system/basic.target.wants/rhel-autorelabel.service
/usr/lib/systemd/system/basic.target.wants/rhel-configure.service
/usr/lib/systemd/system/basic.target.wants/rhel-dmesg.service
/usr/lib/systemd/system/basic.target.wants/rhel-loadmodules.service
/usr/lib/systemd/system/basic.target.wants/alsa-restore.service
/usr/lib/systemd/system/basic.target.wants/alsa-state.service
/usr/lib/systemd/system/runlevel4.target.wants/systemd-update-utmp-runlevel.service
/usr/lib/systemd/system/console-getty.service
/usr/lib/systemd/system/console-shell.service
/usr/lib/systemd/system/runlevel5.target.wants/systemd-update-utmp-runlevel.service
/usr/lib/systemd/system/systemd-udevd.service
/usr/lib/systemd/system/dbus-org.freedesktop.hostname1.service
/usr/lib/systemd/system/dbus-org.freedesktop.locale1.service
/usr/lib/systemd/system/dbus-org.freedesktop.login1.service
/usr/lib/systemd/system/dbus-org.freedesktop.machine1.service
/usr/lib/systemd/system/dbus.service
/usr/lib/systemd/system/dbus-org.freedesktop.timedate1.service
/usr/lib/systemd/system/debug-shell.service
/usr/lib/systemd/system/serial-getty@.service
/usr/lib/systemd/system/emergency.service
/usr/lib/systemd/system/messagebus.service

 

 

2. 현재 활성화 되어있는 Service 확인하기

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl -t service --state=active
UNIT                                          LOAD   ACTIVE SUB     DESCRIPTION
abrt-ccpp.service                             loaded active exited  Install ABRT coredump hook
abrt-oops.service                             loaded active running ABRT kernel log watcher
abrt-xorg.service                             loaded active running ABRT Xorg log watcher
abrtd.service                                 loaded active running ABRT Automated Bug Reporting Tool
accounts-daemon.service                       loaded active running Accounts Service
alsa-state.service                            loaded active running Manage Sound Card State (restore and store)
atd.service                                   loaded active running Job spooling tools
auditd.service                                loaded active running Security Auditing Service
avahi-daemon.service                          loaded active running Avahi mDNS/DNS-SD Stack
blk-availability.service                      loaded active exited  Availability of block devices
bluetooth.service                             loaded active running Bluetooth service
chronyd.service                               loaded active running NTP client/server
colord.service                                loaded active running Manage, Install and Generate Color Profiles
crond.service                                 loaded active running Command Scheduler
cups.service                                  loaded active running CUPS Printing Service
dbus.service                                  loaded active running D-Bus System Message Bus
firewalld.service                             loaded active running firewalld - dynamic firewall daemon
gdm.service                                   loaded active running GNOME Display Manager
gssproxy.service                              loaded active running GSSAPI Proxy Daemon
httpd.service                                 loaded active running The Apache HTTP Server
irqbalance.service                            loaded active running irqbalance daemon
iscsi-shutdown.service                        loaded active exited  Logout off all iSCSI sessions on shutdown
kdump.service                                 loaded active exited  Crash recovery kernel arming
kmod-static-nodes.service                     loaded active exited  Create list of required static device nodes fo
ksm.service                                   loaded active exited  Kernel Samepage Merging
                                                                         loaded active running Command Scheduler

[root@centos7 ~]#
[root@centos7 ~]# systemctl list-units --type service
UNIT                                          LOAD   ACTIVE SUB     DESCRIPTION
abrt-ccpp.service                             loaded active exited  Install ABRT coredump hook
abrt-oops.service                             loaded active running ABRT kernel log watcher
abrt-xorg.service                             loaded active running ABRT Xorg log watcher
abrtd.service                                 loaded active running ABRT Automated Bug Reporting Tool
accounts-daemon.service                       loaded active running Accounts Service
alsa-state.service                            loaded active running Manage Sound Card State (restore and store)
atd.service                                   loaded active running Job spooling tools
auditd.service                                loaded active running Security Auditing Service
avahi-daemon.service                          loaded active running Avahi mDNS/DNS-SD Stack
blk-availability.service                      loaded active exited  Availability of block devices
bluetooth.service                             loaded active running Bluetooth service
chronyd.service                               loaded active running NTP client/server
colord.service                                loaded active running Manage, Install and Generate Color Profiles
crond.service                                 loaded active running Command Scheduler
cups.service                                  loaded active running CUPS Printing Service
dbus.service                                  loaded active running D-Bus System Message Bus
firewalld.service                             loaded active running firewalld - dynamic firewall daemon

 


※ Service Link 파일에 대한 트리 직접확인

 

[root@centos7 ~]#
[root@centos7 ~]# find /etc/systemd/system/ -type l -name \*.service
/etc/systemd/system/getty.target.wants/getty@tty1.service
/etc/systemd/system/multi-user.target.wants/abrtd.service
/etc/systemd/system/multi-user.target.wants/abrt-oops.service
/etc/systemd/system/multi-user.target.wants/crond.service
/etc/systemd/system/multi-user.target.wants/kdump.service
/etc/systemd/system/multi-user.target.wants/abrt-vmcore.service
/etc/systemd/system/multi-user.target.wants/sysstat.service
/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
/etc/systemd/system/multi-user.target.wants/libstoragemgmt.service
/etc/systemd/system/multi-user.target.wants/abrt-ccpp.service
/etc/systemd/system/multi-user.target.wants/abrt-xorg.service
/etc/systemd/system/multi-user.target.wants/rpcbind.service
/etc/systemd/system/multi-user.target.wants/mdmonitor.service
/etc/systemd/system/multi-user.target.wants/rsyslog.service
/etc/systemd/system/multi-user.target.wants/NetworkManager.service
/etc/systemd/system/multi-user.target.wants/auditd.service
/etc/systemd/system/multi-user.target.wants/postfix.service
/etc/systemd/system/multi-user.target.wants/irqbalance.service
/etc/systemd/system/multi-user.target.wants/smartd.service
/etc/systemd/system/multi-user.target.wants/tuned.service 

 

 

3. 특정 서비스 시작/중지/상태 확인하기

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl stop httpd.service
[root@centos7 ~]#
[root@centos7 ~]# systemctl start httpd.service
[root@centos7 ~]#
[root@centos7 ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since 금 2016-02-12 15:15:55 KST; 7s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 28338 ExecStopPost=/usr/bin/kdestroy -A (code=exited, status=0/SUCCESS)
  Process: 28288 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 28406 ExecStartPre=/usr/libexec/ipa/ipa-httpd-kdcproxy (code=exited, status=0/SUCCESS)
 Main PID: 28456 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd.service
           ├─28456 /usr/sbin/httpd -DFOREGROUND
           ├─28458 /usr/libexec/nss_pcache 524292 off /etc/httpd/alias
           ├─28460 /usr/sbin/httpd -DFOREGROUND
           ├─28461 /usr/sbin/httpd -DFOREGROUND
           ├─28462 /usr/sbin/httpd -DFOREGROUND
           ├─28463 /usr/sbin/httpd -DFOREGROUND
           ├─28464 /usr/sbin/httpd -DFOREGROUND
           └─28465 /usr/sbin/httpd -DFOREGROUND

 2월 12 15:15:52 centos7 systemd[1]: Starting The Apache HTTP Server...
 2월 12 15:15:54 centos7 ipa-httpd-kdcproxy[28406]: ipa         : WARNING  Unable to connect to dirsrv: Timeout exceeded
 2월 12 15:15:54 centos7 ipa-httpd-kdcproxy[28406]: ipa         : WARNING  Disabling KDC proxy
 2월 12 15:15:54 centos7 httpd[28456]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a00:27ff:fec3:c843. Set the 'ServerName' directive globally to suppress this message
 2월 12 15:15:55 centos7 systemd[1]: Started The Apache HTTP Server.
[root@centos7 ~]#
[root@centos7 ~]#

 

 

4. 부팅시 특정서비스에 대한 활성/비활성 등록

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl disable httpd.service
Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service.
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /etc/systemd/system/httpd.service.
[root@centos7 ~]#
[root@centos7 ~]#  

 

 

5. 특정 서비스에 대한 활성화 여부 확인하기

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl is-enabled httpd.service
enabled
[root@centos7 ~]#
[root@centos7 ~]# 

 

 

6. 시스템 기본 Run Level 및 현재 Booting Run Level 확인

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl get-default
graphical.target
[root@centos7 ~]#
[root@centos7 ~]# who -r
         run-level 5  2016-02-12 13:04
[root@centos7 ~]#
[root@centos7 ~]#  

 

 

7. 시스템 부팅시 기본 Run Level 변경 설정

 

[root@centos7 ~]#
[root@centos7 ~]# cat /etc/inittab | grep runlevel
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
[root@centos7 ~]#

[root@centos7 ~]#
[root@centos7 ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
[root@centos7 ~]#
[root@centos7 ~]#  

 

 

8. 시스템 Run Level 즉시 변경
(※ 주의 : 현재 Run Level에 종속적 및 실행중인 Service 중단 및 영향 발생)

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl isolate multi-user.target
[root@centos7 ~]#
[root@centos7 ~]# who -r
         run-level 3  2016-02-12 15:32                   last=5
[root@centos7 ~]#
[root@centos7 ~]#

 

※ systemctl isolate runlevel3.target 대체가능  

 

 

 

9. 시스템 주요 Log 확인

 

[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# journalctl -a -m
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 금 2016-02-12 15:40:02 KST. --
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuset
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpu
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuacct
 2월 12 13:03:41 centos7 kernel: Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc versio
 2월 12 13:03:41 centos7 kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=/dev/mapper/centos-r
 2월 12 13:03:41 centos7 kernel: e820: BIOS-provided physical RAM map:
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007ffeffff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000007fff0000-0x000000007fffffff] ACPI data
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
 2월 12 13:03:41 centos7 kernel: NX (Execute Disable) protection: active
 2월 12 13:03:41 centos7 kernel: SMBIOS 2.5 present.

 

... 중략

 

 

 

10. 특정 서비스 Log 확인 ( -f 옵션 추가시 지속 확인 : tail -f 와 동일)

 

[root@centos7 ~]#
[root@centos7 ~]# journalctl -u httpd.service
-- Logs begin at 금 2016-02-12 13:03:41 KST. --
 2월 12 13:04:01 centos7 ipa-httpd-kdcproxy[1596]: ipa         : WARNING  Disabling KDC proxy
 2월 12 13:04:01 centos7 httpd[3074]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a00:27ff:fec3:c843. Set the 'ServerName' directive globally to suppress this message
 2월 12 13:04:01 centos7 systemd[1]: Started The Apache HTTP Server.
 2월 12 15:15:46 centos7 systemd[1]: Stopping The Apache HTTP Server...
 2월 12 15:15:47 centos7 systemd[1]: Stopped The Apache HTTP Server.
 2월 12 15:15:52 centos7 systemd[1]: Starting The Apache HTTP Server...
 2월 12 15:15:54 centos7 ipa-httpd-kdcproxy[28406]: ipa         : WARNING  Unable to connect to dirsrv: Timeout exceeded
 2월 12 15:15:54 centos7 ipa-httpd-kdcproxy[28406]: ipa         : WARNING  Disabling KDC proxy
 2월 12 15:15:54 centos7 httpd[28456]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a00:27ff:fec3:c843. Set the 'ServerName' directive globally to suppress this message
 2월 12 15:15:55 centos7 systemd[1]: Started The Apache HTTP Server.

[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# journalctl -u crond.service
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 금 2016-02-12 15:58:01 KST. --
 2월 12 13:03:53 centos7 systemd[1]: Started Command Scheduler.
 2월 12 13:03:53 centos7 systemd[1]: Starting Command Scheduler...
 2월 12 13:03:53 centos7 crond[1645]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 52% if used.)
 2월 12 13:03:53 centos7 crond[1645]: (CRON) INFO (running with inotify support)
[root@centos7 ~]#  

 

 

11. 특정 PID 에 대한 Log 확인

 

[root@centos7 ~]#
[root@centos7 ~]# ps -ef | grep cron
root      1645     1  0 13:03 ?        00:00:00 /usr/sbin/crond -n
root      3542 14535  0 15:59 pts/0    00:00:00 grep --color=auto cron
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]# journalctl _PID=1645
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 금 2016-02-12 15:58:01 KST. --
 2월 12 13:03:53 centos7 crond[1645]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 52% if used.)
 2월 12 13:03:53 centos7 crond[1645]: (CRON) INFO (running with inotify support)
[root@centos7 ~]#
[root@centos7 ~]#
[root@centos7 ~]#  

 

 

12. Kernel Messages (dmesg) 확인

 

[root@centos7 ~]#
[root@centos7 ~]# journalctl -k
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 금 2016-02-12 15:50:01 KST. --
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuset
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpu
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuacct
 2월 12 13:03:41 centos7 kernel: Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc versio
 2월 12 13:03:41 centos7 kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=/dev/mapper/centos-r
 2월 12 13:03:41 centos7 kernel: e820: BIOS-provided physical RAM map:
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007ffeffff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000007fff0000-0x000000007fffffff] ACPI data
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
 2월 12 13:03:41 centos7 kernel: NX (Execute Disable) protection: active

 

... 중략

 

 

 

13. 로그 유형별 조회하기 (debug, info, err)

 

[root@centos7 ~]#
[root@centos7 ~]# journalctl -p err
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 토 2016-02-13 18:10:01 KST. --
 2월 12 13:03:41 centos7 kernel: Detected CPU family 6 model 69
 2월 12 13:03:41 centos7 kernel: Warning: Intel CPU model - this hardware has not undergone upstream testing. Plea
 2월 12 13:03:41 centos7 kernel: tsc: Fast TSC calibration failed
 2월 12 13:03:45 centos7 kernel: piix4_smbus 0000:00:07.0: SMBus base address uninitialized - upgrade BIOS or use
 2월 12 13:05:23 centos7 gdm-launch-environment][2779]: pam_systemd(gdm-launch-environment:session): Failed to rel
 2월 12 13:05:42 centos7 gdm-password][4116]: pam_unix(gdm-password:auth): conversation failed
 2월 12 13:05:42 centos7 gdm-password][4116]: pam_unix(gdm-password:auth): auth could not identify password for [h
 2월 12 13:05:49 centos7 gdm-password][4206]: pam_unix(gdm-password:auth): conversation failed
 2월 12 13:05:49 centos7 gdm-password][4206]: pam_unix(gdm-password:auth): auth could not identify password for [h
 2월 12 13:05:51 centos7 pulseaudio[4475]: [pulseaudio] pid.c: Daemon already running.
 2월 12 13:05:58 centos7 gdm-password][4715]: pam_unix(gdm-password:auth): conversation failed
 2월 12 13:05:58 centos7 gdm-password][4715]: pam_unix(gdm-password:auth): auth could not identify password for [h
 2월 12 15:36:13 centos7 pulseaudio[32753]: [pulseaudio] pid.c: Daemon already running.
 2월 12 15:37:41 centos7 mate-session[550]: Gtk-CRITICAL: gtk_image_set_from_icon_name: assertion 'GTK_IS_IMAGE (i
 2월 12 15:37:46 centos7 pulseaudio[1455]: [pulseaudio] pid.c: Daemon already running.
 2월 12 15:38:12 centos7 gdm-password][1683]: pam_unix(gdm-password:auth): conversation failed
 2월 12 15:38:12 centos7 gdm-password][1683]: pam_unix(gdm-password:auth): auth could not identify password for [r
 2월 12 16:03:28 centos7 gdm-launch-environment][1374]: pam_systemd(gdm-launch-environment:session): Failed to rel
[root@centos7 ~]#
[root@centos7 ~]#  

 

 

14. 일자기준 로그 조회

 

[root@centos7 ~]#
[root@centos7 ~]# journalctl --since=today
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 토 2016-02-13 18:04:13 KST. --
 2월 13 17:45:24 centos7 systemd[1]: Time has been changed
 2월 13 17:45:24 centos7 NetworkManager[1062]: <info>  (enp0s3): link disconnected (calling deferred action)
 2월 13 17:45:24 centos7 NetworkManager[1062]: <info>  (enp0s3): device state change: activated -> unavailable (re
 2월 13 17:45:24 centos7 avahi-daemon[868]: Withdrawing address record for fe80::a00:27ff:fec3:c843 on enp0s3.
 2월 13 17:45:24 centos7 avahi-daemon[868]: Withdrawing address record for 192.168.137.10 on enp0s3.
 2월 13 17:45:24 centos7 avahi-daemon[868]: Leaving mDNS multicast group on interface enp0s3.IPv4 with address 192
 2월 13 17:45:24 centos7 avahi-daemon[868]: Interface enp0s3.IPv4 no longer relevant for mDNS.
 2월 13 17:45:24 centos7 NetworkManager[1062]: <info>  NetworkManager state is now CONNECTED_LOCAL
 2월 13 17:45:24 centos7 NetworkManager[1062]: <info>  NetworkManager state is now DISCONNECTED
 2월 13 17:45:24 centos7 dbus[854]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher'
 2월 13 17:45:24 centos7 dbus-daemon[854]: dbus[854]: [system] Activating via systemd: service name='org.freedeskt
 2월 13 17:45:24 centos7 systemd[1]: Starting Network Manager Script Dispatcher Service...
 2월 13 17:45:24 centos7 dbus[854]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
 2월 13 17:45:24 centos7 dbus-daemon[854]: dbus[854]: [system] Successfully activated service 'org.freedesktop.nm_
 2월 13 17:45:24 centos7 systemd[1]: Started Network Manager Script Dispatcher Service.
 2월 13 17:45:24 centos7 nm-dispatcher[11077]: Dispatching action 'down' for enp0s3
 2월 13 17:45:24 centos7 systemd[1]: Unit named.service cannot be reloaded because it is inactive.
 2월 13 17:45:24 centos7 systemd[1]: Unit named-chroot.service cannot be reloaded because it is inactive.
 2월 13 17:45:24 centos7 chronyd[890]: Forward time jump detected!
 2월 13 17:45:24 centos7 chronyd[890]: Can't synchronise: no selectable sources
 2월 13 17:45:24 centos7 chronyd[890]: Source 114.207.245.166 offline
 2월 13 17:45:24 centos7 chronyd[890]: Source 106.247.248.106 offline


[root@centos7 ~]#
[root@centos7 ~]# journalctl --since=2016-02-12
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 토 2016-02-13 18:04:13 KST. --
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuset
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpu
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuacct
 2월 12 13:03:41 centos7 kernel: Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc versio
 2월 12 13:03:41 centos7 kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=/dev/mapper/centos-r
 2월 12 13:03:41 centos7 kernel: e820: BIOS-provided physical RAM map:
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007ffeffff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000007fff0000-0x000000007fffffff] ACPI data
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
 2월 12 13:03:41 centos7 kernel: NX (Execute Disable) protection: active
 2월 12 13:03:41 centos7 kernel: SMBIOS 2.5 present.


[root@centos7 ~]#
[root@centos7 ~]# journalctl --since=2016-02-12 --until=2016-02-13
-- Logs begin at 금 2016-02-12 13:03:41 KST, end at 토 2016-02-13 18:04:13 KST. --
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 systemd-journal[93]: Runtime journal is using 8.0M (max allowed 92.0M, trying to leave 13
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuset
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpu
 2월 12 13:03:41 centos7 kernel: Initializing cgroup subsys cpuacct
 2월 12 13:03:41 centos7 kernel: Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc versio
 2월 12 13:03:41 centos7 kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=/dev/mapper/centos-r
 2월 12 13:03:41 centos7 kernel: e820: BIOS-provided physical RAM map:
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000007ffeffff] usable
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x000000007fff0000-0x000000007fffffff] ACPI data
 2월 12 13:03:41 centos7 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
 2월 12 13:03:41 centos7 kernel: NX (Execute Disable) protection: active
 2월 12 13:03:41 centos7 kernel: SMBIOS 2.5 present.
 2월 12 13:03:41 centos7 kernel: DMI: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
 2월 12 13:03:41 centos7 kernel: e820: update [mem 0x00000000-0x00000fff] usable == 

 

 

15. 시스템 서비스 전체 또는 특성 서비스에 대한 종속성 Tree 확인

 

[root@centos7 ~]#
[root@centos7 ~]# systemctl list-dependencies
default.target
● ├─accounts-daemon.service
● ├─gdm.service
● ├─network.service
● ├─rtkit-daemon.service
● ├─systemd-readahead-collect.service
● ├─systemd-readahead-replay.service
● ├─systemd-update-utmp-runlevel.service
● └─multi-user.target
●   ├─abrt-ccpp.service
●   ├─abrt-oops.service
●   ├─abrt-vmcore.service
●   ├─abrt-xorg.service
●   ├─abrtd.service

 

... 중략


[root@centos7 ~]#
[root@centos7 ~]# systemctl list-dependencies multi-user.target
multi-user.target
● ├─abrt-ccpp.service
● ├─abrt-oops.service
● ├─abrt-vmcore.service
● ├─abrt-xorg.service
● ├─abrtd.service
● ├─atd.service
● ├─auditd.service
● ├─avahi-daemon.service
● ├─brandbot.path
● ├─chronyd.service
● ├─crond.service
● ├─cups.path
● ├─cups.service
● ├─dbus.service
● ├─httpd.service

 

... 중략


[root@centos7 ~]#
[root@centos7 ~]# systemctl list-dependencies httpd.service
httpd.service
● ├─-.mount
● ├─system.slice
● └─basic.target
●   ├─alsa-restore.service
●   ├─alsa-state.service
●   ├─firewalld.service
●   ├─microcode.service
●   ├─rhel-autorelabel-mark.service
●   ├─rhel-autorelabel.service
●   ├─rhel-configure.service
●   ├─rhel-dmesg.service
●   ├─rhel-loadmodules.service
●   ├─paths.target
●   ├─slices.target
●   │ ├─-.slice
●   │ └─system.slice
●   ├─sockets.target
●   │ ├─avahi-daemon.socket
●   │ ├─cups.socket

 

... 중략

 

 

 

※ 참고 - Systemd VS SysVinit (http://linoxide.com/linux-command/systemd-vs-sysvinit-cheatsheet/)

 

 

 

 

 

 

Trackbacks 0 : Comments 0

Write a comment