Systemd List Failed Units and Services

This is a quick note to list failed services on systemd system. [root@zilla ~]# systemctl status ● zilla State: degraded Jobs: 0 queued Failed: 1 units Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago CGroup: / ├─1 /usr/lib/systemd/systemd --system --deserialize 22 └─system.slice ├─httpd.service │ ├─21860 /usr/sbin/httpd -DFOREGROUND │ ├─21861 /usr/sbin/httpd -DFOREGROUND │ ├─21862 /usr/sbin/httpd -DFOREGROUND │ ├─21863 /usr/sbin/httpd -DFOREGROUND │ ├─21864 /usr/sbin/httpd -DFOREGROUND │ └─21865 /usr/sbin/httpd -DFOREGROUND ... [root@zilla ~]# systemctl list-units --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● ipmi.service loaded failed failed IPMI Driver 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'. Or ...

December 15, 2020 · 2 min · 233 words · kenno

Install MATE Desktop on CentOS 7

Tonight I started to review the learning material for Red Hat System Administration III to prepare for RHCSE exam. I need a machine with GUI, and all my CentOS 7 VMs are headless. So let’s install the GUI on it, shall I? First install epel repo, if it’s not yet installed: # yum install epel-release -y Then install the 2 groups: # yum groupinstall "X Window system" -y # yum groupinstall "MATE Desktop" -y Tip, if “I” can’t remember the names of the groups, I can run this command to list all available groups: ...

June 13, 2018 · 1 min · 171 words · kenno

grep: error while loading shared libraries: libpcre.so.0

I have a server running CentOS 6 successfully upgraded to CentOS 7. The only problem I encountered so far is that ‘grep’ doesn’t work. [root@zilla ~]# grep grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory [root@zilla ~]# ldd /usr/bin/grep linux-vdso.so.1 => (0x00007ffc0b639000) libpcre.so.0 => not found libc.so.6 => /lib64/libc.so.6 (0x00007f6be1c6c000) /lib64/ld-linux-x86-64.so.2 (0x00007f6be2038000) First thing I tried was to reinstall pcre package which provides libpcre.so*. It still didn’t work. Fortunately, someone has posted a solution as the following: ...

July 1, 2016 · 1 min · 156 words · kenno