systemctl/journalctl Ubuntu

5 篇文章 0 订阅

To make this the default, use

sudo systemctl set-default multi-user.target

To return to default booting into X, use

sudo systemctl set-default graphical.target

To see the current default target,

sudo systemctl get-default

 

 

List  failed 

root@localhost:~# sudo systemctl list-units --failed
  UNIT         LOAD   ACTIVE SUB    DESCRIPTION
● slim.service loaded failed failed SLiM Simple Login Manager

 

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'.
root@localhost:~#

 

 

 

Check failed log  
root@localhost:~# journalctl -u   slim.service
-- Logs begin at Sun 2018-01-28 23:58:18 CST, end at Wed 2020-08-05 16:30:29 CST. --
Aug 05 16:28:14 localhost.localdomain systemd[1]: Starting SLiM Simple Login Manager...
Aug 05 16:28:14 localhost.localdomain systemd[1]: Started SLiM Simple Login Manager.
Aug 05 16:28:17 localhost.localdomain slim[270]: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_key
Aug 05 16:28:17 localhost.localdomain slim[270]: PAM adding faulty module: pam_gnome_keyring.so
Aug 05 16:28:17 localhost.localdomain slim[270]: /usr/bin/X11/xauth:  file /var/run/slim.auth does not exist
Aug 05 16:28:18 localhost.localdomain slim[270]: X.Org X Server 1.19.6
Aug 05 16:28:18 localhost.localdomain slim[270]: Release Date: 2017-12-20
Aug 05 16:28:18 localhost.localdomain slim[270]: X Protocol Version 11, Revision 0
Aug 05 16:28:18 localhost.localdomain slim[270]: Build Operating System: Linux 4.4.0-168-generic armv7l Ubuntu
Aug 05 16:28:18 localhost.localdomain slim[270]: Current Operating System: Linux localhost.localdomain 4.4.35_hi3798mv2x
Aug 05 16:28:18 localhost.localdomain slim[270]: Kernel command line:  console=ttyAMA0,115200 initrd=0x00000000,0x000000
Aug 05 16:28:18 localhost.localdomain slim[270]: Build Date: 14 November 2019  06:20:46PM
Aug 05 16:28:18 localhost.localdomain slim[270]: xorg-server 2:1.19.6-1ubuntu4.4 (For technical support please see http:
Aug 05 16:28:18 localhost.localdomain slim[270]: Current version of pixman: 0.34.0
Aug 05 16:28:18 localhost.localdomain slim[270]:         Before reporting problems, check http://wiki.x.org
Aug 05 16:28:18 localhost.localdomain slim[270]:         to make sure that you have the latest version.
Aug 05 16:28:18 localhost.localdomain slim[270]: Markers: (--) probed, (**) from config file, (==) default setting,
Aug 05 16:28:18 localhost.localdomain slim[270]:         (++) from command line, (!!) notice, (II) informational,
Aug 05 16:28:18 localhost.localdomain slim[270]:         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Aug 05 16:28:18 localhost.localdomain slim[270]: (==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug  5 16:28:18 2020
Aug 05 16:28:18 localhost.localdomain slim[270]: (==) Using system config directory "/usr/share/X11/xorg.conf.d"
Aug 05 16:28:19 localhost.localdomain slim[270]: (EE)
Aug 05 16:28:19 localhost.localdomain slim[270]: Fatal server error:
Aug 05 16:28:19 localhost.localdomain slim[270]: (EE) no screens found(EE)
 

 

 

#### Customized service sample 

 

[lake@galaxy nfs]$ sudo cat   rootdisk-53x5/etc/systemd/system/hisilicon.service

[Unit]
Description=Hisilicon
After=network.target
Before=slim.service
StartLimitIntervalSec=0
[Service]
Type=simple
ExecStart=/vip42x5_HiSTBLinuxV100R005C00SPC050/rc.sysinit.ubuntu18

[Install]
WantedBy=multi-user.target
[lake@galaxy nfs]$
 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值