How to Check System Resource Quota Usage
Check system resource quota usage on Linux servers. Monitor quota limits, track quota usage, detect quota exhaustion, and set up automated quota monitoring with Zuzia.app.
How to Check System Resource Quota Usage
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 System Resource Limits and Quotas Monitoring Guide. 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
While manual quota checks work for audits, production Linux servers require automated quota usage monitoring that continuously tracks quota usage, detects exhaustion, and alerts you when quotas are exceeded.
How Zuzia.app Quota Usage Monitoring Works
Zuzia.app automatically monitors quota usage through scheduled command execution. The platform checks quota usage, tracks quota limits, detects quota exhaustion, and sends alerts when quotas are exceeded.
Setting Up Quota Usage Monitoring
-
Add Scheduled Task for Quota Checking
- Command:
repquota -a | grep -E "\*|exceeded" | wc -l - Frequency: Every 6 hours
- Alert when: Quotas exceeded
- Command:
-
Configure Quota Usage Monitoring
- Command:
repquota -a | awk '$3 > 80 || $6 > 80' | wc -l - Frequency: Every 6 hours
- Alert when: Users near quota limits
- Command:
-
Set Up Resource Limit Monitoring
- Command:
ulimit -a - Frequency: Once daily
- Alert when: Limits changed unexpectedly
- Command:
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:
- Check quota status:
quota -u username - Identify users exceeding quotas:
repquota -a | grep "*" - Increase quotas if appropriate
- Request users reduce usage
Resource Limits Reached
When resource limits are reached:
- Check current limits:
ulimit -a - Review resource usage:
ps aux --sort=-%mem | head -10 - Increase limits if needed
- Optimize resource usage
FAQ
Related guides, recipes, and problems
-
Related guides
-
Related recipes
-
Related problems