Skip to content

Lab · Linux and Red Hat (RHCSA to RHCE)

Lab: keep a wholesaler's billing server healthy

Labbeginner· about 1.5 hours· 5 steps

The brief

A grocery wholesaler in Indore runs its billing software on a small RHEL server. You calm down a runaway job, stop it, make the server boot to text mode, keep its logs across reboots, and set the clock to Indian time with network time sync.

Why it matters

Support engineers are called when "the server is slow" or "the bill dates are wrong". The answer is usually here: a process eating the CPU, logs that vanished at the last reboot, or a clock in the wrong time zone. Wrong time on a billing server means wrong dates on GST invoices.

Skills you practise

  • ps and top
  • nice, renice and kill
  • systemctl get-default and set-default
  • journalctl and a persistent journal
  • timedatectl and chronyd

You need

  • A RHEL 9 virtual machine (free Red Hat Developer subscription) or Rocky Linux 9 / AlmaLinux 9
  • A user that can run sudo (a member of the wheel group)

What you will have at the end

A billing server that boots to text mode, keeps its logs across reboots and keeps Indian time, plus commands.sh with the commands you used to find, renice and stop a runaway job.

How it is marked (rubric, 100 points)
Processes handledYou found the busy job, reniced it to 15 and stopped it with SIGTERM.25
Server settings rightBoot target, persistent journal (two boots listed) and Asia/Kolkata time with NTP all pass.45
UnderstandingYou can say why a persistent journal and correct time matter on a billing server.15
Commands written downcommands.sh lists every command in order.15

0/5 steps done

Step 1 of 5

Lower the priority of a runaway job

A busy dd process is running in the background with a nice value of 15.

To practise, start a job that uses a full CPU: dd copying zeros to nowhere, with & to run it in the background. In top it sits at the top of the list with about 100% CPU. A nice value runs from -20 (most important) to 19 (least); a higher number gives the CPU to other programs first, so the billing software stays fast. renice changes the nice value of a running process by its PID (process ID).

$ dd if=/dev/zero of=/dev/null &
[1] 2481
$ top -b -n 1 | head -8
$ sudo renice -n 15 -p 2481
2481 (process ID) old priority 0, new priority 15
Run this on your machine, then paste the output below
$ ps -o pid,ni,comm -C dd
Your notes: commands.sh

Write down each command you ran. It goes into your project summary.