108 Essential System Services KT Flashcards
108.1 Maintain system time
The following is a partial list of the used files, terms and utilities:
/usr/share/zoneinfo/ /etc/timezone /etc/localtime /etc/ntp.conf /etc/chrony.conf date hwclock timedatectl ntpd ntpdate chronyc pool.ntp.org
/usr/share/zoneinfo/
The system timezone database directory.
/etc/timezone
The /etc/timezone file is a plain text file. It usually includes the continent and place, unless a more generic setting is used like UTC.
/etc/localtime
The system timezone file.
/etc/ntp.conf
The /etc/ntp.conf file is the primary configuration file for the ntpd service.
/etc/chrony.conf
This is the location where the chrony.conf file is compiled. chrony.conf is the configuration file for the chronyd daemon.
date
Command: Displays the system clock.
hwclock
Command: hwclock is an administration tool for the time clocks.
hwclock [function] [option…]
timedatectl
Command: Displays the system clock, UTC, and timezone information.
ntpd
The Network Time Protocol daemon (ntpd) is a process that ensures the system clock is in sync with the time provided by remote NTP servers.
ntpdate
Command: ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s). Servers are given as arguments to determine the correct time. It must be run as root on the local host.
ntpdate [ -46bBdqsuv ] [ -a key ] [ -e authdelay] [ -k keyfile ] [ -o version ] [ -p samples ] [ -t timeout ] [ -U user_name] server [ ... ]
chronyc
Command: chronyc is a command-line interface program which can be used to monitor chronyd’s performance and to change various operating parateters whilst it is running.
chrony is a pair of programs for maintaining the accuracy of computer clocks.
chronyc [OPTIONS]
pool.ntp.org
The pool.ntp.org address is a link to a cluster of NTP servers that are geographically spread throughout the world.
108.2 System logging
Terms and Utilities:
/etc/rsyslog.conf /var/log/ logger logrotate /etc/logrotate.conf /etc/logrotate.d/ journalctl systemd-cat /etc/systemd/journald.conf /var/log/journal/
/etc/rsyslog.conf
The rsyslog.conf file is the main configuration file for the rsyslogd(8) which logs system messages on *nix systems.
/var/log/
The /var/log/ directory is the standard location for log files to be placed by the syslogd daemon.