3.3

Table Of Contents
4 Database Management
50
The space used for a story becomes free only when the last reference to the story has been
removed from the system.
Tracking Database Space over Time
Do not wait until you encounter an “out-of-space” condition before you start to think about
database storage. There are two ways you can get a good picture of space usage over time:
The “hogs” report
The information generated by the dbfree command
Using the hogs Command to Obtain Information
The hogs command displays how much space particular queues are using in the database. It
uses this format:
hogs [<directory or queue name>]
To get a hogs report on the People directory, type:
hogs people
A screen similar to the following appears:
% USED SHARED HELD LOCKED PURGE QUEUE NAME
0 36 20 0 0 0 PEOPLE.LEVY.BYLINE
0 128 20 0 0 0 PEOPLE.LEVY.FINAL
0 32 40 0 0 0 PEOPLE.LEVY.FORM
...
0 425 40 0 0 0 PEOPLE.WALTERS.NOVEL
The USED column contains the number of blocks used in that queue. The SHARED column
indicates the number of blocks used in that queue that are also used in other queues. To get
the number of blocks used only by that queue, subtract the SHARED count from the USED
count. If any queue has a substantially greater number of used blocks than the others,
examine that queue more closely.