As we saw earlier, another method of checking quotas is to use repquota. Using the options below will generate a report for all users that have quotas allocated on all filesystems:
hydrogen# repquota –av /dev/dsk/c0t0d0s7 (/export/home): Block limits File limits User used soft hard timeleft used soft hard timeleft testuser +- 358601 300000 500000 1.4 weeks 8 400 hydrogen#
This output can be analyzed on a regular basis and used by the system administrator to inform users if they are approaching their limits. The script below shows an example of how this can be done. It parses the output and sends mail to the administrator and the users concerned when they reach a predetermined limit:
hydrogen# cat checkQuotas ...