Check out the new USENIX Web site.

Kernel Mucking in Top

William LeFebvre
Argonne National Laboratory


For many years, the popular program top has aided system administrations in examination of process resource usage on their machines. Yet few are familiar with the techniques involved in obtaining this information. Most of what is displayed by top is available only in the dark recesses of kernel memory. Extracting this information requires familiarity not only with how bytes are read from the kernel, but also what data needs to be read. The wide variety of systems and variants of the Unix opeating system in today's marketplace makes writing such a program very challenging. This paper explores the tremendous diversity in kernel information across the many platforms and the solutions employed by top to achieve and maintain ease of portability in the presence of such divergent systems.

Download the full text of this paper in ASCII (39,206 bytes) and POSTSCRIPT (119,086 bytes) form.

To Become a USENIX Member, please see our Membership Information.