13.4 mailavg - Check Size of MailboxesContributed by Wes Morgan While tuning our mail system, we needed to take a "snapshot" of the users' mailboxes at regular intervals over a 30-day period. This script simply calculates the average size and prints the arithmetic distribution of user mailboxes.
Here's a sample output from mailavg : $ 13.4.1 Program Notes for mailavgThis administrative program is similar to the filesum program in Chapter 7 . It processes the output of the ls command. The conditional expression "NR != 1" could have been put outside the main procedure as a pattern. While the logic is the same, using the expression as a pattern clarifies how the procedure is accessed, making the program easier to understand. In that procedure, Morgan uses a series of conditionals that allow him to collect distribution statistics on the size of each user's mailbox. |
|