• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.
  • Sohbetokey.com ile canlı okey oynamaya ne dersin? Hem sohbet et, hem mobil okey oyna!
  • Soru mu? Sorun mu? ''Bir Sorum Var?'' sistemimiz aktiftir. Paylaşın beraber çözüm üretelim.

"Systemd" Komutları Ve Sorun Çözme Adımları

TRWE_2012

Süper Moderatör
Üyelik Tarihi
2 Haz 2020
Konular
3,095
Mesajlar
5,896
MFC Puanı
20,930
ÖRNEK KOMUTSAL GÖSTERİMSELLER;

Ön İşlem:


Kod:
battalgazi@notebookpc:~$ sudo -s
[sudo] password for battalgazi: ********************

Sistem Açılış Zamanı:

Kod:
root@notebookpc:~# systemd-analyze time
Startup finished in 6.160s (kernel) + 43.507s (userspace) = 49.668s

Açılış Anında Sistem'de Başlatılan Servis Ve İşlemlerin Süreleri:

Kod:
root@notebookpc:~# systemd-analyze --no-pager blame
         16.657s dev-sda3.device
         12.967s tuptime.service
         11.725s wicd.service
         10.863s ModemManager.service
          8.299s speech-dispatcher.service
          8.296s xdm.service
          8.294s ondemand.service
          8.172s avahi-daemon.service
          8.139s gdomap.service
          8.133s iio-sensor-proxy.service
          8.050s systemd-user-sessions.service
          7.997s apparmor.service
          7.976s thermald.service
          7.091s plymouth-read-write.service
          6.350s firewalld.service
          6.127s NetworkManager-wait-online.service
          6.067s networking.service
          5.342s systemd-udevd.service
          4.585s isdnutils-base.service
          2.967s accounts-daemon.service
          2.451s console-setup.service
          2.368s lightdm.service
          2.202s ebtables.service
          2.013s keyboard-setup.service
          2.003s polkitd.service
          1.794s systemd-tmpfiles-setup-dev.service
          1.660s systemd-tmpfiles-setup.service
          1.644s fwupd.service
          1.606s gpu-manager.service
          1.549s rsyslog.service
          1.467s systemd-journald.service
          1.452s grub-common.service
          1.274s binfmt-support.service
          1.205s systemd-modules-load.service
          1.134s systemd-logind.service
          1.042s NetworkManager.service
           808ms udisks2.service
           796ms systemd-backlight@backlight:acpi_video0.service
           787ms systemd-rfkill.service
           766ms systemd-random-seed.service
           762ms systemd-remount-fs.service
           762ms upower.service
           726ms systemd-sysctl.service
           726ms dev-mqueue.mount
           725ms dev-hugepages.mount
           723ms sys-kernel-debug.mount
           704ms lm-sensors.service
           673ms systemd-udev-trigger.service
           658ms apport.service
           638ms systemd-tmpfiles-clean.service
           634ms plymouth-start.service
           591ms virtualbox.service
           564ms systemd-journal-flush.service
           548ms wpa_supplicant.service
           547ms systemd-timesyncd.service
           478ms dns-clean.service
           477ms systemd-update-utmp.service
           421ms irqbalance.service
           377ms kmod-static-nodes.service
           370ms ufw.service
           369ms snapd.seeded.service
           313ms snapd.service
           288ms resolvconf.service
           286ms apt-daily.service
           257ms colord.service
           249ms user@1000.service
           205ms proc-sys-fs-binfmt_misc.mount
           204ms sndiod.service
           189ms snapd.apparmor.service
           175ms dev-disk-by\x2duuid-8215f26b\x2d3780\x2d451a\x2dbee1\x2d2da3e363edc3.swap
           103ms rtkit-daemon.service
            60ms setvtrgb.service
            56ms alsa-restore.service
            43ms hddtemp.service
            35ms pppd-dns.service
            32ms motd-news.service
            26ms snapd.socket
            26ms rc-local.service
            11ms ureadahead-stop.service
            11ms systemd-update-utmp-runlevel.service
             6ms sys-fs-fuse-connections.mount
             5ms plymouth-quit-wait.service

Sistemin Açılış Anında Arkaplan İşlemlerinin Ne Kadar "Geçikme" Süresi İle Açıldığının Analiz Edilmesi

Kod:
root@notebookpc://# systemd-analyze --no-pager critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @43.485s
└─multi-user.target @43.485s
  └─virtualbox.service @42.893s +591ms
    └─network-online.target @42.871s
      └─NetworkManager-wait-online.service @36.743s +6.127s
        └─NetworkManager.service @35.683s +1.042s
          └─firewalld.service @29.314s +6.350s
            └─dbus.service @21.638s
              └─basic.target @21.113s
                └─sockets.target @21.112s
                  └─snapd.socket @21.085s +26ms
                    └─sysinit.target @21.059s
                      └─swap.target @19.776s
                        └─dev-disk-by\x2duuid-8215f26b\x2d3780\x2d451a\x2dbee1\x2d2da3e363edc3.swap @19.599s +175ms
                          └─dev-disk-by\x2duuid-8215f26b\x2d3780\x2d451a\x2dbee1\x2d2da3e363edc3.device @19.597s

NOT:

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.
ifadesinin Türkçe Tercümesi:

Ünite aktif hale geldikten veya başlatıldıktan sonraki zaman "@" karakterinden sonra yazdırılır.
Ünitenin başlaması için geçen süre "+" karakterinden sonra yazdırılır
.


Örnek bir işlemi inceleyim;

Kod:
virtualbox.service @42.893s +591ms

Virtualbox servisinin aktif edilmesi 591 ms sürmüş, sistem'e yüklenmesi 42,893 s'de gerçekleştirilmiş.Yani burada şu sonuç çıkıyor
1000 ms = 1 sn olduğundan + süre 0,591 sn. >>> 42,893 sn. - 0,591 sn. = 42,302 sn. işlemin gerçek süresidir.Eğer + süre uzun ise o servis'de bir sorun vardır.Bu bakımdan +süre daima @süre'den küçük olmalıdır.Tersi durum sistemin hantallaştığını gösterir.Bunu test etmenin bir diğer yolu +süre'yi @süreye bölmektir.Örneğimizdeki servisin performans katsayısı

virtualbox.service @42.893s +591ms

42,893 sn. - 0,591 sn. = 42,302 sn.

=0,591 sn. / 42,302 sn.
=0,01397097064

Çıkan sonucun sözel olarak yorumlanması , servis performans katsayısı 1000'de 14 'tür. Sağlıklı bir sistemde torenans değeri 1000'de 50'dir.1000'de 50'in altında ise değer servis normal çalışmakta, 1000'de 50'in üstünde ise servis sistem'de sorun çıkartmaktadır.

Sistem Açılırken Karşılan Hataların Log Günlüklerinin Okunması

Kod:
root@notebookpc://# journalctl --no-pager -b -p3
-- Logs begin at Prş 2020-12-10 15:22:56 +03, end at Prş 2020-12-10 22:20:01 +03. --
Ara 10 15:23:12 notebookpc systemd[1]: dev-disk-by\x2dlabel-UBUNTU16.04LTS.device: Dev dev-disk-by\x2dlabel-UBUNTU16.04LTS.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sda/sda3 and /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sda/sda4
Ara 10 15:23:30 notebookpc lightdm[3149]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Ara 10 15:23:30 notebookpc lightdm[3149]: PAM adding faulty module: pam_kwallet.so
Ara 10 15:23:30 notebookpc lightdm[3149]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Ara 10 15:23:30 notebookpc lightdm[3149]: PAM adding faulty module: pam_kwallet5.so
Ara 10 15:23:30 notebookpc NetworkManager[3019]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Ara 10 15:23:30 notebookpc wpa_supplicant[3158]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
Ara 10 15:23:30 notebookpc wpa_supplicant[3158]: dbus: Failed to construct signal
Ara 10 15:23:35 notebookpc lightdm[3228]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object

Sistem'de Herhangi Bir Servisin Hata Loglarının Okunması

Kod:
root@notebookpc://# systemctl --no-pager --state=failed
  UNIT          LOAD   ACTIVE SUB    DESCRIPTION
● fwupd.service loaded failed failed Firmware update daemon

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Sistem'e Bağlanan Birimler Hakkında Bilgi Alma:

Kod:
root@notebookpc://# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during installation
UUID=ec731e4c-b9fd-43e6-89e0-5311174fdbe3 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=8215f26b-3780-451a-bee1-2da3e363edc3 none            swap    sw              0       0

Sistem'e Bağlanan Birimler Hakkında Bilgi Alma-2 :

Kod:
root@notebookpc://# sudo blkid
/dev/sda1: LABEL="MINT17.3.1" UUID="7ac30428-27f8-4ecf-b142-45762738cce6" TYPE="ext4" PARTUUID="00082274-01"
/dev/sda2: LABEL="TAKASALANI" UUID="8215f26b-3780-451a-bee1-2da3e363edc3" TYPE="swap" PARTUUID="00082274-02"
/dev/sda3: LABEL="UBUNTU16.04LTS" UUID="ec731e4c-b9fd-43e6-89e0-5311174fdbe3" TYPE="ext4" PARTUUID="00082274-03"
/dev/sda4: LABEL="UBUNTU16.04LTS" UUID="ef3b5037-5c86-495e-bcae-d469f56654cd" TYPE="ext4" PARTUUID="00082274-04"
 
Üst