A miniature implementation of top(1).