← All guides

Check Disk Quota Usage on Linux: quota and repquota

Updated:

Check Disk Quota Usage on Linux: quota and repquota

Need to check system resource quota usage on your Linux server? Want to monitor quota limits, track quota usage, and detect quota exhaustion? This guide shows you how to check quota usage using built-in commands and automated monitoring with Zuzia.app.

For comprehensive quota monitoring strategies, see Resource Limits & Disk Quotas on Linux. For troubleshooting quota issues, see System Resource Quota Exhaustion.

Why Checking Quota Usage Matters

Resource quotas limit resource usage to prevent exhaustion. When quotas are exceeded, users can't save files, processes can fail, and services can become unavailable. Checking quota usage helps you detect quota exhaustion, track resource consumption, plan quota increases, and maintain system stability.

Method 1: Check Disk Quotas

Check disk quotas to see current quota usage:

View Quota Usage

# View user disk quotas
quota -u username

# View all user quotas
repquota -a

# View quotas for specific filesystem
repquota /home

# View quota summary
quota -s

Check Quota Limits

# Check current quota usage
quota -v username

# View quota limits
quota -l username

# Check quota status
quota -s username

# View quota for all users
repquota -a -s

Method 2: Monitor Quota Usage

Monitor quota usage to track resource consumption:

Track Quota Usage

# Check if user exceeded quota
quota -u username | grep -E "exceeded|over"

# View users near quota limits
repquota -a | awk '$3 > 80 || $6 > 80'

# Check quota grace period
quota -u username | grep grace

# Monitor quota usage over time
quota -u username > /tmp/quota-$(date +%Y%m%d).txt

Identify Quota Violations

# Check for exceeded quotas
repquota -a | grep -E "\*|exceeded"

# View users over quota
quota -a | grep -E "exceeded|over"

# Check quota grace period status
repquota -a | grep grace

# Identify users near quota limits
repquota -a | awk '$3 > 90 || $6 > 90'

Method 3: Check System Resource Limits

Check system resource limits to see process limits:

View Process Limits

# View current process limits
ulimit -a

# View specific limit
ulimit -n  # File descriptors
ulimit -u  # Processes
ulimit -v  # Virtual memory

# View limits for specific process
cat /proc/PID/limits

# View system-wide limits
cat /etc/security/limits.conf

Monitor Resource Usage

# Check current resource usage
ps aux --sort=-%mem | head -10

# View memory usage by user
ps aux | awk '{mem[$1]+=$6} END {for (u in mem) print u, mem[u]}'

# Check file descriptor usage
lsof | wc -l

# View process count by user
ps aux | awk '{proc[$1]++} END {for (u in proc) print u, proc[u]}'

Method 4: Automated Quota Usage Monitoring with Zuzia.app

Manual checks work while you are looking. To keep running them without you, Zuzia uses its agent and scheduled tasks.

How it works in Zuzia

  • Install the Zuzia agent on the server with one command. CPU, RAM, disk, load and network metrics start reporting on their own, with alerts on a threshold, on drift from the server's normal, or on a disk fill-up forecast.
  • Save the commands from this guide as a scheduled task and choose how often it runs, from every minute to once a year. The agent runs it on every host you pick.
  • If a command fails, you get an alert right away by email, Slack, Discord, push (through your Pushover account) or SMS (through your Vonage account).
  • The output of every run is kept, so you can look back at what changed. On paid plans, AI can read the output and alert you only when it spots a problem.

Setting it up

  1. Add the server in the Zuzia dashboard and install the agent.
  2. Create a scheduled task with the check commands below, then choose the hosts and how often it runs.
  3. Choose your notification channels. Turn on maintenance mode during planned work so it doesn't trigger alerts.

Custom Quota Monitoring Commands

Add these commands as scheduled tasks:

# Check for exceeded quotas
repquota -a | grep -E "\*|exceeded"

# View users near quota limits
repquota -a | awk '$3 > 80 || $6 > 80'

# Check quota usage summary
quota -s

# Monitor resource limits
ulimit -a

Best Practices

1. Monitor Quota Usage Regularly

Check quota usage every 6-12 hours. Use Zuzia.app for automated quota monitoring. Set up alerts before quotas are exceeded.

2. Set Appropriate Quota Limits

Configure quotas based on needs. Set soft limits as warnings. Set hard limits to prevent exhaustion.

3. Track Quota Trends

Monitor quota usage over time. Track quota growth rates. Plan quota increases proactively.

Troubleshooting

Quota Exceeded

When quotas are exceeded:

  1. Check quota status: quota -u username
  2. Identify users exceeding quotas: repquota -a | grep "*"
  3. Increase quotas if appropriate
  4. Request users reduce usage

Resource Limits Reached

When resource limits are reached:

  1. Check current limits: ulimit -a
  2. Review resource usage: ps aux --sort=-%mem | head -10
  3. Increase limits if needed
  4. Optimize resource usage

FAQ

How often should I check quota usage?

For production servers, check quota usage every 6-12 hours. Zuzia.app can check quotas automatically and alert when quotas are exceeded.

What quotas should I monitor?

Monitor disk quotas (space and inodes), memory limits, CPU limits, file descriptor limits, and process limits.

Can Zuzia.app detect quota exhaustion automatically?

Yes, Zuzia.app can detect quota exhaustion by monitoring quota usage, checking for exceeded quotas, tracking usage trends, and alerting when quotas are exceeded or near limits.

Related guides, recipes, and problems

We use cookies to ensure the proper functioning of our website.