CLI script to check account disk usage/quota from SSH
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
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>
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>
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'
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'
Replies have been locked on this page!