Top

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Subject: Top
Date: Tuesday, March 24, 1992 - 9:58 am

I have uploaded top to tsx.  It is a bastardisation of ps.  Below is
the readme:

Top
===

Disclaimer:

It works on my system.
Linux 0.95a 33MHz 386 IDE hard drive 4MB ram
GCC 1.40 (the new one)

Prerequisites:

ps by Branko Lankester
termcap functions (tgetent, tgetstr, tgoto etc)

Description:

This is top, inspired by the real world top.  It is based on ps by Branko
Lankester (I used ps095.tar.Z).  It displays the 'top' system processes, 
either by cpu use or memory use.

There are 24 fields that can be displayed for each process.  These are copies 
of the fields that ps would display.  You can select which fields you want
displayed or not.  Top can save this (to ~/.toprc) and will use it the next
time you run top.

The interval for update can be changed from zero to nine seconds.

Top displays a line giving help for keys.  Longer descriptions:

q       quit
k       kill - send any process a signal
n       nice - nice the top process (the code would allow changes to other
        processes's nice value, but there is no system kill)
c       sort processes by cpu usage
m       sort processes by memory usage
0 to 9  change update delay (in seconds)
A to X  toggle display of field
ctrl-W  write update delay, which fields are displayed to .toprc
        top reads this file on startup  
        
Installing:

Unpack top to the same directory as ps.  To compile:
cc -O -DNO_UPDATE -o top top.c psdata.c topcmd.c -ltermcap

Bugs/Notes:

Setting update delay to zero slows the machine to a crawl.  It is really good 
for wathcing executables being demand paged in.

The code for calculating all the fields is lifted straight from ps.c.

The keyboard response is jerky.  I tried using select, but it didn't work.  
Instead, it does a keyboard read every second.

Comments and bug reports for ps to:   lankeste@fwi.uva.nl (Branko Lankester)

For top, you'll have to sort it out yourself.  I probably won't have access to
a linux system for the next six months, starting friday 27 march.  I will
still respond by email, but can't do anything about it.  Hopefully Branko
can incorporate it back into ps.

My email address is cs89rdb@brunel.ac.uk (Roger Binns).
-- 
+=============================================================================+
| cs89rdb@brunel.ac.uk     Roger Binns    Brunel University - UK              |
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
|   Humans were created by water to move it uphill                            |
+=============================================================================+
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Top, cs87ejh, (Tue Mar 24, 9:58 am)