RHCSA Questions with Correct Answers
How are the log files created by 'rsyslog' prevented from growing until they use up all your storage? - Answer-They are rotated by 'logrotate', which is scheduled to run as a daily cron job.
The 'cronie' scheduler runs logrotate daily, as per '/etc/
Imag...
How are the log files created by 'rsyslog' prevented from growing until they use up all
your storage? - Answer-They are rotated by 'logrotate', which is scheduled to run as a
daily cron job.
The 'cronie' scheduler runs logrotate daily, as per '/etc/cron.daily/logrotate'. For most
logs logrotate performs weekly rotation and keeps 4 weeks of backlogs. This can be
configured in /etc/logrotate.conf
Imagine you're logging into a customer's server to resolve an issue they've logged via
your ticketing system. How would you ensure your name and the ticket number appear
alongside the log entry showing your connection -- so they know who and why the
connection was made -- should they ever perform an audit? - Answer-logger -p
authpriv.info 'Acloud Guru: Tkt #10869'
NEVER write directly to the log files. At best, your entry will be overwritten; at worst, the
file could become corrupted. Always use 'logger'. Incoming 'ssh' connections are logged
under the 'authpriv' facility; therefore, to ensure your entry appears beneath the entry for
your connection, you must log to that facility with '-p authpriv.info'. Otherwise, the entry
will go into '/var/log/messages'.
How is the systemd journal prevented from filling up your storage? - Answer-systemd-
journald handles rotation internally and can be configured using 'journalctl'.
Although it is true that by default systemd-journald only retains logs for the current boot
instance, Linux boxes can run for years between reboots, so a substantial volume of log
entries could accumulate. To view rotation settings and limits, run 'journalctl | head'.
tool used to view/manage time-related config - Answer-timedatectl
useful subcommands:
list-timezones # for a list of available time zones
set-timezone # to set systemc time zone
set-time # to set system time
set-ntp # to control time sync via NTP
tool used to view/set on board hardware clock - Answer-hwclock
default NTP service - Answer-chronyd
, /etc/chrony.conf is the config file
can serve time to the network
functions as a client to sync system time
tool used to configure the NTP service on modern systems - Answer-chronyc # used to
query/control chronyd
useful subcommand
sources # to view sources and sync status
recurring task scheduler - Answer-cronie
master file for the task scheduler - Answer-/etc/crontab # rarely edited but contains
useful guidelines
location for custom scheduled task(s) configuration - Answer-/etc/contab.d/*
/etc/cron.{hourly,daily,weekly,monthly} folders # executable scripts can be placed here
tool for users to manage their own scheduled tasks - Answer-crontab
To configure your server to maintain clock accuracy by synchronising with the NTP
server serv.acloud.guru, what steps would you need to perform? - Answer-Add the line
'server serv.acloud.guru iburst' to /etc/chronyd.conf then run 'timedatectl set-ntp on'.
standard file system hierarchy - Answer-/
bin # contains binaries
boot # bootloader config and kernel
dev # device nodes - virtual files that point to physical pieces of hardware
etc # system-level configs
home # user home directories - contains user specific configurations
root # root's home directories
run # dynamic run time data (dynamic/typically ephemeral)
sbin # system/superuser binaries
tmp # world writable scratch space
usr # majority of the OS, programs libraries, docs
var # persistent high throughput data
manpage for file system hierarchy - Answer-man hier
command to tar and compress a file and a directory using gizp - Answer-tar -cvzf
nameoftar.tar.gz /targetdir targetfile
c = create a new tar file
v = verbose
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Scholarsstudyguide. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.