Use this routine if you look after a cPanel server and want to know exactly what to check, and how often. Most cPanel outages start as something small that nobody was watching: a disk filling up, inodes (the file-count limit on a disk) running out, mail piling up in the queue, MySQL killed when the server ran out of memory, or a certificate quietly expiring. A five-minute daily pass catches most of these before your users notice. On top of that come a weekly half hour, a monthly half day and a quarterly maintenance window, each with the commands to run and the output you should see.
What you’ll accomplish
- A written daily pass you can finish in under five minutes, on any number of servers.
- A weekly, monthly and quarterly list where every recurring check has exactly one home.
- A clear split between what should reach you as an alert and what only a deliberate look will find.
- A triage path for the three symptoms that generate most tickets: site down, mail stuck, server slow.
- A restore test on the calendar — the check almost nobody runs until the day it matters.
Prerequisites
- Root SSH access to a supported cPanel & WHM release, plus a WHM login for the parts easier done in the interface.
- A supported OS. cPanel qualifies AlmaLinux OS, CloudLinux, Rocky Linux and one Ubuntu LTS at a time; this guide assumes the EL family and uses
dnf. On the Ubuntu build substituteaptthroughout —apt update && apt list --upgradablein place ofdnf check-update. CentOS 7 went end of life in June 2024 and is no longer a supported cPanel platform: the commands still run withyumfordnf, but what that server needs is a migration plan, not a cadence. - EasyApache 4, and
/scriptsas the conventional symlink to/usr/local/cpanel/scripts— this guide uses the short spelling. - Two things named here are not stock cPanel: CSF (ConfigServer Security & Firewall) and CloudLinux LVE. Skip those checks if you do not run them.
- Database unit naming differs:
mysqldfor MySQL,mariadbfor MariaDB. Confirm yours once withsystemctl list-units 'mysql*' 'mariadb*'.
How it works
Every check has a natural frequency set by how fast the thing it watches can change, and putting a check in the wrong band is what makes a runbook fail. Disk fills in hours, so it is daily. A certificate has weeks of runway, so weekly is early enough. Whether backups restore changes only when the backup configuration changes, so monthly is honest — and quarterly holds anything needing a reboot or a maintenance announcement.
The second idea is the automated/manual split on the diagram. Anything that can page you should page you; the daily pass then confirms the automation is alive rather than being the primary detection method. The manual items are manual because nothing on the box volunteers them — no service alerts you that your restores have never been tested.
Step-by-step
- Build the daily pass. Start with what cPanel itself thinks is running, because it knows about services
systemctldoes not, such ascpsrvdandcpdavd.
whmapi1 servicestatus
Expected — a YAML block, one entry per service, where every service you care about has enabled: 1 and running: 1. The exact field set varies a little between cPanel releases, so read those two keys rather than matching the sample line for line:
---
data:
service:
-
display_name: Apache Web Server
enabled: 1
monitored: 1
name: httpd
running: 1
-
display_name: Exim Mail Server
enabled: 1
monitored: 1
name: exim
running: 1
metadata:
command: servicestatus
reason: OK
result: 1
version: 1
Restart anything showing running: 0 through cPanel’s own wrapper rather than systemctl:
/scripts/restartsrv_httpd
Expected: Waiting for httpd to restart......finished. followed by a status summary with a PID.
- Check capacity, and check inodes separately. The highest-yield command in the runbook.
df -h / /home ; df -i / /home
Expected:
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 50G 21G 30G 42% /
/dev/vdb1 500G 388G 113G 78% /home
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 3.2M 184K 3.0M 6% /
/dev/vdb1 32M 27M 5.1M 85% /home
Read the second block, not just the first. That server has 113 GB free and is nonetheless only weeks from failure, because inode use is 85% — a filesystem with free space but no free inodes refuses writes with No space left on device, which sends people staring at the wrong number for an hour.
- Read the mail queue as a number before you read it as a list.
exim -bpc
Expected: a small integer, typically 0 to 50 on a healthy shared server. Anything in the hundreds means one sender is generating it, and one command names them:
exim -bp | exiqsumm
Expected:
Count Volume Oldest Newest Domain
----- ------ ------ ------ ------
31 248KB 14h 22m example.com
9 71KB 3h 18m gmail.com
- Skim authentication failures for shape, not volume.
grep -c 'Failed password' /var/log/secure
grep -i 'failed' /usr/local/cpanel/logs/login_log | tail -5
Expected: a four-digit count in /var/log/secure is ordinary background noise. Shape is what matters — many failures against one valid username, or a success following failures from the same address. That is what cPHulk and CSF exist to catch; the daily glance confirms they still do.
- Confirm last night’s backup finished. A job that ran is not a backup that completed.
ls -lt /usr/local/cpanel/logs/cpbackup/ | head -3
grep -iE 'fail|error' /usr/local/cpanel/logs/cpbackup/$(ls -t /usr/local/cpanel/logs/cpbackup | head -1) | head
Expected: the newest log is dated this morning and the second command prints nothing. Any output is a partial backup — the state people discover during a restore.
- Build the weekly pass. Check the cPanel version and which update channel is pushing it:
/usr/local/cpanel/cpanel -V
grep -E '^(CPANEL|RPMUP|UPDATES)=' /etc/cpupdate.conf
tail -3 "$(ls -t /var/cpanel/updatelogs/update.*.log | head -1)"
Expected:
11.126.0.14
CPANEL=release
RPMUP=daily
UPDATES=daily
[2026-09-09 03:14:22 +0000] Completed all updates
Each upcp run writes its own timestamped log under /var/cpanel/updatelogs/, so the command above reads the newest one. It should end in a completion line, not a stack trace. A server whose UPDATES is manual is a server nobody updates — a decision that should be deliberate.
- Check OS packages, which cPanel does not update for you.
dnf check-update
Expected: exit code 100 and a list when updates are pending, 0 and no list when there are none. yum check-update behaves the same way on CentOS 7. The Ubuntu build has no dnf — use apt update && apt list --upgradable, which exits 0 either way, so read the list rather than the exit code.
- Verify certificate expiry, especially the ones AutoSSL does not own.
openssl s_client -servername example.com -connect example.com:443 </dev/null 2>/dev/null | openssl x509 -noout -subject -enddate
ls -lt /var/cpanel/logs/autossl | head -3
Expected:
subject=CN = example.com
notAfter=Nov 14 08:22:01 2026 GMT
AutoSSL handles what it controls. Manually installed commercial certificates renew when a human remembers, which is why those are the ones that expire — the inventory approach is in checking SSL certificate expiry and staying ahead of renewals.
- Review the firewall deny list before it reviews you.
wc -l /etc/csf/csf.deny
csf -g 203.0.113.44
Expected: a deny file that grows steadily but not explosively, and for a given address the matching rule plus the lfd comment explaining why it landed there. Weekly review catches the case that matters: a customer’s office IP auto-blocked after a mail client retried a stale password, arriving as a ticket that reads like an outage.
- Look at resource overages. Accounts near their quota are next month’s disk-full incident:
repquota -a | sort -k3 -n -r | head -10
Expected: a table sorted by blocks used, where the top accounts sit well below their hard limit. On CloudLinux, pair this with lveinfo --period=1d for accounts hitting CPU or I/O faults.
- Build the monthly pass, starting with the restore test. This is the check that separates a managed server from a hoped-for one. Confirm the archives exist at the right size:
ls -lh /backup/$(date -d 'yesterday' +%F)/accounts/ | head -5
Expected — one archive per account, with sizes in the range last month’s were:
total 214G
-rw-r--r-- 1 root root 4.1G Sep 8 02:11 acmecorp.tar.gz
-rw-r--r-- 1 root root 862M Sep 8 02:14 blueleaf.tar.gz
-rw-r--r-- 1 root root 17M Sep 8 02:14 devscratch.tar.gz
-rw-r--r-- 1 root root 1.9G Sep 8 02:19 northgate.tar.gz
An archive that shrank by an order of magnitude is the failure this listing exists to catch.
Then restore one, into a scratch server or test account and never over a live one. Leave --force off: that flag exists to restore on top of an account that already exists, and it does so by skipping the conflict checks — on a test restore those checks are the point.
/scripts/restorepkg /home/cpmove-someuser.tar.gz
Expected: restorepkg streams each phase (extraction, MySQL, DNS, mail) and finishes with a summary. Read every line beginning with !! — those are failures the exit code hides. The file-level version of this task is restoring files from a cPanel backup in WHM.
- Inventory PHP versions and measure your end-of-life exposure.
whmapi1 php_get_installed_versions
whmapi1 php_get_vhost_versions | grep -c 'ea-php74'
Expected: the installed list, then a count. If that count is 18, eighteen sites run a PHP version with no upstream security fixes — and you have a number for whoever owns the migration budget.
- Record disk growth as a trend.
du -sh /home/* 2>/dev/null | sort -h | tail -10
Expected: the ten largest accounts. Write the total down each month. Two data points tell you nothing; six tell you which month you run out — the only version of this fact you can plan against.
- Build the quarterly pass. Kernels only take effect after a restart:
uname -r
needs-restarting -r
Expected:
4.18.0-553.34.1.el8_10.x86_64
Core libraries or services have been updated since boot-up:
* kernel
Reboot is required to ensure that your system benefits from these updates.
needs-restarting comes from dnf-utils. On CloudLinux with KernelCare, kcarectl --info says whether patches were applied live and a reboot is genuinely unnecessary.
- Check the database and licence lifecycles.
mysql --version
/usr/local/cpanel/cpkeyclt
Expected:
mysql Ver 15.1 Distrib 10.6.19-MariaDB, for Linux (x86_64) using readline 5.1
Updating cPanel license...Done. Update succeeded.
A database release approaching end of life is a project with months of lead time, not an emergency — provided you noticed a quarter early rather than the week fixes stopped.
What to alert on versus what to check by hand
| Signal | How you should learn about it | Why |
|---|---|---|
| Disk above 85%, inodes above 80% | Alert | Hours of warning, total outage if missed |
| A monitored service stopped | Alert | Nothing else tells you before a customer does |
| Mail queue above a few hundred | Alert | Usually a compromise; reputation degrades fast |
| Backup job failed or did not run | Alert | Silent until the day you need it |
| Certificate under 14 days | Alert | Browser warning on every visitor |
| Restore test result | Manual | No system knows whether the restore worked |
| PHP end-of-life exposure | Manual | Needs judgement about which sites can move |
| Firewall deny list review | Manual | Attacker versus locked-out customer needs context |
| Disk growth trend | Manual | A trend is measurements someone chose to keep |
The daily pass is not a substitute for monitoring. If a service stops at 04:00, a checklist run at 09:00 is a post-mortem. The pass verifies the automation still works and catches the slow-moving things alerts are bad at.
The logs that matter
Four files answer most questions, and knowing which to open is most of the speed:
/var/log/messages— kernel, OOM kills, hardware. On EL9 the same content is injournalctl -kif rsyslog was removed./usr/local/cpanel/logs/error_log— cPanel and WHM itself: API failures,cpsrvderrors, transfer problems./var/log/exim_mainlog— every message accepted, deferred, rejected or delivered. On a spam burst thecwd=field names the directory the sending script lives in./etc/apache2/logs/error_log— Apache under EasyApache 4. That directory is a symlink: the file itself lives in/var/log/apache2/, and/usr/local/apache/logs/error_logis a third path to the same content, kept working for scripts written before EasyApache 4. All three are correct; pick one and be consistent. Per-site logs sit alongside it in/etc/apache2/logs/domlogs/.
The database error log is /var/lib/mysql/$(hostname).err — the first place to look after any unexplained restart.
The failures that produce most incidents
Nearly every cPanel incident arrives as one of three symptoms, each with a fixed opening move. Run the three commands before changing anything: the most expensive incidents are the ones where someone restarted a healthy service and destroyed the evidence.
Validate it works
Run the whole daily pass and time it. If it takes longer than five minutes it will not survive a busy week — move the slow parts to the weekly band.
time (whmapi1 servicestatus >/dev/null; df -h / /home; df -i / /home; exim -bpc)
Expected: real under ten seconds, with output you can read at a glance.
Then confirm the alerting half is real, because a cadence built on notifications nobody receives is built on nothing:
grep -E 'CONTACTEMAIL|CONTACTPAGER' /etc/wwwacct.conf
Expected: a CONTACTEMAIL value that is a monitored address, not the mailbox of somebody who left. Cross-check WHM’s Contact Manager while you are there.
Finally, verify the restore you tested serves traffic rather than merely existing on disk:
curl -sI -H 'Host: example.com' http://127.0.0.1/ | head -3
Expected: HTTP/1.1 200 OK. A restore that produces files but a 500 is a failed restore that looked successful.
Troubleshooting
df -hshows free space but writes fail. Inodes are exhausted. Confirm withdf -i, then find the offender:for d in /home/*/mail; do echo "$(find $d -type f 2>/dev/null | wc -l) $d"; done | sort -rn | head -5. It is almost always a mailbox holding hundreds of thousands of tiny files, or a session directory nothing prunes.- Apache will not start after a configuration change. Run
apachectl configtestfor the syntax error and read/etc/apache2/logs/error_log. If the include structure itself is damaged,/scripts/rebuildhttpdconfregenerates the configuration from cPanel’s own data — but read the error first, because it will overwrite a hand edit you meant to keep. - MySQL died overnight and nothing else looks wrong. Check
grep -iE 'oom-killer|Killed process' /var/log/messages, thentail -50 /var/lib/mysql/$(hostname).err. The kernel chose MySQL because it was the largest process, not because it misbehaved. Restart with/scripts/restartsrv_mysql, then capinnodb_buffer_pool_sizeso it cannot claim memory the box does not have. - Mail queue climbing with no obvious sender.
exim -bp | awk '/<.*>/ {print $4}' | sort | uniq -c | sort -rn | head -5names the envelope senders;grep 'cwd=' /var/log/exim_mainlog | tail -20names the directory the sending script runs from, usually a compromised contact form. - AutoSSL silently stopped renewing a domain. The certificate ages out with no warning. Check
/var/cpanel/logs/autossl/for the last run and its per-domain result; the usual cause is DNS that moved off the server, so domain control validation no longer succeeds.
When this is the wrong approach
If you run one site and no email, a cPanel server plus this cadence is more overhead than the workload justifies — a managed platform removes the whole category of work. At the other end, across forty servers a manual pass does not scale: the checks become configuration management and centralised monitoring, and this document turns into the policy those tools enforce rather than a checklist a person walks.
This is a health cadence, not a security programme. Malware scanning, patch response times and incident response each need their own process; the quarterly access review here is a reminder, not a substitute. And no daily checklist detects a 04:00 outage — that is what alerting is for.
Keep the cPanel & WHM documentation and the Exim documentation open for API, script and queue behaviour.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.