Commit 2d5fc893 authored by albert's avatar albert

remove old files

parent 3e67b58e
procps-3.1.3 --> procps-3.1.4
top: was trashing every "3" in a command name
top: when killing a process, the PID was cut at a "3"
top: more reliable %CPU
update copyright dates (GPL & LGPL require this)
procps-3.1.2 --> procps-3.1.3
uses /proc/*/wchan files when available
top: user selection
sysctl: add -e for Red Hat 8.0 boot scripts
sysctl: the obvious --help, -V, and --version
sysctl: some command line error checking
w: stdout, not stderr -- thanks to Sander van Malssen
procps-3.1.1 --> procps-3.1.2
better RPM generation
use C99 features
some seLinux fixes
now count Inact_laundry as needed #172163
ps: fewer globals
ps: hardware-enforced buffer protection
ps: 1 kB smaller
top: B command added (for bold on/off)
top: handle old (and future) config files
top: man page tweak
top: old sort keys #167249
top: out-of-bounds RT as "RT"
top: several times faster
top: t command fixed
vmstat: -f
vmstat: -s
w: much faster
watch: don't drop empty lines #171005
watch: re-indented
procps-3.1.0 --> procps-3.1.1
vmstat faster on 2.5.xx kernels
vmstat header fixed
vmstat -a re-fixed
procps-3.0.5 --> procps-3.1.0
vmstat displays IO-wait time instead of bogus "w"
can build w/o shared library (set SHARED=0)
when IO-wait hidden, count as idle, not as sys
pmap command added (like Sun has)
do not crash GNU make 3.79
top slightly faster
procps-3.0.4 --> procps-3.0.5
top tolerates super-wide displays
better (?) RPM generation
XConsole and top.desktop removed
old build system removed
code cleanup
pgrep and pkill get "-o" (oldest matching process)
had vmstat "bi" and "bo" output interchanged on 2.5.xx
fix man page tbl directives
top man page cleaned up
procps-3.0.3 --> procps-3.0.4
make top go faster
Linux 2.2.xx ELF note warning removed
only show IO-wait on recent kernels
fix top's SMP stats
fix top for "dumb" and "vt510" terminals
in top, limit the priority values to -99 ... 99
procps-3.0.2 --> procps-3.0.3
more "make install" fixes
lib CFLAGS working again
top.1 codes fixed
bad (int*) cast in top removed
top runs faster
libproc memory corruption fixed
rant moved out of top.1 man page
ability to SKIP installing things
fixed ps --sort crash
procps-3.0.1 --> procps-3.0.2
top defaults to the old layout
top defaults to sorting by %CPU
fix top for non-SMP 2.2.xx and 2.0.xx
new "make install" fixed
vmstat -a fixed
vmstat compiles with latest gcc-3.x
vmstat does 64-bit time
procps-3.0.0 --> procps-3.0.1
sysctl handles net/ipv4/conf/eth1.0123/tag (VLAN interface)
sysctl handles net.ipv4.conf.eth1/0123.tag (VLAN interface)
"ps" is now about 2x faster than in procps-2.x.x
"ps -F" now documented
w works in KOI8-R locale
vmstat documentation update
"skill -n blah blah blah" lets you test options
simple "make && make install" now
procps-2.x.x --> procps-3.0.0
designed to support Linux 2.0 through 2.5.41 and beyond
new top, with optional: color, windowing, SMP stats
runs faster
more "it crashes" bugs fixed
top shows IO-wait time
vmstat can show active/inactive memory stats
real-time info supported in ps
correct "ps -o size" and "ps --sort size"
new maintainers
reduced memory usage for ps
allow large PIDs to be specified
SELINUX support is just a recompile away
the "F" column shrank, so "ps -l" has more command name room
64-bit time reduces the overflow problem
support S/390, IA-64 emulator, and user-mode Linux
oldps is gone
configure script -- use "make -f Makefile.noam" as a backup
"w" program better at determining what a user is doing
more stable
code at now (SourceForge)
Earlier changes, for those not using Debian already:
more stable
runs faster
-F format option
better error reporting in ps for unknown format specifiers
BSD's sysctl options -b and -X
top displays well on large-memory systems
old BSD-style select-by-PID ("ps l$$")
15-character user names
ps 'f' ASCII art forest fixed
add SIGSYS on i386
top reports real RSS value
large-memory systems work
minimal ps program for embedded systems (minimal.c)
BSD personality process selection fixed
support locale (French) with ',' and '.' mixed up
pgrep program
includes the "kill" and "nice" programs
don't chop non-tty ps output at 80 columns
......@@ -55,7 +55,7 @@ MANFILES := $(man1)uptime.1 $(man1)tload.1 $(man1)free.1 $(man1)w.1 \
$(man1)snice.1 $(man1)pgrep.1 $(man1)pkill.1 $(man1)pmap.1 \
$(man5)sysctl.conf.5 $(man8)vmstat.8 $(man8)sysctl.8
Makefile procps.lsm procps.spec v t \
minimal.c $(notdir $(MANFILES)) \
uptime.c tload.c free.c w.c top.c vmstat.c watch.c skill.c \
This diff is collapsed.
* top.h header file 1996/05/18,
* function prototypes, global data definitions and string constants.
static proc_t** readproctab2(int flags, proc_t** tab, ...);
static void parse_options(char *Options, int secure);
static void get_options(void);
static void error_end(int rno);
static void end(int signo);
static void stop(int signo);
static void window_size(int signo);
static int make_header(void);
static char *getstr(void);
static int getsig(void);
static float getfloat(void);
static int time_sort(proc_t **P, proc_t **Q);
static int pcpu_sort(proc_t **P, proc_t **Q);
static int mem_sort(proc_t **P, proc_t **Q);
static int age_sort(proc_t **P, proc_t **Q);
static void show_fields(void);
static void change_order(void);
static void change_fields(void);
static void show_task_info(proc_t *task);
static void show_procs(void);
static float get_elapsed_time(void);
static void show_meminfo(void);
static void do_stats(proc_t** p, float elapsed_time, int pass);
static void do_key(char c);
/* configurable field display support */
static int pflags[30];
static int Numfields;
/* Name of the config file (in $HOME) */
#ifndef RCFILE
#define RCFILE ".toprc"
#ifndef SYS_TOPRC
#define SYS_TOPRC "/etc/toprc"
#define MAXLINES 2048
#define MAXNAMELEN 1024
/* this is what procps top does by default, so let's do this, if nothing is
* specified
/* 0 1 2 3 */
/* 0123456789012345678901234567890 */
#define DEFAULT_SHOW "AbcDgHIjklMnoTP|qrsuzyV{EFWX"
static char Fields[256] = "";
/* This structure stores some critical information from one frame to
the next. mostly used for sorting. Added cumulative and resident fields. */
struct save_hist {
int ticks;
int pid;
int pcpu;
int utime;
int stime;
/* The original terminal attributes. */
static struct termios Savetty;
/* The new terminal attributes. */
static struct termios Rawtty;
/* Cached termcap entries. */
static char *cm, *cl, *top_clrtobot, *top_clrtoeol, *ho, *md, *me, *mr;
/* Current window size. Note that it is legal to set Display_procs
larger than can fit; if the window is later resized, all will be ok.
In other words: Display_procs is the specified max number of
processes to display (zero for infinite), and Maxlines is the actual
number. */
static int Lines, Cols, Maxlines, Display_procs;
/* Maximum length to display of the command line of a process. */
static unsigned Maxcmd;
/* Controls how long we sleep between screen updates. Accurate to
microseconds. */
static float Sleeptime = 5;
/* for opening/closing the system map */
static int psdbsucc = 0;
/* Mode flags. */
static int Irixmode = 1;
static int Secure = 0;
static int Cumulative = 0;
static int Noidle = 0;
static int CPU_states = 0;
static char CurrUser[BUFSIZ];
static int CL_pg_shift = (PAGE_SHIFT - 10);
static int CL_wchan_nout = -1;
static int show_stats = 1; /* show status summary */
static int show_memory = 1; /* show memory summary */
static int show_loadav = 1; /* show load average and uptime */
static int show_cmd = 1; /* show command name instead of commandline */
static pid_t monpids[520]; /* randomly chosen value */
static const int monpids_max = sizeof(monpids)/sizeof(pid_t);
static int monpids_index = 0;
static int Loops = -1; /* number of iterations. -1 loops forever */
static int Batch = 0; /* batch mode. Collect no input, dumb output */
/* sorting order: cpu%, mem, time (cumulative, if in cumulative mode) */
enum {
/* default sorting by CPU% */
static int sort_type = S_PCPU;
/* flags for each possible field. At the moment up to 30 are supported */
enum {
/* corresponding headers */
static char *headers[] =
" PID ", " PPID ", " UID ",
"USER ", "%CPU ", "%MEM ",
"TTY ", "PRI ", " NI ",
" SIZE ", " TRS ", "SWAP ",
"SHARE ", " A ", " WP ",
" D ", " RSS ", "WCHAN ",
"LC ",
/* corresponding field desciptions */
static char *headers2[] =
"Process Id", "Parent Process Id", "User Id",
"User Name", "CPU Usage", "Memory Usage",
"Controlling tty", "Priority", "Nice Value",
"Page Fault Count", "Code Size (kb)", "Data+Stack Size (kb)",
"Virtual Image Size (kb)", "Resident Text Size (kb)", "Swapped kb",
"Shared Pages (kb)", "Accessed Page count", "Write Protected Pages",
"Dirty Pages", "Resident Set Size (kb)", "Sleeping in Function",
"Process Status", "CPU Time", "Command",
"Last used CPU (expect this to change regularly)",
"Task Flags (see linux/sched.h)"
/* The header printed at the top of the process list.*/
static char Header[MAXLINES];
/* The response to the interactive 'h' command. */
#define HELP_SCREEN "\
Interactive commands are:\n\
space\tUpdate display\n\
^L\tRedraw the screen\n\
fF\tadd and remove fields\n\
oO\tChange order of displayed fields\n\
h or ?\tPrint this list\n\
S\tToggle cumulative mode\n\
i\tToggle display of idle proceses\n\
I\tToggle between Irix and Solaris views (SMP-only)\n\
c\tToggle display of command name/line\n\
l\tToggle display of load average\n\
m\tToggle display of memory information\n\
t\tToggle display of summary information\n\
k\tKill a task (with any signal)\n\
r\tRenice a task\n\
N\tSort by pid (Numerically)\n\
A\tSort by age\n\
P\tSort by CPU usage\n\
M\tSort by resident memory usage\n\
T\tSort by time / cumulative time\n\
u\tShow only a specific user\n\
n or #\tSet the number of process to show\n\
s\tSet the delay in seconds between updates\n\
W\tWrite configuration file ~/.toprc\n\
Interactive commands available in secure mode are:\n\
space\tUpdate display\n\
^L\tRedraw the screen\n\
fF\tadd and remove fields\n\
h or ?\tPrint this list\n\
S\tToggle cumulative mode\n\
i\tToggle display of idle proceses\n\
c\tToggle display of command name/line\n\
l\tToggle display of load average\n\
m\tToggle display of memory information\n\
t\tToggle display of summary information\n\
n or #\tSet the number of process to show\n\
u\tShow only a specific user\n\
oO\tChange order of displayed fields\n\
W\tWrite configuration file ~/.toprc\n\
/* Number of lines needed to display the header information. */
static int header_lines;
/* ############## Some Macro definitions for screen handling ######### */
/* String to use in error messages. */
#define PROGNAME "top"
/* Clear the screen. */
#define clear_screen() \
printf("%s", cl)
/* Show an error in the context of the spiffy full-screen display. */
#define SHOWMESSAGE(x) do { \
printf("%s%s%s%s", tgoto(cm, 0, header_lines-2), top_clrtoeol,md,mr); \
printf x; \
printf ("%s",me); \
fflush(stdout); \
sleep(2); \
} while (0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment