$ journalctl -u networking.service
-- Logs begin at Mon 2018-08-14 16:16:31 EDT, end at Tue 2018-10-17 19:16:51 EDT
July 14 16:16:32 shs-Inspiron-530s systemd[1]: Starting Raise network interfaces.
July 14 16:16:42 shs-Inspiron-530s systemd[1]: Started Raise network interfaces.
July 14 16:49:38 butterfly systemd[1]: Stopping Raise network interfaces...
July 14 16:49:38 butterfly systemd[1]: Stopped Raise network interfaces.
-- Reboot --
July 14 16:49:50 butterfly systemd[1]: Starting Raise network interfaces...
July 14 16:49:51 butterfly systemd[1]: Started Raise network interfaces.
-- Reboot --
请注意系统重新启动如何显示在此输出中。
要获取服务列表,请尝试以下命令:
$ service --status-all | column
[ + ] acpid [ + ] network-manager
[ - ] alsa-utils [ - ] networking
[ - ] anacron [ - ] plymouth
[ + ] apparmor [ - ] plymouth-log
[ + ] apport [ - ] pppd-dns
[ + ] atd [ + ] procps
[ + ] atop [ - ] quota
[ + ] atopacct [ - ] quotarpc
[ + ] avahi-daemon [ - ] rsync
[ - ] bluetooth [ + ] rsyslog
[ - ] console-setup.sh [ - ] saned
[ + ] cron [ + ] sendmail
[ + ] cups [ + ] speech-dispatcher
[ + ] cups-browsed [ - ] spice-vdagent
[ + ] dbus [ + ] ssh
[ - ] dns-clean [ + ] sysstat
[ + ] gdm3 [ - ] thermald
[ + ] grub-common [ + ] udev
[ - ] hwclock.sh [ + ] ufw
[ + ] irqbalance [ + ] unattended-upgrades
[ + ] kerneloops [ - ] uuidd
[ - ] keyboard-setup.sh [ + ] whoopsie
[ + ] kmod [ - ] x11-common
在上面的显示中:
+ = 有效
- = 无效
? = 没有可用的状态选项
这是一个有用的命令,用于快速报告磁盘空间使用情况:
[linuxidc@localhost ~]$ journalctl --disk-usage
Archived and active journals take up 8.0M on disk.
[linuxidc@localhost ~]$
如果您想关注特定进程,可以通过提供PID(截断)来实现,如下例所示。