Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

CLI script to check account disk usage/quota from SSH

Feature Importer shared this idea 13 years ago
Open Discussion

As a Server Administrator, I want a CLI script to check account disk usage/quota from SSH, so that I can quickly monitor disk usage/quota from commandline


This would allow everyone a very easy way to check a sites disk usage/quota from SSH without having to jump into WHM to determine if a site is near/over quota


This is a feature that has been migrated over from the cPanel Forums. All previous comments and discussions concerning this feature can be located at:

http://forums.cpanel.net/f145/cli-script-check-account-disk-usage-quota-ssh-157414.html

Replies (2)

photo
1

cPanel does quota calculation for accounts based on files owned by the user. To check the user's quota from command line just run this command. quota is a unix utility already included in the base Redhat/CentOS.


quota -su <cpanel username>

photo
1

The most reliable way to check disk usage is to use new cPanel API:

uapi --user=USER Quota get_quota_info|grep -E 'limit|used'

Leave a Comment
 
Attach a file