Monitoring bandwidth and disk usage in cPanel and WHM is essential for managing a web hosting environment effectively, ensuring you stay within your hosting plan limits and identifying any potential issues or resource overuses early. Here’s how to monitor these metrics using both cPanel and WHM:
Monitoring in cPanel
For website owners managing individual accounts, cPanel provides tools to monitor and manage disk space and bandwidth usage.
Step 1: Log into cPanel
- Access your cPanel: Use your username and password to log in through your hosting provider’s access point, typically found at
http://yourdomain.com/cpanel
.
Step 2: Find the Metrics Section
- Navigate to Metrics: Once logged in, look for the “Metrics” section in the cPanel dashboard. This section includes tools to monitor various aspects of your hosting account.
Step 3: Check Disk Usage
- Disk Usage Tool: Click on the “Disk Usage” tool. This displays how much disk space each directory and subdirectory is using on your account. It helps you understand where most of your storage is being consumed, such as email, website files, or databases.
- Manage Files: Use the information to manage your files more effectively. Consider deleting unnecessary files or folders, or archiving old data if your disk usage is high.
Step 4: Monitor Bandwidth
- Bandwidth Tool: Click on the “Bandwidth” tool within the same Metrics section. This feature provides a detailed view of your monthly bandwidth usage, breaking down the data transfer by HTTP, FTP, and email (SMTP, POP3).
- Analyze Traffic: You can see bandwidth usage over different time frames, helping you identify trends, spikes, or unusual activity, which may indicate a need for more resources or potential security issues like DDoS attacks.
Monitoring in WHM (For Resellers and Server Administrators)
If you’re a reseller or a server administrator, WHM provides broader tools for monitoring the disk and bandwidth usage across multiple cPanel accounts.
Step 1: Log into WHM
- Access your WHM: Typically accessed at
https://yourserverip:2087
or via a direct link from your hosting provider.
Step 2: Navigate to Account Information
- List Accounts: Under the “Account Information” section, click on “List Accounts.” This page provides a snapshot of the disk space and bandwidth used by each cPanel account under your management.
Step 3: Analyze Usage
- Check Details: For more detailed views, click on the “+” icon next to each account. This expands the view to show detailed resource usage, including disk space, monthly bandwidth, email quotas, and other relevant metrics.
Step 4: Utilize WHM’s Disk and Bandwidth Usage Tools
- Disk Usage: Go to “Account Functions” and select “Disk Usage.” This tool allows you to see disk usage for each account and manage it accordingly.
- Bandwidth Usage: In the “Account Functions,” select “View Bandwidth Usage” to see detailed bandwidth statistics for each account, helping you manage limits and understand usage patterns.
Step 5: Set Alerts and Notifications
- Configure Alerts: WHM allows you to set up alerts for when accounts are nearing their disk or bandwidth limits. Configure these notifications in the “Tweak Settings” under the “Server Configuration.”
Best Practices
- Regular Checks: Make monitoring a regular part of your routine to avoid unexpected overages and manage resources efficiently.
- Educate Users: If you’re managing client accounts, educate your clients on managing their disk and bandwidth usage effectively.
By regularly monitoring bandwidth and disk usage through cPanel and WHM, you can ensure optimal performance for your websites, prevent service disruptions, and plan resource upgrades well in advance to accommodate growth or spikes in traffic.