From 89c55072f6e6a7efa7a9c704d3030b43ce66031faac91449f160a02fd371bbf7 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:17:32 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/procps?expand=0&rev=1 --- .gitattributes | 23 + .gitignore | 1 + boot.sysctl | 53 ++ procps-3.2.2-100cpus.diff | 20 + procps-3.2.2-ia64.diff | 13 + procps-3.2.2-top-termsize.patch | 10 + procps-3.2.2-w-notruncate.diff | 87 +++ procps-3.2.2-w-simply-work.diff | 19 + procps-3.2.3-buffersize.diff | 11 + procps-3.2.3-make.diff | 52 ++ procps-3.2.5-CPU-states.patch | 17 + procps-3.2.5-eof.diff | 11 + procps-3.2.5-pmap-smaps-rml-2.patch | 679 +++++++++++++++++++++++ procps-3.2.5-top-rc.patch | 14 + procps-3.2.7-cpu_hotplug.patch | 95 ++++ procps-3.2.7-manycpus.diff | 27 + procps-3.2.7-readeof.patch | 77 +++ procps-3.2.7-top.1.diff | 11 + procps-3.2.7.tar.bz2 | 3 + procps.changes | 815 ++++++++++++++++++++++++++++ procps.spec | 574 ++++++++++++++++++++ pwdx-bufferoverflow.diff | 10 + ready | 0 sysctl.conf | 7 + systat.xinetd | 17 + 25 files changed, 2646 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 boot.sysctl create mode 100644 procps-3.2.2-100cpus.diff create mode 100644 procps-3.2.2-ia64.diff create mode 100644 procps-3.2.2-top-termsize.patch create mode 100644 procps-3.2.2-w-notruncate.diff create mode 100644 procps-3.2.2-w-simply-work.diff create mode 100644 procps-3.2.3-buffersize.diff create mode 100644 procps-3.2.3-make.diff create mode 100644 procps-3.2.5-CPU-states.patch create mode 100644 procps-3.2.5-eof.diff create mode 100644 procps-3.2.5-pmap-smaps-rml-2.patch create mode 100644 procps-3.2.5-top-rc.patch create mode 100644 procps-3.2.7-cpu_hotplug.patch create mode 100644 procps-3.2.7-manycpus.diff create mode 100644 procps-3.2.7-readeof.patch create mode 100644 procps-3.2.7-top.1.diff create mode 100644 procps-3.2.7.tar.bz2 create mode 100644 procps.changes create mode 100644 procps.spec create mode 100644 pwdx-bufferoverflow.diff create mode 100644 ready create mode 100644 sysctl.conf create mode 100644 systat.xinetd diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/boot.sysctl b/boot.sysctl new file mode 100644 index 0000000..3e545bd --- /dev/null +++ b/boot.sysctl @@ -0,0 +1,53 @@ +#! /bin/sh +# +# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved. +# +# /etc/init.d/boot.sysctl +# +### BEGIN INIT INFO +# Provides: boot.sysctl +# Should-Start: setserial boot.isapnp $local_fs +# Required-Stop: +# Default-Start: B +# Default-Stop: +# Description: run sysctl with a given config file or create it +### END INIT INFO + +. /etc/rc.status +. /etc/sysconfig/sysctl + +rc_reset + +case "$1" in + start) + # + # run sysctl if the config file exists + # otherwise generate it + # the values set here might be overridden by the settings + # in /etc/sysconfig/sysctl + # + if [ -x /sbin/sysctl ] ; then + if [ ! -e /etc/sysctl.conf ]; then + echo -n "Sysctl: no file /etc/sysctl.conf" + rc_failed 5 + else + echo "Setting current sysctl status from /etc/sysctl.conf" + sysctl -e -p /etc/sysctl.conf + fi + rc_status -v -r + fi + ;; + stop) + # skip / do nothing + ;; + status) + rc_failed 4 + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status}" + exit 1 + ;; +esac + +rc_exit diff --git a/procps-3.2.2-100cpus.diff b/procps-3.2.2-100cpus.diff new file mode 100644 index 0000000..8445e3a --- /dev/null +++ b/procps-3.2.2-100cpus.diff @@ -0,0 +1,20 @@ +--- procps-3.2.5/top.c ++++ procps-3.2.5/top.c +@@ -1168,7 +1168,7 @@ + { "GgGg", " TTY ", " %-8.8s", 8, -1, SF(TTY), "Controlling Tty", L_stat }, + { "HhHh", " PR", " %3d", -1, -1, SF(PRI), "Priority", L_stat }, + { "IiIi", " NI", " %3d", -1, -1, SF(NCE), "Nice value", L_stat }, +- { "JjYy", " #C", " %2u", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat }, ++ { "JjYy", " #C", " %3u", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat }, + { "KkEe", " %CPU", " %#4.1f", -1, -1, SF(CPU), "CPU usage", L_stat }, + { "LlWw", " TIME", " %6.6s", 6, -1, SF(TME), "CPU Time", L_stat }, + { "MmRr", " TIME+ ", " %9.9s", 9, -1, SF(TME), "CPU Time, hundredths", L_stat }, +@@ -1192,7 +1192,7 @@ + { "..Qq", " A", " %4.4s", 4, SK_no, SF(PID), "Accessed Page count", L_stat }, + { "..Nn", " TRS", " %4.4s", 4, SK_Kb, SF(PID), "Code in memory (kb)", L_stat }, + { "..Rr", " WP", " %4.4s", 4, SK_no, SF(PID), "Unwritable Pages", L_stat }, +- { "Jj[{", " #C", " %2u", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat }, ++ { "Jj[{", " #C", " %3u", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat }, + { "..\\|"," Bad", " %2u", -1, -1, SF(CPN), "-- must ignore | --", 0 }, + { "..]}", " Bad", " %2u", -1, -1, SF(CPN), "-- not used --", 0 }, + { "..^~", " Bad", " %2u", -1, -1, SF(CPN), "-- not used --", 0 }, diff --git a/procps-3.2.2-ia64.diff b/procps-3.2.2-ia64.diff new file mode 100644 index 0000000..5e87639 --- /dev/null +++ b/procps-3.2.2-ia64.diff @@ -0,0 +1,13 @@ +--- procps-3.2.5/proc/devname.c ++++ procps-3.2.5/proc/devname.c +@@ -42,6 +42,10 @@ + #define major <-- do not use --> + #define minor <-- do not use --> + #endif ++#ifdef __ia64__ ++#undef PAGE_SIZE ++#define PAGE_SIZE (64*1024) ++#endif + + typedef struct tty_map_node { + struct tty_map_node *next; diff --git a/procps-3.2.2-top-termsize.patch b/procps-3.2.2-top-termsize.patch new file mode 100644 index 0000000..d34ed30 --- /dev/null +++ b/procps-3.2.2-top-termsize.patch @@ -0,0 +1,10 @@ +--- procps-3.2.5/top.h ++++ procps-3.2.5/top.h +@@ -132,6 +132,7 @@ + #define _PUFF(fmt,arg...) \ + do { \ + char _str[ROWBUFSIZ]; \ ++ if (Pseudo_row >= Screen_rows-1) break; \ + int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg); \ + putp ( Batch ? _str : \ + ({ \ diff --git a/procps-3.2.2-w-notruncate.diff b/procps-3.2.2-w-notruncate.diff new file mode 100644 index 0000000..09df88c --- /dev/null +++ b/procps-3.2.2-w-notruncate.diff @@ -0,0 +1,87 @@ +Only in procps-3.2.0/proc: .depend +Only in procps-3.2.0/proc: alloc.o +Only in procps-3.2.0/proc: devname.o +Only in procps-3.2.0/proc: escape.o +Only in procps-3.2.0/proc: ksym.o +Only in procps-3.2.0/proc: libproc.a +Only in procps-3.2.0/proc: prof.o +Only in procps-3.2.0/proc: pwcache.o +Only in procps-3.2.0/proc: readproc.o +Only in procps-3.2.0/proc: sig.o +Only in procps-3.2.0/proc: slab.o +Only in procps-3.2.0/proc: status.o +Only in procps-3.2.0/proc: sysinfo.o +Only in procps-3.2.0/proc: version.o +Only in procps-3.2.0/proc: whattime.o +Only in procps-3.2.0: w +================================================================================ +--- procps-3.2.5/w.c ++++ procps-3.2.5/w.c +@@ -191,7 +191,25 @@ + return; + + strncpy(uname, u->ut_user, USERSZ); /* force NUL term for printf */ +- if (formtype) { ++ switch(formtype) { ++ case 2: ++ printf("%s %s", uname, u->ut_line); ++ if (from) ++ print_host(u->ut_host, sizeof u->ut_host); ++ print_logintime(u->ut_time, stdout); ++ if (*u->ut_line == ':') /* idle unknown for xdm logins */ ++ printf(" ?xdm? "); ++ else ++ print_time_ival7(idletime(tty), 0, stdout); ++ print_time_ival7(jcpu/Hertz, (jcpu%Hertz)*(100./Hertz), stdout); ++ if (best) { ++ unsigned long long pcpu = best->utime + best->stime; ++ print_time_ival7(pcpu/Hertz, (pcpu%Hertz)*(100./Hertz), stdout); ++ } else ++ printf(" ? "); ++ break; ++ ++ case 1: + printf("%-9.8s%-9.8s", uname, u->ut_line); + if (from) + print_host(u->ut_host, sizeof u->ut_host); +@@ -206,7 +224,8 @@ + print_time_ival7(pcpu/Hertz, (pcpu%Hertz)*(100./Hertz), stdout); + } else + printf(" ? "); +- } else { ++ break; ++ case 0: + printf("%-9.8s%-9.8s", u->ut_user, u->ut_line); + if (from) + print_host(u->ut_host, sizeof u->ut_host); +@@ -214,6 +233,8 @@ + printf(" ?xdm? "); + else + print_time_ival7(idletime(tty), 0, stdout); ++ ++ break; + } + fputs(" ", stdout); + if (likely(best)) { +@@ -238,11 +259,12 @@ + #endif + + setlocale(LC_ALL, ""); +- for (args=0; (ch = getopt(argc, argv, "hlusfV")) != EOF; args++) ++ for (args=0; (ch = getopt(argc, argv, "hlusnfV")) != EOF; args++) + switch (ch) { + case 'h': header = 0; break; + case 'l': longform = 1; break; + case 's': longform = 0; break; ++ case 'n': longform = 2; header=0; break; + case 'f': from = !from; break; + case 'V': display_version(); exit(0); + case 'u': ignoreuser = 1; break; +@@ -251,6 +273,7 @@ + " -h skip header\n" + " -l long listing (default)\n" + " -s short listing\n" ++ " -n non truncated listing (large)\n" + " -u ignore uid of processes\n" + " -f toggle FROM field (default %s)\n" + " -V display version\n", FROM_STRING); diff --git a/procps-3.2.2-w-simply-work.diff b/procps-3.2.2-w-simply-work.diff new file mode 100644 index 0000000..6aa2b42 --- /dev/null +++ b/procps-3.2.2-w-simply-work.diff @@ -0,0 +1,19 @@ +--- procps-3.2.5/w.c ++++ procps-3.2.5/w.c +@@ -285,10 +285,16 @@ + + if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_col > 0) + maxcmd = win.ws_col; ++#if 0 ++/* I have no idea why I shouldn't be allowed to see the result ++ with a line wrap. The other solution would be to create a ++ wcat alias, which does w|cat to work around this, but this ++ would be stupid in my opinion. */ + if (maxcmd < 71) { + fprintf(stderr, "%d column window is too narrow\n", maxcmd); + exit(1); + } ++#endif + maxcmd -= 29 + (from ? 16 : 0) + (longform ? 20 : 0); + if (maxcmd < 3) + fprintf(stderr, "warning: screen width %d suboptimal.\n", win.ws_col); diff --git a/procps-3.2.3-buffersize.diff b/procps-3.2.3-buffersize.diff new file mode 100644 index 0000000..013fb26 --- /dev/null +++ b/procps-3.2.3-buffersize.diff @@ -0,0 +1,11 @@ +--- procps-3.2.5/proc/sysinfo.c ++++ procps-3.2.5/proc/sysinfo.c +@@ -43,7 +43,7 @@ + #define VMINFO_FILE "/proc/vmstat" + static int vminfo_fd = -1; + +-static char buf[1024]; ++static char buf[4096]; + + /* This macro opens filename only if necessary and seeks to 0 so + * that successive calls to the functions are more efficient. diff --git a/procps-3.2.3-make.diff b/procps-3.2.3-make.diff new file mode 100644 index 0000000..1f9b671 --- /dev/null +++ b/procps-3.2.3-make.diff @@ -0,0 +1,52 @@ +Index: procps-3.2.3/Makefile +================================================================================ +--- procps-3.2.5/Makefile ++++ procps-3.2.5/Makefile +@@ -27,7 +27,7 @@ + ldconfig := ldconfig + ln_f := ln -f + ln_sf := ln -sf +-install := install -D --owner 0 --group 0 ++install := install -D + + # Lame x86-64 /lib64 and /usr/lib64 abomination: + lib64 := lib$(shell [ -d /lib64 ] && echo 64) +@@ -91,7 +91,8 @@ + -Wstrict-prototypes -Wmissing-prototypes + # Note that some stuff below is conditional on CFLAGS containing + # an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.) +-CFLAGS := -O2 -s ++RPM_OPT_FLAGS = -O2 -s ++CFLAGS = $(RPM_OPT_FLAGS) + ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS) + + PKG_LDFLAGS := -Wl,-warn-common +--- procps-3.2.5/proc/module.mk ++++ procps-3.2.5/proc/module.mk +@@ -17,7 +17,7 @@ + # numbers for future use, the ELF soname can be set equal to the + # file name until some future date when a stable ABI is declared. + +-SHARED := 1 ++SHARED := 0 + + # for lib$(NAME).so and /usr/include/($NAME) and such + NAME := proc +@@ -38,7 +38,7 @@ + + ############ + +-FPIC := -fpic ++FPIC := -fPIC + + ifeq ($(SHARED),1) + ALL += proc/$(SONAME) +@@ -50,7 +50,7 @@ + else + ALL += proc/$(ANAME) + #INSTALL += $(usr/lib)$(ANAME) +-LIBFLAGS := -DSHARED=0 ++LIBFLAGS := -DSHARED=0 $(FPIC) + LIBPROC := proc/$(ANAME) + endif + diff --git a/procps-3.2.5-CPU-states.patch b/procps-3.2.5-CPU-states.patch new file mode 100644 index 0000000..462b919 --- /dev/null +++ b/procps-3.2.5-CPU-states.patch @@ -0,0 +1,17 @@ +--- top.c ++++ top.c +@@ -930,6 +930,14 @@ + rewind(fp); + fflush(fp); + ++ /* save the previous values of cpus[Cpu_tot](i.e. u_sav, s_sav, n_sav, i_sav, ++ * w_sav, x_sav, y_sav) to cpus[cpu_max] before any changes to cpus[], so these ++ * values are not overwritten when copying cpus[cpu_max] back to cpus[Cpu_tot] ++ * at the end of this function. ++ */ ++ if (cpu_max != Cpu_tot) ++ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); ++ + // first value the last slot with the cpu summary line + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); + cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number diff --git a/procps-3.2.5-eof.diff b/procps-3.2.5-eof.diff new file mode 100644 index 0000000..a72882e --- /dev/null +++ b/procps-3.2.5-eof.diff @@ -0,0 +1,11 @@ +--- procps-3.2.5/top.c ++++ procps-3.2.5/top.c +@@ -3285,7 +3285,7 @@ + if (rc <= 0) { + // EOF is pretty much a "can't happen" except for a kernel bug. + // We should quickly die via SIGHUP, and thus not spin here. +- // if (rc == 0) end_pgm(0); /* EOF from terminal */ ++ if (rc == 0) end_pgm(0); /* EOF from terminal */ + fcntl(STDIN_FILENO, F_SETFL, file_flags); + select(1, &fs, NULL, NULL, &tv); + fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK|file_flags); diff --git a/procps-3.2.5-pmap-smaps-rml-2.patch b/procps-3.2.5-pmap-smaps-rml-2.patch new file mode 100644 index 0000000..8638849 --- /dev/null +++ b/procps-3.2.5-pmap-smaps-rml-2.patch @@ -0,0 +1,679 @@ + pmap.1 | 76 +++++--- + pmap.c | 559 +++++++++++++++++++++++++++++------------------------------------ + 2 files changed, 297 insertions(+), 338 deletions(-) + +diff -urN procps-3.2.5/pmap.1 procps/pmap.1 +--- procps-3.2.5/pmap.1 2005-10-11 14:49:20.000000000 -0400 ++++ procps/pmap.1 2005-10-12 10:39:28.000000000 -0400 +@@ -1,39 +1,57 @@ +-'\" t +-.\" (The preceding line is a note to broken versions of man to tell +-.\" them to pre-process this man page with tbl) +-.\" Man page for pmap. +-.\" Licensed under version 2 of the GNU General Public License. +-.\" Written by Albert Cahalan. ++.\" pmap.1 - manpage for the pmap(1) utility, part of procps + .\" +-.TH PMAP 1 "October 26, 2002" "Linux" "Linux User's Manual" ++.\" Copyright (C) 2005 Robert Love ++.\" Licensed under the terms of the GNU General Public License, v2 ++.TH PMAP 1 "12 Oct 2005" "Linux" "Linux User's Manual" + .SH NAME +-pmap \- report memory map of a process ++pmap \- display information about process memory mappings + + .SH SYNOPSIS +-.nf +-pmap [ -x | -d ] [ -q ] pids... +-pmap -V +-.fi ++.BI "pmap [ \-d | \-q | \-h | \-V ] " pid + + .SH DESCRIPTION +-The pmap command reports the memory map of a process or processes. +- +-.SH "GENERAL OPTIONS" +-.TS +-l l l. +--x extended Show the extended format. +--d device Show the device format. +--q quiet Do not display some header/footer lines. +--V show version Displays version of program. +-.TE ++.BR pmap (1) ++displays information about a process's memory mappings, such as its stack, ++data segment, mapped files, and so on. ++.P ++The ++.BR pmap (1) ++utility will show, for each mapping of a given process, the starting byte ++address in the process's address space, the size, the RSS (size of the mapping ++in physical memory), the amount of dirty pages, the permission, the device node, ++the offset, and the file backing the mapping, if any. ++.P ++As the last line of output, the ++.BR pmap (1) ++utility will tally up the total size of all mappings as well as show the ++total size of writable/private mappings and of shared mappings. ++ ++.SH OPTIONS ++.TP ++.B\-d, \-\^\-device ++Display major and minor device numbers. ++.TP ++.B\-q, \-\^\-quiet ++Hide header and memory statistics. ++.TP ++.B\-h, \-\^\-help ++Show pmap usage. ++.TP ++.B\-V, \-\^\-version ++Display version information. ++ ++.SH FILES ++.IR /proc/pid/maps " and ++.IR /proc/pid/smaps " \-\- memory mapping information" + + .SH "SEE ALSO" +-ps(1) pgrep(1) ++.BR ps (1), ++.BR top (1), ++.BR free (1), ++.BR vmstat (1) + +-.SH STANDARDS +-No standards apply, but pmap looks an awful lot like a SunOS command. ++.SH AUTHORS ++Written by Chris Rivera. + +-.SH AUTHOR +-Albert Cahalan wrote pmap in 2002, and is the current +-maintainer of the procps collection. Please send bug reports +-to . ++The procps package is maintained by Albert Calahan. Please send ++bug reports to . +diff -urN procps-3.2.5/pmap.c procps/pmap.c +--- procps-3.2.5/pmap.c 2005-10-11 14:49:21.000000000 -0400 ++++ procps/pmap.c 2005-10-12 10:52:09.000000000 -0400 +@@ -1,331 +1,272 @@ + /* +- * Copyright 2002 by Albert Cahalan; all rights reserved. +- * This file may be used subject to the terms and conditions of the +- * GNU Library General Public License Version 2, or any later version +- * at your option, as published by the Free Software Foundation. +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU Library General Public License for more details. ++ * pmap - print the address space map of a process ++ * ++ * Chris Rivera ++ * Robert Love ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License, v2, as ++ * published by the Free Software Foundation ++ * ++ * Copyright (C) 2003, 2005 Chris Rivera + */ + + #include + #include +-#include +-#include +-#include +-#include + #include +-#include +- +-#include +-#include ++#include ++#include + + #include "proc/readproc.h" + #include "proc/version.h" +-#include "proc/escape.h" +- +-static void usage(void) NORETURN; +-static void usage(void){ +- fprintf(stderr, +- "Usage: pmap [-x | -d] [-q] pid...\n" +- "-x show details\n" +- "-d show offset and device number\n" +- "-q quiet; less header/footer info\n" +- "-V show the version number\n" +- ); +- exit(1); +-} +- + +-static int V_option; +-static int r_option; // ignored -- for SunOS compatibility +-static int x_option; +-static int d_option; +-static int q_option; +- +- +-static unsigned shm_minor = ~0u; +- +-static void discover_shm_minor(void){ +- void *addr; +- int shmid; +- char mapbuf[256]; +- +- if(!freopen("/proc/self/maps", "r", stdin)) return; +- +- // create +- shmid = shmget(IPC_PRIVATE, 42, IPC_CREAT | 0666); +- if(shmid==-1) return; // failed; oh well +- // attach +- addr = shmat(shmid, NULL, SHM_RDONLY); +- if(addr==(void*)-1) goto out_destroy; +- +- while(fgets(mapbuf, sizeof mapbuf, stdin)){ +- char flags[32]; +- char *tmp; // to clean up unprintables +- unsigned KLONG start, end; +- unsigned long long file_offset, inode; +- unsigned dev_major, dev_minor; +- sscanf(mapbuf,"%"KLF"x-%"KLF"x %31s %Lx %x:%x %Lu", &start, &end, flags, &file_offset, &dev_major, &dev_minor, &inode); +- tmp = strchr(mapbuf,'\n'); +- if(tmp) *tmp='\0'; +- tmp = mapbuf; +- while(*tmp){ +- if(!isprint(*tmp)) *tmp='?'; +- tmp++; +- } +- if(start > (unsigned long)addr) continue; +- if(dev_major) continue; +- if(flags[3] != 's') continue; +- if(strstr(mapbuf,"/SYSV")){ +- shm_minor = dev_minor; +- break; +- } +- } ++#define BUFFERSIZE 4096 ++#define OBJECTSIZE 128 + +- if(shmdt(addr)) perror("shmdt"); ++struct smap { ++ unsigned long size; ++ unsigned long rss; ++ unsigned long shared_clean; ++ unsigned long shared_dirty; ++ unsigned long private_clean; ++ unsigned long private_dirty; ++}; ++ ++static unsigned long mapped; ++static unsigned long shared; ++static unsigned long private; ++static unsigned long rss; ++static unsigned long dirty; ++static FILE *smaps_fp; ++ ++static void usage(const char *cmd) ++{ ++ fprintf(stderr, "usage: %s [options] pid\n", cmd); ++ fprintf(stderr, " -d, --device " ++ "display offset and device numbers\n"); ++ fprintf(stderr, " -q, --quiet " ++ "hide header and memory statistics\n"); ++ fprintf(stderr, " -V, --version " ++ "display version information\n"); ++ fprintf(stderr, " -h, --help " ++ "display this help\n"); ++} + +-out_destroy: +- if(shmctl(shmid, IPC_RMID, NULL)) perror("IPC_RMID"); ++static int get_smap_data(struct smap *smap) ++{ ++ unsigned long long data; ++ int assigned; ++ char buff[BUFFERSIZE]; ++ ++ /* get main line */ ++ if (!fgets(buff, BUFFERSIZE - 1, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "%llx-", &data); ++ if (assigned != 1) ++ return 1; ++ ++ /* get size */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Size: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->size = data; ++ ++ /* get rss */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Rss: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->rss = data; ++ rss += data; ++ ++ /* get shared clean */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Shared_Clean: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->shared_clean = data; ++ ++ /* get shared dirty */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Shared_Dirty: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->shared_dirty = data; ++ dirty += data; ++ ++ /* get private clean */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Private_Clean: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->private_clean = data; ++ ++ /* get private dirty */ ++ if (!fgets(buff, BUFFERSIZE, smaps_fp)) ++ return 1; ++ ++ assigned = sscanf(buff, "Private_Dirty: %lld", &data); ++ if (assigned != 1) ++ return 1; ++ smap->private_dirty = data; ++ dirty += data; + +- return; ++ return 0; + } + ++static void parse_line(pid_t pid, const char *line, int show_devices) ++{ ++ unsigned long long low, high, size, offset; ++ unsigned long major, minor; ++ struct smap smap = { .rss = 0 }; ++ int assigned; ++ char read_perm, write_perm, exec_perm, access_type; ++ char obj_buff[OBJECTSIZE] = "[anon]"; ++ ++ assigned = sscanf(line, "%llx-%llx %c%c%c%c %llx %lx:%lx %*u %" ++ STRINGIFY(OBJECTSIZE) "s", &low, &high, &read_perm, ++ &write_perm, &exec_perm, &access_type, &offset, &major, ++ &minor, obj_buff); ++ ++ if (assigned < 9) { ++ fprintf(stderr, "failed to parse /proc/%d/maps\n", pid); ++ exit(EXIT_FAILURE); ++ } ++ ++ size = high - low; ++ size /= 1024; ++ mapped += size; ++ ++ if (smaps_fp && get_smap_data(&smap)) { ++ fprintf(stderr, "failed to parse /proc/%d/smaps\n", pid); ++ exit(1); ++ } ++ ++ if (access_type == 's') ++ shared += size; ++ else if (access_type == 'p' && write_perm == 'w') ++ private += size; ++ ++ printf("%08llx %6lluK ", low, size); ++ ++ if (smaps_fp) { ++ printf("%6luK ", smap.rss); ++ printf("%6luK ", smap.private_dirty + smap.shared_dirty); ++ } + +-static const char *mapping_name(proc_t *p, unsigned KLONG addr, unsigned KLONG len, const char *mapbuf, unsigned showpath, unsigned dev_major, unsigned dev_minor, unsigned long long inode){ +- const char *cp; +- +- if(!dev_major && dev_minor==shm_minor && strstr(mapbuf,"/SYSV")){ +- static char shmbuf[64]; +- snprintf(shmbuf, sizeof shmbuf, " [ shmid=0x%Lx ]", inode); +- return shmbuf; +- } +- +- cp = strrchr(mapbuf,'/'); +- if(cp){ +- if(showpath) return strchr(mapbuf,'/'); +- return cp[1] ? cp+1 : cp; +- } +- +- cp = strchr(mapbuf,'/'); +- if(cp){ +- if(showpath) return cp; +- return strrchr(cp,'/') + 1; // it WILL succeed +- } +- +- cp = " [ anon ]"; +- if( (p->start_stack >= addr) && (p->start_stack <= addr+len) ) cp = " [ stack ]"; +- return cp; +-} ++ printf("%c%c%c%c ", read_perm, write_perm, exec_perm, access_type); + +-static int one_proc(proc_t *p){ +- char buf[32]; +- char mapbuf[9600]; +- char cmdbuf[512]; +- unsigned long total_shared = 0ul; +- unsigned long total_private_readonly = 0ul; +- unsigned long total_private_writeable = 0ul; +- +- // Overkill, but who knows what is proper? The "w" prog +- // uses the tty width to determine this. +- int maxcmd = 0xfffff; +- +- sprintf(buf,"/proc/%u/maps",p->tgid); +- if(!freopen(buf, "r", stdin)) return 1; +- +- escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd, ESC_ARGS|ESC_BRACKETS); +- printf("%u: %s\n", p->tgid, cmdbuf); +- +- if(!q_option && (x_option|d_option)){ +- if(x_option){ +- if(sizeof(KLONG)==4) printf("Address Kbytes RSS Anon Locked Mode Mapping\n"); +- else printf("Address Kbytes RSS Anon Locked Mode Mapping\n"); +- } +- if(d_option){ +- if(sizeof(KLONG)==4) printf("Address Kbytes Mode Offset Device Mapping\n"); +- else printf("Address Kbytes Mode Offset Device Mapping\n"); +- } +- } +- +- while(fgets(mapbuf,sizeof mapbuf,stdin)){ +- char flags[32]; +- char *tmp; // to clean up unprintables +- unsigned KLONG start, end, diff; +- unsigned long long file_offset, inode; +- unsigned dev_major, dev_minor; +- sscanf(mapbuf,"%"KLF"x-%"KLF"x %31s %Lx %x:%x %Lu", &start, &end, flags, &file_offset, &dev_major, &dev_minor, &inode); +- tmp = strchr(mapbuf,'\n'); +- if(tmp) *tmp='\0'; +- tmp = mapbuf; +- while(*tmp){ +- if(!isprint(*tmp)) *tmp='?'; +- tmp++; +- } +- +- diff = end-start; +- if(flags[3]=='s') total_shared += diff; +- if(flags[3]=='p'){ +- flags[3] = '-'; +- if(flags[1]=='w') total_private_writeable += diff; +- else total_private_readonly += diff; +- } +- +- // format used by Solaris 9 and procps-3.2.0+ +- // an 'R' if swap not reserved (MAP_NORESERVE, SysV ISM shared mem, etc.) +- flags[4] = '-'; +- flags[5] = '\0'; +- +- if(x_option){ +- const char *cp = mapping_name(p, start, diff, mapbuf, 0, dev_major, dev_minor, inode); +- printf( +- (sizeof(KLONG)==8) +- ? "%016"KLF"x %7lu - - - %s %s\n" +- : "%08lx %7lu - - - %s %s\n", +- start, +- (unsigned long)(diff>>10), +- flags, +- cp +- ); +- } +- if(d_option){ +- const char *cp = mapping_name(p, start, diff, mapbuf, 0, dev_major, dev_minor, inode); +- printf( +- (sizeof(KLONG)==8) +- ? "%016"KLF"x %7lu %s %016Lx %03x:%05x %s\n" +- : "%08lx %7lu %s %016Lx %03x:%05x %s\n", +- start, +- (unsigned long)(diff>>10), +- flags, +- file_offset, +- dev_major, dev_minor, +- cp +- ); +- } +- if(!x_option && !d_option){ +- const char *cp = mapping_name(p, start, diff, mapbuf, 1, dev_major, dev_minor, inode); +- printf( +- (sizeof(KLONG)==8) +- ? "%016"KLF"x %6luK %s %s\n" +- : "%08lx %6luK %s %s\n", +- start, +- (unsigned long)(diff>>10), +- flags, +- cp +- ); +- } +- +- } +- +- if(!q_option){ +- if(x_option){ +- if(sizeof(KLONG)==8){ +- printf("---------------- ------ ------ ------ ------\n"); +- printf( +- "total kB %15ld - - -\n", +- (total_shared + total_private_writeable + total_private_readonly) >> 10 +- ); +- }else{ +- printf("-------- ------- ------- ------- -------\n"); +- printf( +- "total kB %7ld - - -\n", +- (total_shared + total_private_writeable + total_private_readonly) >> 10 +- ); +- } +- } +- if(d_option){ +- printf( +- "mapped: %ldK writeable/private: %ldK shared: %ldK\n", +- (total_shared + total_private_writeable + total_private_readonly) >> 10, +- total_private_writeable >> 10, +- total_shared >> 10 +- ); +- } +- if(!x_option && !d_option){ +- if(sizeof(KLONG)==8) printf(" total %16ldK\n", (total_shared + total_private_writeable + total_private_readonly) >> 10); +- else printf(" total %8ldK\n", (total_shared + total_private_writeable + total_private_readonly) >> 10); +- } +- } ++ if (show_devices) ++ printf("%08llx %02lx:%02lx ", offset, major, minor); + +- return 0; ++ printf("%s\n", obj_buff); + } + ++int main(int argc, char *argv[]) ++{ ++ proc_t proc; ++ FILE *fp; ++ char path[PATH_MAX]; ++ char buff[BUFFERSIZE]; ++ int o, show_devices = 0, quiet = 0; ++ pid_t pid; ++ ++ struct option longopts[] = { ++ { "help", 0, NULL, 'h' }, ++ { "version", 0, NULL, 'V' }, ++ { "quiet", 0, NULL, 'q' }, ++ { "device", 0, NULL, 'd' }, ++ { NULL, 0, NULL, 0 } ++ }; ++ ++ while ((o = getopt_long(argc, argv, "hqdV", longopts, NULL)) != -1) { ++ switch (o) { ++ case 'V': ++ display_version(); ++ return 0; ++ case 'q': ++ quiet = 1; ++ break; ++ case 'd': ++ show_devices = 1; ++ break; ++ case 'h': ++ usage(argv[0]); ++ return 0; ++ default: ++ usage(argv[0]); ++ return 1; ++ } ++ } ++ ++ if (argc - optind > 0) { ++ errno = 0; ++ pid = strtoul(argv[optind], NULL, 10); ++ if (errno) { ++ perror("strtoul"); ++ exit(EXIT_FAILURE); ++ } ++ } else { ++ usage(argv[0]); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (!get_proc_stats(pid, &proc)) { ++ fprintf(stderr, "error getting process information for pid " ++ "%d from /proc/%d\n", pid, pid); ++ exit(EXIT_FAILURE); ++ } ++ ++ printf("%d: %s\n", pid, proc.cmd); ++ ++ snprintf(path, PATH_MAX, "/proc/%d/maps", pid); ++ fp = fopen(path, "r"); ++ if (!fp) { ++ perror("fopen"); ++ exit(EXIT_FAILURE); ++ } ++ ++ snprintf(path, PATH_MAX, "/proc/%d/smaps", pid); ++ smaps_fp = fopen(path, "r"); ++ ++ if (!quiet) { ++ printf("START SIZE "); ++ ++ if (smaps_fp) { ++ printf(" RSS "); ++ printf(" DIRTY "); ++ } ++ ++ if (show_devices) ++ printf("PERM OFFSET DEVICE MAPPING\n"); ++ else ++ printf("PERM MAPPING\n"); ++ } ++ ++ while (fgets(buff, BUFFERSIZE - 1, fp)) ++ parse_line(pid, buff, show_devices); ++ ++ if (!quiet) { ++ if (smaps_fp) ++ printf("Total: %6luK %6luK %6luK\n\n", mapped, rss, dirty); ++ else ++ printf("mapped: %luK ", mapped); ++ ++ printf("%luK writable-private, %luK readonly-private, and %luK shared\n", ++ private, mapped - private - shared, shared); ++ } + +-int main(int argc, char *argv[]){ +- unsigned *pidlist; +- unsigned count = 0; +- PROCTAB* PT; +- proc_t p; +- int ret = 0; +- +- if(argc<2) usage(); +- pidlist = malloc(sizeof(unsigned)*argc); // a bit more than needed perhaps +- +- while(*++argv){ +- if(!strcmp("--version",*argv)){ +- V_option++; +- continue; +- } +- if(**argv=='-'){ +- char *walk = *argv; +- if(!walk[1]) usage(); +- while(*++walk){ +- switch(*walk){ +- case 'V': +- V_option++; +- break; +- case 'x': +- x_option++; +- break; +- case 'r': +- r_option++; +- break; +- case 'd': +- d_option++; +- break; +- case 'q': +- q_option++; +- break; +- default: +- usage(); +- } +- } +- }else{ +- char *walk = *argv; +- char *endp; +- unsigned long pid; +- if(!strncmp("/proc/",walk,6)){ +- walk += 6; +- // user allowed to do: pmap /proc/* +- if(*walk<'0' || *walk>'9') continue; +- } +- if(*walk<'0' || *walk>'9') usage(); +- pid = strtoul(walk, &endp, 0); +- if(pid<1ul || pid>0x7ffffffful || *endp) usage(); +- pidlist[count++] = pid; +- } +- } +- +- if( (x_option|V_option|r_option|d_option|q_option) >> 1 ) usage(); // dupes +- if(V_option){ +- if(count|x_option|r_option|d_option|q_option) usage(); +- fprintf(stdout, "pmap (%s)\n", procps_version); +- return 0; +- } +- if(count<1) usage(); // no processes +- if(d_option && x_option) usage(); +- +- discover_shm_minor(); +- +- pidlist[count] = 0; // old libproc interface is zero-terminated +- PT = openproc(PROC_FILLSTAT|PROC_FILLARG|PROC_PID, pidlist); +- while(readproc(PT, &p)){ +- ret |= one_proc(&p); +- if(p.cmdline) free((void*)*p.cmdline); +- count--; +- } +- closeproc(PT); +- +- if(count) ret |= 42; // didn't find all processes asked for +- return ret; ++ return 0; + } diff --git a/procps-3.2.5-top-rc.patch b/procps-3.2.5-top-rc.patch new file mode 100644 index 0000000..0202c1e --- /dev/null +++ b/procps-3.2.5-top-rc.patch @@ -0,0 +1,14 @@ +--- procps-3.2.5/top.c.rc 2005-06-28 22:36:24.000000000 +0200 ++++ procps-3.2.5/top.c 2005-06-28 22:40:27.000000000 +0200 +@@ -2393,7 +2393,10 @@ + int i; + + for (i = 0; i < GROUPSMAX; i++) { +- win_names(&Winstk[i], Winstk[i].rc.winname); ++ /* Please, never use something like sprintf(x, "%s", x); ... see win_names() */ ++ char buf[WINNAMSIZ]; ++ strncpy(buf, Winstk[i].rc.winname, WINNAMSIZ); ++ win_names(&Winstk[i], buf); + capsmk(&Winstk[i]); + } + // rely on this next guy to force a call (eventually) to reframewins diff --git a/procps-3.2.7-cpu_hotplug.patch b/procps-3.2.7-cpu_hotplug.patch new file mode 100644 index 0000000..5849e32 --- /dev/null +++ b/procps-3.2.7-cpu_hotplug.patch @@ -0,0 +1,95 @@ +--- procps-3.2.7/top.c ++++ procps-3.2.7/top.c 2006-06-26 16:46:39.000000000 +0200 +@@ -912,6 +912,7 @@ + static CPU_t *cpus_refresh (CPU_t *cpus) + { + static FILE *fp = NULL; ++ static int cpu_max; + int i; + int num; + // enough for a /proc/stat CPU line (not the intr line) +@@ -926,36 +927,34 @@ + can hold tics representing the /proc/stat cpu summary (the first + line read) -- that slot supports our View_CPUSUM toggle */ + cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t)); +- } ++ cpu_max = Cpu_tot; ++ } else if (cpu_max > Cpu_tot) ++ /* move saved CUPs summary to cpu_max possition */ ++ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); ++ + rewind(fp); + fflush(fp); + + // first value the last slot with the cpu summary line + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); +- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number + num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", +- &cpus[Cpu_tot].u, +- &cpus[Cpu_tot].n, +- &cpus[Cpu_tot].s, +- &cpus[Cpu_tot].i, +- &cpus[Cpu_tot].w, +- &cpus[Cpu_tot].x, +- &cpus[Cpu_tot].y, +- &cpus[Cpu_tot].z ++ &cpus[cpu_max].u, ++ &cpus[cpu_max].n, ++ &cpus[cpu_max].s, ++ &cpus[cpu_max].i, ++ &cpus[cpu_max].w, ++ &cpus[cpu_max].x, ++ &cpus[cpu_max].y, ++ &cpus[cpu_max].z + ); + if (num < 4) + std_err("failed /proc/stat read"); + +- // and just in case we're 2.2.xx compiled without SMP support... +- if (Cpu_tot == 1) { +- cpus[1].id = 0; +- memcpy(cpus, &cpus[1], sizeof(CPU_t)); +- } +- + // now value each separate cpu's tics +- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) { ++ for (i = 0; ; i++) { + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); + cpus[i].x = 0; // FIXME: can't tell by kernel version number + cpus[i].y = 0; // FIXME: can't tell by kernel version number +@@ -964,9 +963,28 @@ + &cpus[i].id, + &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z + ); +- if (num < 4) +- std_err("failed /proc/stat read"); ++ if (num < 4) { ++ Cpu_tot = i; ++ break; ++ } ++ if (i == cpu_max - 1) { ++ // Bump cpu_max and extend cpus ++ cpu_max++; ++ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t)); ++ if (!cpus) std_err("realloc failed"); ++ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t)); ++ } ++ } ++ ++ if (cpu_max > Cpu_tot) ++ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t)); ++ ++ // and just in case we're 2.2.xx compiled without SMP support... ++ if (Cpu_tot == 1) { ++ cpus[1].id = 0; ++ memcpy(cpus, &cpus[1], sizeof(CPU_t)); + } ++ + return cpus; + } + diff --git a/procps-3.2.7-manycpus.diff b/procps-3.2.7-manycpus.diff new file mode 100644 index 0000000..c84f5cd --- /dev/null +++ b/procps-3.2.7-manycpus.diff @@ -0,0 +1,27 @@ +--- procps-3.2.7/top.c ++++ procps-3.2.7/top.c 2006-06-26 16:26:56.000000000 +0200 +@@ -2480,21 +2480,21 @@ + static const char err_num_cpus[] = "\aSorry, terminal is not big enough"; + #ifdef WARN_NOT_SMP + // standardized 'smp' errors +- static const char err_smp[] = "\aSorry, only 1 cpu detected"; ++ static const char err_smp[] = "\aSorry, only one cpu detected"; + #endif + + switch (c) { + case '1': + if (Cpu_tot+7 > Screen_rows && !CHKw(Curwin, View_CPUSUM)) { + show_msg(err_num_cpus); +- break; +- } ++ } else { + #ifdef WARN_NOT_SMP + if (Cpu_tot > 1) TOGw(Curwin, View_CPUSUM); + else show_msg(err_smp); + #else + TOGw(Curwin, View_CPUSUM); + #endif ++ } + break; + + case 'a': diff --git a/procps-3.2.7-readeof.patch b/procps-3.2.7-readeof.patch new file mode 100644 index 0000000..d934a7f --- /dev/null +++ b/procps-3.2.7-readeof.patch @@ -0,0 +1,77 @@ +--- proc/readproc.c ++++ proc/readproc.c 2006-07-28 11:20:18.000000000 +0000 +@@ -412,7 +412,7 @@ static int file2str(const char *director + int fd, num_read; + + sprintf(filename, "%s/%s", directory, what); +- fd = open(filename, O_RDONLY, 0); ++ fd = open(filename, O_RDONLY, O_NOATIME); + if(unlikely(fd==-1)) return -1; + num_read = read(fd, ret, cap - 1); + close(fd); +@@ -423,37 +423,41 @@ static int file2str(const char *director + + static char** file2strvec(const char* directory, const char* what) { + char buf[2048]; /* read buf bytes at a time */ +- char *p, *rbuf = 0, *endbuf, **q, **ret; +- int fd, tot = 0, n, c, end_of_file = 0; ++ char *p, *rbuf = (char*)0, *endbuf, **q, **ret; ++ int fd, tot = 0, n, c; + int align; + + sprintf(buf, "%s/%s", directory, what); +- fd = open(buf, O_RDONLY, 0); ++ fd = open(buf, O_RDONLY, O_NOATIME); + if(fd==-1) return NULL; + + /* read whole file into a memory buffer, allocating as we go */ + while ((n = read(fd, buf, sizeof buf - 1)) > 0) { +- if (n < (int)(sizeof buf - 1)) +- end_of_file = 1; +- if (n == 0 && rbuf == 0) +- return NULL; /* process died between our open and read */ + if (n < 0) { ++ if (errno == EINTR) ++ continue; + if (rbuf) + free(rbuf); +- return NULL; /* read error */ ++ return NULL; /* read error! */ ++ } ++ if (n == 0) { ++ if(rbuf == (char*)0) ++ return NULL; /* process died between our open and read */ ++ break; /* we're done */ ++ } ++ if (n < (int)(sizeof(buf) - 1)) { ++ if (buf[n-1]) /* last read char not null */ ++ buf[n++] = '\0'; /* so append null-terminator */ + } +- if (end_of_file && buf[n-1]) /* last read char not null */ +- buf[n++] = '\0'; /* so append null-terminator */ + rbuf = xrealloc(rbuf, tot + n); /* allocate more memory */ + memcpy(rbuf + tot, buf, n); /* copy buffer into it */ + tot += n; /* increment total byte ctr */ +- if (end_of_file) +- break; + } + close(fd); +- if (n <= 0 && !end_of_file) { +- if (rbuf) free(rbuf); +- return NULL; /* read error */ ++ if (tot == 0) { ++ if (rbuf) ++ free(rbuf); ++ return NULL; /* read error? */ + } + endbuf = rbuf + tot; /* count space for pointers */ + align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1)); +@@ -482,7 +486,7 @@ int read_cmdline(char *restrict const ds + unsigned n = 0; + dst[0] = '\0'; + snprintf(name, sizeof name, "/proc/%u/cmdline", pid); +- fd = open(name, O_RDONLY); ++ fd = open(name, O_RDONLY, O_NOATIME); + if(fd==-1) return 0; + for(;;){ + ssize_t r = read(fd,dst+n,sz-n); diff --git a/procps-3.2.7-top.1.diff b/procps-3.2.7-top.1.diff new file mode 100644 index 0000000..af2915a --- /dev/null +++ b/procps-3.2.7-top.1.diff @@ -0,0 +1,11 @@ +--- procps-3.2.7/top.1 ++++ procps-3.2.7/top.1 2006-06-26 16:34:01.000000000 +0200 +@@ -20,7 +20,7 @@ + .. + .\" Setup //////////////////////////////////////////////////////////////// + \# ** Comment out '.nr' or set to 0 to eliminate WIDTH fiddlin' ! +-.nr half_xtra 4 ++.nr half_xtra 0 + . + .ll +(\n[half_xtra] + \n[half_xtra]) + . diff --git a/procps-3.2.7.tar.bz2 b/procps-3.2.7.tar.bz2 new file mode 100644 index 0000000..6cd0d86 --- /dev/null +++ b/procps-3.2.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5aae203ea63433a37eb91ec84d08519c5979a881e2d18a94ffcb7e84ff277357 +size 229702 diff --git a/procps.changes b/procps.changes new file mode 100644 index 0000000..0d88429 --- /dev/null +++ b/procps.changes @@ -0,0 +1,815 @@ +------------------------------------------------------------------- +Fri Jul 28 13:31:56 CEST 2006 - werner@suse.de + +- Don't stop reading if the read buffer boundary is reached [#194598] + +------------------------------------------------------------------- +Fri Jul 28 13:21:45 CEST 2006 - olh@suse.de + +- remove unneeded boot.ldconfig from boot.sysctl + boot.sysctl should depend on boot.localfs (#181972) + +------------------------------------------------------------------- +Mon Jun 26 17:07:41 CEST 2006 - werner@suse.de + +- Update to version 3.2.7 + +------------------------------------------------------------------- +Thu May 18 18:37:56 CEST 2006 - werner@suse.de + +- Add stealtime patch (bug #86394) + +------------------------------------------------------------------- +Mon Mar 20 16:40:36 CET 2006 - hvogel@suse.de + +- fix %CPU column format [#159480] + +------------------------------------------------------------------- +Thu Mar 16 17:39:47 CET 2006 - hvogel@suse.de + +- make CPU states consistent [#158572] + +------------------------------------------------------------------- +Wed Mar 15 12:15:48 CET 2006 - hvogel@suse.de + +- fix last patch to not lead to constant CPU usage [#156395] + +------------------------------------------------------------------- +Mon Feb 20 11:59:10 CET 2006 - hvogel@suse.de + +- dont crash if a CPU is hotplugged [#151285] + +------------------------------------------------------------------- +Wed Feb 8 17:04:55 CET 2006 - hvogel@suse.de + +- fix ~/.toprc handling [#140319] + +------------------------------------------------------------------- +Fri Jan 27 02:20:47 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Jan 24 17:14:57 CET 2006 - mmj@suse.de + +- Add support for terabytes of memory [#145014] + +------------------------------------------------------------------- +Wed Jan 4 10:43:06 CET 2006 - mmj@suse.de + +- Document 'H' - Threads in top.1 (thanks Tony Ernst) + +------------------------------------------------------------------- +Mon Oct 31 10:07:43 CET 2005 - mmj@suse.de + +- Update to 3.2.6: + o vmstat: /proc/stat buffer big enough for 1024 CPUs + o dietlibc needs termios.h for struct winsize + o top: can do per-task display + o more MIPS crud + o begin prep for setuid + o top: fix %CPU max on 2..9 CPU SMP + o ps: fix crash related to realloc + o ps: man page more detailed + o spelling fixes + o top: crash on resize fixed + o vmstat: -p handles /dev/ and does not overflow + +------------------------------------------------------------------- +Thu Oct 13 10:52:43 CEST 2005 - mmj@suse.de + +- Updated patch from rml + +------------------------------------------------------------------- +Wed Oct 12 01:44:50 CEST 2005 - mmj@suse.de + +- Add patch from Chris Rivera for "smaps" that provides per-mapping + RSS information. + +------------------------------------------------------------------- +Mon Apr 18 19:09:43 CEST 2005 - mmj@suse.de + +- Fix potential bufferoverflow in pwdx [#78074] + +------------------------------------------------------------------- +Tue Feb 8 10:23:05 CET 2005 - mmj@suse.de + +- Update to 3.2.5: + * display problem on 64-bit systems fixed + * top: variable-width PID and PPID + * top: variable-width %CPU + * sysctl: better error messages + * ps: security labels can contain any printable ASCII + * top: help and version message on stdout, with exit(0) + * ps: SIGTSTP and SIGTTOU shouldn't print bug email address + * slabtop: compile with glibc 2.2.17 (and older, likely) + * slabtop: fix overflow on huge NUMA boxes + * slabtop: accept any slabinfo 2.x format + * ps: alignment after WCHAN fixed + * pmap: when no -x or -d option, show full path + +------------------------------------------------------------------- +Tue Jan 11 12:47:11 CET 2005 - mmj@suse.de + +- Make our CFLAGS and RPM_OPT_FLAGS actually get used [#49378] + +------------------------------------------------------------------- +Tue Dec 7 19:36:33 CET 2004 - mmj@suse.de + +- Update to procps-3.2.4: + * support 64-bit MIPS with n32 binary + * sparc32 optimized for sparc32 again + * pwdx: new command + * ps: UTF-8 username + command + * ps: more room for some columns + * ps: tolerate SubDomain security module CONTEXT/LABEL data + * watch: passes COLUMNS and LINES in environment + * top: in batch mode, tolerate unknown $TERM + * pkill: quiet about processes that die before kill() + +------------------------------------------------------------------- +Wed Oct 27 10:29:29 CEST 2004 - mmj@suse.de + +- Increase buffer size for reading proc files. [#44776] + +------------------------------------------------------------------- +Thu Sep 23 17:21:49 CEST 2004 - lmuelle@suse.de + +- Ensure to activate boot.sysctl if we do a first installation, [#44481]. + +------------------------------------------------------------------- +Wed Sep 15 13:36:30 CEST 2004 - lmuelle@suse.de + +- Add default sysctl.conf file. + +------------------------------------------------------------------- +Mon Aug 16 10:38:12 CEST 2004 - garloff@suse.de + +- Update to procps-3.2.3: + * avoid truncating long usernames + * avoid warning about -lncurses when not linking (more) + * new names for shared libraries (packagers: watch out!) + * build fixes and manpages updates + * wchan now '*' for multi-threaded processes + * ps: STAT shows l for multi-threaded processes + * vmstat: some overflow problems fixed -- thanks Holger Kiehl +- Use ps manpage from from the package. + +------------------------------------------------------------------- +Tue Aug 3 22:45:52 CEST 2004 - garloff@suse.de + +- Update to procps-3.2.2: + * build tweaks and docu updates + * ps: k option and personality-specific -x support + * sysctl: -a and -N options, better error handling + * top: tolerate sparse CPU numbering, cope with terminals + lacking ram & sram, avoid xterm clear-to-eol at eol + * vmstat: fix -d + * watch: sub-second intervals +- Rediff patches. + +------------------------------------------------------------------- +Wed Jun 2 14:05:27 CEST 2004 - uli@suse.de + +- fixed crash in small terminal (bug #37651) + +------------------------------------------------------------------- +Tue Mar 30 13:19:14 CEST 2004 - stepan@suse.de + +- Fix ps.1 [#35584] +- update to 3.2.1 to get rid of incompatible SE Linux patches. + 3.2.1 is a bugfix release: + * ps: STAT flags for fg process group and session leader + * ps: STAT flags for swapped out process dropped (was broken) + * ps: new -M and Z options for security data (SE Linux, etc.) + * slabtop: detect broken /proc/slabinfo -- thanks to Fabian + Frederick + * slabtop: ensure that error messages show up on the screen -- + FF again + +------------------------------------------------------------------- +Mon Mar 29 17:40:23 CEST 2004 - mmj@suse.de + +- Fix top.1 man page and include pmap.1 [#35584] + +------------------------------------------------------------------- +Sun Mar 21 10:12:44 CET 2004 - adrian@suse.de + +- show the result of w also with line wrapps, like in good old times. + (ok'ed by stepan) + +------------------------------------------------------------------- +Wed Mar 3 17:00:29 CET 2004 - stepan@suse.de + +- add notruncate option to w (for powermanagement code) + +------------------------------------------------------------------- +Mon Mar 1 15:37:23 CET 2004 - stepan@suse.de + +- fix handling of many CPUs in top (#34347) + +------------------------------------------------------------------- +Tue Feb 24 11:56:33 CET 2004 - stepan@suse.de + +- update to procps 3.2.0 + * build on IA-64 again + * pmap: output like Solaris 9, not Solaris 7 + * ps: also handle SELinux on the 2.4.xx kernels + * top: during a ^Z, the terminal was messed up + * future-proof the tty handling + * add slabtop + * pmap: detect the primary stack + * pmap: -d format + * free: report high and low memory + +------------------------------------------------------------------- +Fri Feb 20 16:19:00 CET 2004 - ro@suse.de + +- boot.sysctl: do nothing for stop case + +------------------------------------------------------------------- +Sun Feb 15 14:35:29 CET 2004 - kukuk@suse.de + +- Disable some tests not working on all architectures + +------------------------------------------------------------------- +Sat Feb 14 17:07:56 CET 2004 - kukuk@suse.de + +- Rename package to procps +- Move procinfo and psmisc into seperate packages +- Update to 3.1.15 (includes SELinux support) + +------------------------------------------------------------------- +Fri Jan 23 19:19:20 CET 2004 - bk@suse.de + +- pstree: UTF-8: never draw >1 '+' at end of line(no change for ASCII) +- pstree: Fix -G which uses VT100 line drawing: use the full width + +------------------------------------------------------------------- +Mon Nov 17 11:37:15 CET 2003 - stepan@suse.de + +- fix package to build as user. Thanks to olh. + +------------------------------------------------------------------- +Thu Oct 23 14:39:16 CEST 2003 - stepan@suse.de + +- update to procps 3.1.14 + * ps fully supports thread display (H, -L, m, -m, and -T) + * top can show CPU usage for IO-wait, IRQ, and softirq + * can set $PS_FORMAT to choose your own default ps format + * better width control ("ps -o pid,wchan:42,args") + * width of ps PID column adjusts to your system + * vmstat lets you choose units you like: 1000, 1024, 1000000... + * top can sort by any column (old sort keys available too) + * top can select a single user to display + * top can be put in multi-window mode and/or color mode + * vmstat has the -s option, as found on UNIX and BSD systems + * vmstat has the -f option, as found on UNIX and BSD systems + * watch doesn't eat the first blank line by mistake + * vmstat uses a fast O(1) algorithm on 2.5.xx kernels + * pmap command is SunOS-compatible + * vmstat shows IO-wait time + * pgrep and pkill can find the oldest matching process + * sysctl handles the Linux 2.5.xx VLAN interfaces + * ps has a new "-F" format (very nice, like DYNIX/ptx has) + * ps with proper BSD process selection + * better handling of very long uptimes + +------------------------------------------------------------------- +Tue Oct 14 16:14:31 CEST 2003 - stepan@suse.de + +- fix 32bit build on AMD64 + +------------------------------------------------------------------- +Wed Oct 1 12:23:58 CEST 2003 - stepan@suse.de + +- update to procps 3.1.13 + +------------------------------------------------------------------- +Sat Sep 20 15:18:56 CEST 2003 - schwab@suse.de + +- Handle EOF from terminal [#31126]. + +------------------------------------------------------------------- +Mon Sep 15 11:30:19 CEST 2003 - stepan@suse.de + +- fix "#C" display problem with more than 99 CPUs. (#28163) + +------------------------------------------------------------------- +Fri Sep 5 19:06:37 CEST 2003 - stepan@suse.de + +- top: fix 4G overflow on 64bit platforms (bug #28539) + (procps-3.1.11-bigproc.diff) + +------------------------------------------------------------------- +Fri Aug 8 22:10:18 CEST 2003 - stepan@suse.de + +- update procps to version 3.1.11: + * compile with gcc 2.95 again (C99 issue) +- fix sysctl insertion (bug #28593) + +------------------------------------------------------------------- +Mon Jul 14 10:15:14 CEST 2003 - stepan@suse.de + +- update procps to version 3.1.10 + * handle GPLONLY_ symbols + * kill: better man page + * skill: better man page + * ps: PID-like columns change width as needed + * top: COMMAND instead of Command + * vmstat: -m displays slabinfo + * vmstat: -d displays disk stats +- update psmisc to 21.3 (has our patch included) + * SELinux SID selection uses -d instead of -S to stop the + confusion of signal names. + * Doesnt segfault on long cmdnames, thanks Ben Low + * More fixes for types, also some GCC 3.2 fixes + * Changed a long to a long long in pstree. + +------------------------------------------------------------------- +Fri Jul 4 13:50:34 CEST 2003 - stepan@suse.de + +- update to version 3.1.9 + * memory sizes fixed for 64-bit w/ gcc 3.x + * ps: detect broken OS install w/o /proc mounted + * top: fix suspend/resume behavior + * top: ditch warning until a _good_ interface is found + * kill: more info in the man page + * ps: document the -o, o, -O, and O options + * vmstat: choose units you like: 1000, 1024, 1000000... + +------------------------------------------------------------------- +Fri Jun 13 08:37:07 CEST 2003 - coolo@suse.de + +- fixing cwd + +------------------------------------------------------------------- +Thu Jun 12 13:24:50 CEST 2003 - coolo@suse.de + +- use %find_lang + +------------------------------------------------------------------- +Tue Jun 3 10:48:56 CEST 2003 - coolo@suse.de + +- use BuildRoot +- use %_mandir + +------------------------------------------------------------------- +Wed May 14 16:03:13 CEST 2003 - stepan@suse.de + +- drop XConsole and xcpustate as there are the almost identical + tools xconsole and xosview. This drops X11 dependencies of this + package completely. +- fix default permissions of locale directories (bug #26120) + +------------------------------------------------------------------- +Thu Mar 27 16:28:26 CET 2003 - stepan@suse.de + +- fix truncating bug in pstree when specifying -al +- merge psmisc diffs + +------------------------------------------------------------------- +Fri Mar 21 14:01:41 CET 2003 - stepan@suse.de + +- update procps to 3.1.8 +- update xcpustate to 2.6beta +- fix build on itanium + +------------------------------------------------------------------- +Wed Mar 5 17:25:45 CET 2003 - stepan@suse.de + +- add xinetd config file for systat service + +------------------------------------------------------------------- +Tue Mar 4 18:52:40 CET 2003 - stepan@suse.de + +- update procps to 3.1.6 + * includes discontig mem fixes + * includes fix for missing processes (bug #23526) + +------------------------------------------------------------------- +Mon Feb 24 17:16:26 CET 2003 - stepan@suse.de + +- new, working discontig patch + +------------------------------------------------------------------- +Wed Feb 19 13:54:58 CET 2003 - stepan@suse.de + +- fix broken ps with discontig kernel (bug #23788) + +------------------------------------------------------------------- +Mon Feb 3 15:41:43 CET 2003 - schwab@suse.de + +- Don't package uptime, now part of coreutils. + +------------------------------------------------------------------- +Wed Nov 27 15:07:40 CET 2002 - stepan@suse.de + +- fix newlines in string again, to satisfy compiler (killall) + +------------------------------------------------------------------- +Fri Nov 22 16:09:01 CET 2002 - stepan@suse.de + +- make x utility build triggerable by %{build_with_x} + +------------------------------------------------------------------- +Thu Nov 14 14:55:13 CET 2002 - werner@suse.de + +- Stupid compiler does not accept newlines in strings. + +------------------------------------------------------------------- +Tue Oct 15 15:41:18 CEST 2002 - werner@suse.de + +- Fix bug #20604: new procps version 2.0.10 +- port all required patches to 2.0.10 +- Update psmisc to 21.2 +- port all required patches to 21.2 + +------------------------------------------------------------------- +Tue Sep 10 23:22:10 CEST 2002 - adrian@suse.de + +- fix split alias + -Obsoletes: ps:/usr/X11R6/bin/xcpustate + +Provides: ps:/usr/X11R6/bin/xcpustate + +------------------------------------------------------------------- +Thu Aug 22 10:05:16 CEST 2002 - kukuk@suse.de + +- fix PreRequires. + +------------------------------------------------------------------- +Fri Aug 16 13:54:35 CEST 2002 - werner@suse.de + +- Add PreReq (bug #17963) + +------------------------------------------------------------------- +Thu Aug 15 23:24:08 CEST 2002 - ro@suse.de + +- modify required-start in boot.sysctl: boot.setup is gone + +------------------------------------------------------------------- +Tue Aug 6 13:49:58 CEST 2002 - werner@suse.de + +- Statistics of cpu usage: no negative averages (bug #17449) + +------------------------------------------------------------------- +Mon Aug 5 09:38:42 CEST 2002 - kukuk@suse.de + +- boot.sysclt: rename serial to setserial, setserial and + boot.isapnp are "should-start". + +------------------------------------------------------------------- +Wed Mar 20 14:57:38 CET 2002 - ro@suse.de + +- boot.sysctl: don't write out sysctl.conf if it doesn't exist + sysctl can't read the file of a complete dump + +------------------------------------------------------------------- +Fri Feb 22 17:03:16 CET 2002 - werner@suse.de + +- Fix bug #12816: generate signal list with signal cpp macros + to get it correct on all architectures. Make SIG prefix + work of signal names. + +------------------------------------------------------------------- +Fri Feb 1 12:50:25 CET 2002 - ro@suse.de + +- added stop/status for sysctl boot script + +------------------------------------------------------------------- +Mon Jan 21 17:47:45 CET 2002 - ro@suse.de + +- added boot-script for sysctl (inactive by default) + +------------------------------------------------------------------- +Mon Jan 7 17:11:39 CET 2002 - ro@suse.de + +- fixed segfault (thanks to andreas) + +------------------------------------------------------------------- +Thu Dec 20 16:41:52 CET 2001 - werner@suse.de + +- Make it compile + +------------------------------------------------------------------- +Thu Dec 20 15:28:58 CET 2001 - werner@suse.de + +- Sometimes it happens that /proc can not be open, then we have + to exit gratefully :^) + +------------------------------------------------------------------- +Fri Nov 9 16:34:53 CET 2001 - schwab@suse.de + +- Fix idle time overflow in vmstat. +- Fix missing declarations. + +------------------------------------------------------------------- +Mon Sep 17 16:28:26 CEST 2001 - werner@suse.de + +- Fix lsdev from procinfo +- Use the correct type for uptime integers (procinfo) + +------------------------------------------------------------------- +Tue Sep 4 18:33:49 CEST 2001 - werner@suse.de + +- Move fuser from /usr/bin/ to /bin/ + +------------------------------------------------------------------- +Tue Sep 4 17:38:38 CEST 2001 - werner@suse.de + +- Fix bug #9797: update to psmisc-20.1 +- Update procinfo to procinfo-18 +- Add bigbuff, retcode, sysctl-error, and biguid patch frm RH + (last one should fix bug #9933) + +------------------------------------------------------------------- +Tue Apr 24 19:19:07 CEST 2001 - werner@suse.de + +- Package split (#7078) + +------------------------------------------------------------------- +Fri Apr 20 18:37:14 CEST 2001 - werner@suse.de + +- tty in proc's stat is an int + +------------------------------------------------------------------- +Thu Mar 29 18:47:33 CEST 2001 - ro@suse.de + +- initialize page_size before first use + +------------------------------------------------------------------- +Wed Mar 28 11:40:36 CEST 2001 - schwab@suse.de + +- Kill improper use of PAGE_SIZE. + +------------------------------------------------------------------- +Tue Mar 27 20:53:17 CEST 2001 - werner@suse.de + +- Make it work again +- Make w know about locale + +------------------------------------------------------------------- +Tue Mar 13 11:14:37 CET 2001 - schwab@suse.de + +- Use getpagesize instead of PAGE_SHIFT. +- Don't compile with -fwritable-strings. + +------------------------------------------------------------------- +Mon Mar 12 19:17:11 CET 2001 - werner@suse.de + +- Skip oldps + +------------------------------------------------------------------- +Fri Mar 9 15:49:40 CET 2001 - werner@suse.de + +- Make it run on a IA64 + +------------------------------------------------------------------- +Mon Feb 19 11:51:53 CET 2001 - werner@suse.de + +- Make program watch recognize locale environment (bug#6395) + +------------------------------------------------------------------- +Thu Jan 25 16:08:13 CET 2001 - werner@suse.de + +- Make `fuser -s -k' work (bug#6143) + +------------------------------------------------------------------- +Mon Jan 22 17:13:52 CET 2001 - werner@suse.de + +- Avoid segfaults on mmap'ed buffer by adding '\0' + +------------------------------------------------------------------- +Wed Jan 10 13:12:59 CET 2001 - werner@suse.de + +- Fix format handling (bug#5386) + +------------------------------------------------------------------- +Wed Dec 20 17:33:39 CET 2000 - werner@suse.de + +- Reset locale during sscanf calls to POSIX + +------------------------------------------------------------------- +Tue Dec 19 20:05:24 MET 2000 - werner@suse.de + +- Use %llu for input (sscanf) and output (printf) format of + unsigned long long (free.c, top.c, and sysinfo.c). + +------------------------------------------------------------------- +Wed Dec 13 15:58:47 CET 2000 - werner@suse.de + +- Update to procps 2.0.7: now SMP should be visible in top +- Remove sessreg from file list +- Add pgrep and pkill to file list + +------------------------------------------------------------------- +Mon Dec 4 09:11:51 CET 2000 - ro@suse.de + +- don't try to strip man-pages + +------------------------------------------------------------------- +Wed Nov 22 18:50:56 CET 2000 - uli@suse.de + +- fixed to build on PPC + +------------------------------------------------------------------- +Fri Nov 17 09:44:00 CET 2000 - ro@suse.de + +- compile-fix for old sessreg (glibc/X11 clash atexit) + +------------------------------------------------------------------- +Sat May 27 11:56:10 CEST 2000 - kukuk@suse.de + +- Add Group tag +- Use docdir macro + +------------------------------------------------------------------- +Mon May 8 15:16:39 CEST 2000 - ro@suse.de + +- procinfo fixed for smp/alpha + +------------------------------------------------------------------- +Mon Feb 28 18:44:11 CET 2000 - werner@suse.de + +- Install some docus (closes bug #1509) + +------------------------------------------------------------------- +Fri Feb 25 10:57:01 CET 2000 - kukuk@suse.de + +- Fix problem that glibc and ncurses uses the same define for + different things. + +------------------------------------------------------------------- +Thu Feb 24 17:24:30 CET 2000 - schwab@suse.de + +- procps: fix scanf format string + +------------------------------------------------------------------- +Fri Feb 4 14:53:50 CET 2000 - kasal@suse.cz + +- remove smp_num_cpus -- it's done in 2.0.6 + +------------------------------------------------------------------- +Wed Jan 19 15:06:13 MET 2000 - ro@suse.de + +- usr/man -> usr/share/man + +------------------------------------------------------------------- +Wed Jan 19 12:52:12 CET 2000 - kasal@suse.de + +- fixed "ps u" -- ie. fixed read_total_main() + +------------------------------------------------------------------- +Mon Dec 6 16:01:23 CET 1999 - werner@suse.de + +- Argh: fix Makefile to install sysctl.conf.5 man page + +------------------------------------------------------------------- +Mon Dec 6 15:02:02 CET 1999 - werner@suse.de + +- Install sysctl tool of procps 2.0.6 + +------------------------------------------------------------------- +Fri Dec 3 18:52:38 CET 1999 - kasal@suse.de + +- upgraded procps to 2.0.6, to get the package compiled on sparc + +------------------------------------------------------------------- +Wed Nov 24 17:09:50 CET 1999 - kettner@suse.de + +- fixed bug in procinfo on AXP + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Tue Sep 7 16:20:07 CEST 1999 - werner@suse.de + +- Avoid SEGV if /proc isn't mounted (e.g. in single user mode) + +------------------------------------------------------------------- +Tue Sep 7 00:28:33 CEST 1999 - werner@suse.de + +- Fix some maunal page (missed tbl mark, some nasty .TH's) + +------------------------------------------------------------------- +Wed Aug 18 14:09:14 CEST 1999 - werner@suse.de + +- Update procinfo (ver 17), procps (ver 2.0.2) but hold + ver 1.2.11 (sessreg, XConsole, libproc for xcpustate), + update psmisc (ver 18) +- Patch procps 2.0.2 with debian diff and make ps + usable again (select bits should be 0x0a0a to see + all ttys if ps is called). + +------------------------------------------------------------------- +Wed Apr 14 11:26:45 MEST 1999 - bk@suse.de + +- updated procinfo patckage from version 15 to 16 + * annoying interrupt warning("recompile me!") is gone + * display on SMP has been fixed + +------------------------------------------------------------------- +Tue Apr 6 17:45:53 MEST 1999 - bk@suse.de + +- update to procps-1.2.11 +- fixed segfault in /usr/bin/w + +------------------------------------------------------------------- +Mon Mar 22 17:35:00 MET 1999 - florian@suse.de + +- update to procps-1.2.10 + +------------------------------------------------------------------- +Fri Oct 30 16:03:32 MET 1998 - ro@suse.de + +- update to procinfo-15 and procps-1.2.9 +- extra source for xcpustate-2.5 (no more in procps) +- patched xcpustate to display mem,swap,net for linux + +------------------------------------------------------------------- +Thu May 7 09:52:22 MEST 1998 - florian@suse.de + +- add "-g" option to killall to kill a complete process group +- update to procps 1.2.7 +- update to procinfo 13 + +------------------------------------------------------------------- +Fri Mar 13 11:44:00 MET 1998 - bs@suse.de + +- switched version to `date` (problem with version for update). + +------------------------------------------------------------------- +Mon Mar 2 16:26:13 MET 1998 - florian@suse.de + +- update to psmisc 17 +- update to procps 1.2.6 +- update to procinfo 12 + +------------------------------------------------------------------- +Fri Oct 17 12:57:28 MEST 1997 - ro@suse.de + +- ready for autobuild + +---------------------------------------------------------------------------- +Sat Jul 5 10:08:27 MEST 1997 - florian@suse.de + + +- updated to 1.12.2 again (with fixes) + +- fix output of free + +- top with wrong options won't destroy the display + +- XConsole is not suid-root anymore as "xconsole" can be used without + being suid root + + +---------------------------------------------------------------------------- +Mon Jun 30 20:41:43 MEST 1997 - bs@suse.de + +- switched back to version 1.11.6 + +---------------------------------------------------------------------------- +Sun Jun 22 18:57:49 MEST 1997 - florian@suse.de + + +- update to version 1.12.2 + +- add procinfo 0.11 + + +---------------------------------------------------------------------------- +Tue May 20 14:10:37 MEST 1997 - florian@suse.de + + +- update to version 1.11.6 + + +---------------------------------------------------------------------------- +Sun Apr 13 23:04:29 MEST 1997 - florian@suse.de + + +- update to new version 1.11.3 + +- update to psmisc 12a + + +---------------------------------------------------------------------------- +Wed Jan 22 22:24:11 CET 1997 - florian@suse.de + + +- update to version 1.11.1 + + +---------------------------------------------------------------------- +Sun Aug 25 19:28:50 MET DST 1996 - florian@suse.de + + + +new version 1.01 +'top' is completely new +people might get a much faster 'ps', if they delete '/etc/psdevtab' +and call 'ps' as root... diff --git a/procps.spec b/procps.spec new file mode 100644 index 0000000..fe8c40b --- /dev/null +++ b/procps.spec @@ -0,0 +1,574 @@ +# +# spec file for package procps (Version 3.2.7) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: procps +URL: http://procps.sf.net +License: GPL, LGPL +Group: System/Monitoring +PreReq: %fillup_prereq %insserv_prereq +Autoreqprov: on +Version: 3.2.7 +Release: 3 +Summary: ps utilities for /proc +Provides: ps +Obsoletes: ps +Source: http://procps.sourceforge.net/procps-%version.tar.bz2 +Source1: boot.sysctl +Source2: systat.xinetd +Source3: sysctl.conf +Patch: procps-3.2.3-make.diff +Patch1: procps-3.2.2-100cpus.diff +Patch2: procps-3.2.5-eof.diff +Patch3: procps-3.2.2-ia64.diff +Patch6: procps-3.2.7-manycpus.diff +Patch7: procps-3.2.2-w-notruncate.diff +Patch8: procps-3.2.2-w-simply-work.diff +Patch9: procps-3.2.7-top.1.diff +Patch10: procps-3.2.2-top-termsize.patch +Patch11: procps-3.2.3-buffersize.diff +Patch12: pwdx-bufferoverflow.diff +Patch13: procps-3.2.5-pmap-smaps-rml-2.patch +Patch15: procps-3.2.5-top-rc.patch +Patch16: procps-3.2.7-cpu_hotplug.patch +Patch17: procps-3.2.5-CPU-states.patch +Patch18: procps-3.2.7-readeof.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The procps package contains a set of system utilities that provide +system information. Procps includes ps, free, skill, snice, tload, top, +uptime, vmstat, w, and watch. The ps command displays a snapshot of +running processes. The top command provides a repetitive update of the +statuses of running processes. The free command displays the amounts of +free and used memory on your system. The skill command sends a +terminate command (or another specified signal) to a specified set of +processes. The snice command is used to change the scheduling priority +of specified processes. The tload command prints a graph of the current +system load average to a specified tty. The uptime command displays the +current time, how long the system has been running, how many users are +logged on, and system load averages for the past one, five, and fifteen +minutes. The w command displays a list of the users who are currently +logged on and what they are running. The watch program watches a +running program. The vmstat command displays virtual memory statistics +about processes, memory, paging, block I/O, traps, and CPU activity. + + + +Authors: +-------- + Albert Cahalan + (and many more) + +%prep +%setup -q +%patch -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 +%patch18 + +%build +make CFLAGS="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -pipe" \ + CC="gcc" + +%install +make DESTDIR=$RPM_BUILD_ROOT install +install -d $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/xinetd.d +install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d +install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/xinetd.d/systat +install -m 644 %SOURCE3 $RPM_BUILD_ROOT/etc +# clean unwanted files (coreutils) +rm -f $RPM_BUILD_ROOT/bin/kill +rm -f $RPM_BUILD_ROOT/usr/bin/uptime +rm -f $RPM_BUILD_ROOT%_mandir/man1/kill.1 +rm -f $RPM_BUILD_ROOT%_mandir/man1/uptime.1 + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%{fillup_and_insserv -ny boot.sysctl boot.sysctl} + +%postun +%insserv_cleanup + +%files +%defattr (-,root,root,755) +%doc NEWS README COPYING +%config /etc/init.d/boot.sysctl +%config(noreplace) /etc/sysctl.conf +%config(noreplace) /etc/xinetd.d/systat +/bin/ps +/sbin/sysctl +/usr/bin/free +/usr/bin/pgrep +/usr/bin/pkill +/usr/bin/pmap +/usr/bin/pwdx +/usr/bin/skill +/usr/bin/slabtop +/usr/bin/snice +/usr/bin/tload +/usr/bin/top +/usr/bin/vmstat +/usr/bin/w +/usr/bin/watch +%_mandir/man1/free.1.gz +%_mandir/man1/pgrep.1.gz +%_mandir/man1/pkill.1.gz +%_mandir/man1/pmap.1.gz +%_mandir/man1/ps.1.gz +%_mandir/man1/pwdx.1.gz +%_mandir/man1/skill.1.gz +%_mandir/man1/slabtop.1.gz +%_mandir/man1/snice.1.gz +%_mandir/man1/tload.1.gz +%_mandir/man1/top.1.gz +%_mandir/man1/w.1.gz +%_mandir/man1/watch.1.gz +%_mandir/man5/sysctl.conf.5.gz +%_mandir/man8/vmstat.8.gz +%_mandir/man8/sysctl.8.gz + +%changelog -n procps +* Fri Jul 28 2006 - werner@suse.de +- Don't stop reading if the read buffer boundary is reached [#194598] +* Fri Jul 28 2006 - olh@suse.de +- remove unneeded boot.ldconfig from boot.sysctl + boot.sysctl should depend on boot.localfs (#181972) +* Mon Jun 26 2006 - werner@suse.de +- Update to version 3.2.7 +* Thu May 18 2006 - werner@suse.de +- Add stealtime patch (bug #86394) +* Mon Mar 20 2006 - hvogel@suse.de +- fix %%CPU column format [#159480] +* Thu Mar 16 2006 - hvogel@suse.de +- make CPU states consistent [#158572] +* Wed Mar 15 2006 - hvogel@suse.de +- fix last patch to not lead to constant CPU usage [#156395] +* Mon Feb 20 2006 - hvogel@suse.de +- dont crash if a CPU is hotplugged [#151285] +* Wed Feb 08 2006 - hvogel@suse.de +- fix ~/.toprc handling [#140319] +* Fri Jan 27 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Jan 24 2006 - mmj@suse.de +- Add support for terabytes of memory [#145014] +* Wed Jan 04 2006 - mmj@suse.de +- Document 'H' - Threads in top.1 (thanks Tony Ernst) +* Mon Oct 31 2005 - mmj@suse.de +- Update to 3.2.6: + o vmstat: /proc/stat buffer big enough for 1024 CPUs + o dietlibc needs termios.h for struct winsize + o top: can do per-task display + o more MIPS crud + o begin prep for setuid + o top: fix %%CPU max on 2..9 CPU SMP + o ps: fix crash related to realloc + o ps: man page more detailed + o spelling fixes + o top: crash on resize fixed + o vmstat: -p handles /dev/ and does not overflow +* Thu Oct 13 2005 - mmj@suse.de +- Updated patch from rml +* Wed Oct 12 2005 - mmj@suse.de +- Add patch from Chris Rivera for "smaps" that provides per-mapping + RSS information. +* Mon Apr 18 2005 - mmj@suse.de +- Fix potential bufferoverflow in pwdx [#78074] +* Tue Feb 08 2005 - mmj@suse.de +- Update to 3.2.5: + * display problem on 64-bit systems fixed + * top: variable-width PID and PPID + * top: variable-width %%CPU + * sysctl: better error messages + * ps: security labels can contain any printable ASCII + * top: help and version message on stdout, with exit(0) + * ps: SIGTSTP and SIGTTOU shouldn't print bug email address + * slabtop: compile with glibc 2.2.17 (and older, likely) + * slabtop: fix overflow on huge NUMA boxes + * slabtop: accept any slabinfo 2.x format + * ps: alignment after WCHAN fixed + * pmap: when no -x or -d option, show full path +* Tue Jan 11 2005 - mmj@suse.de +- Make our CFLAGS and RPM_OPT_FLAGS actually get used [#49378] +* Tue Dec 07 2004 - mmj@suse.de +- Update to procps-3.2.4: + * support 64-bit MIPS with n32 binary + * sparc32 optimized for sparc32 again + * pwdx: new command + * ps: UTF-8 username + command + * ps: more room for some columns + * ps: tolerate SubDomain security module CONTEXT/LABEL data + * watch: passes COLUMNS and LINES in environment + * top: in batch mode, tolerate unknown $TERM + * pkill: quiet about processes that die before kill() +* Wed Oct 27 2004 - mmj@suse.de +- Increase buffer size for reading proc files. [#44776] +* Thu Sep 23 2004 - lmuelle@suse.de +- Ensure to activate boot.sysctl if we do a first installation, [#44481]. +* Wed Sep 15 2004 - lmuelle@suse.de +- Add default sysctl.conf file. +* Mon Aug 16 2004 - garloff@suse.de +- Update to procps-3.2.3: + * avoid truncating long usernames + * avoid warning about -lncurses when not linking (more) + * new names for shared libraries (packagers: watch out!) + * build fixes and manpages updates + * wchan now '*' for multi-threaded processes + * ps: STAT shows l for multi-threaded processes + * vmstat: some overflow problems fixed -- thanks Holger Kiehl +- Use ps manpage from from the package. +* Tue Aug 03 2004 - garloff@suse.de +- Update to procps-3.2.2: + * build tweaks and docu updates + * ps: k option and personality-specific -x support + * sysctl: -a and -N options, better error handling + * top: tolerate sparse CPU numbering, cope with terminals + lacking ram & sram, avoid xterm clear-to-eol at eol + * vmstat: fix -d + * watch: sub-second intervals +- Rediff patches. +* Wed Jun 02 2004 - uli@suse.de +- fixed crash in small terminal (bug #37651) +* Tue Mar 30 2004 - stepan@suse.de +- Fix ps.1 [#35584] +- update to 3.2.1 to get rid of incompatible SE Linux patches. + 3.2.1 is a bugfix release: + * ps: STAT flags for fg process group and session leader + * ps: STAT flags for swapped out process dropped (was broken) + * ps: new -M and Z options for security data (SE Linux, etc.) + * slabtop: detect broken /proc/slabinfo -- thanks to Fabian + Frederick + * slabtop: ensure that error messages show up on the screen -- + FF again +* Mon Mar 29 2004 - mmj@suse.de +- Fix top.1 man page and include pmap.1 [#35584] +* Sun Mar 21 2004 - adrian@suse.de +- show the result of w also with line wrapps, like in good old times. + (ok'ed by stepan) +* Wed Mar 03 2004 - stepan@suse.de +- add notruncate option to w (for powermanagement code) +* Mon Mar 01 2004 - stepan@suse.de +- fix handling of many CPUs in top (#34347) +* Tue Feb 24 2004 - stepan@suse.de +- update to procps 3.2.0 + * build on IA-64 again + * pmap: output like Solaris 9, not Solaris 7 + * ps: also handle SELinux on the 2.4.xx kernels + * top: during a ^Z, the terminal was messed up + * future-proof the tty handling + * add slabtop + * pmap: detect the primary stack + * pmap: -d format + * free: report high and low memory +* Fri Feb 20 2004 - ro@suse.de +- boot.sysctl: do nothing for stop case +* Sun Feb 15 2004 - kukuk@suse.de +- Disable some tests not working on all architectures +* Sat Feb 14 2004 - kukuk@suse.de +- Rename package to procps +- Move procinfo and psmisc into seperate packages +- Update to 3.1.15 (includes SELinux support) +* Fri Jan 23 2004 - bk@suse.de +- pstree: UTF-8: never draw >1 '+' at end of line(no change for ASCII) +- pstree: Fix -G which uses VT100 line drawing: use the full width +* Mon Nov 17 2003 - stepan@suse.de +- fix package to build as user. Thanks to olh. +* Thu Oct 23 2003 - stepan@suse.de +- update to procps 3.1.14 + * ps fully supports thread display (H, -L, m, -m, and -T) + * top can show CPU usage for IO-wait, IRQ, and softirq + * can set $PS_FORMAT to choose your own default ps format + * better width control ("ps -o pid,wchan:42,args") + * width of ps PID column adjusts to your system + * vmstat lets you choose units you like: 1000, 1024, 1000000... + * top can sort by any column (old sort keys available too) + * top can select a single user to display + * top can be put in multi-window mode and/or color mode + * vmstat has the -s option, as found on UNIX and BSD systems + * vmstat has the -f option, as found on UNIX and BSD systems + * watch doesn't eat the first blank line by mistake + * vmstat uses a fast O(1) algorithm on 2.5.xx kernels + * pmap command is SunOS-compatible + * vmstat shows IO-wait time + * pgrep and pkill can find the oldest matching process + * sysctl handles the Linux 2.5.xx VLAN interfaces + * ps has a new "-F" format (very nice, like DYNIX/ptx has) + * ps with proper BSD process selection + * better handling of very long uptimes +* Tue Oct 14 2003 - stepan@suse.de +- fix 32bit build on AMD64 +* Wed Oct 01 2003 - stepan@suse.de +- update to procps 3.1.13 +* Sat Sep 20 2003 - schwab@suse.de +- Handle EOF from terminal [#31126]. +* Mon Sep 15 2003 - stepan@suse.de +- fix "#C" display problem with more than 99 CPUs. (#28163) +* Fri Sep 05 2003 - stepan@suse.de +- top: fix 4G overflow on 64bit platforms (bug #28539) + (procps-3.1.11-bigproc.diff) +* Fri Aug 08 2003 - stepan@suse.de +- update procps to version 3.1.11: + * compile with gcc 2.95 again (C99 issue) +- fix sysctl insertion (bug #28593) +* Mon Jul 14 2003 - stepan@suse.de +- update procps to version 3.1.10 + * handle GPLONLY_ symbols + * kill: better man page + * skill: better man page + * ps: PID-like columns change width as needed + * top: COMMAND instead of Command + * vmstat: -m displays slabinfo + * vmstat: -d displays disk stats +- update psmisc to 21.3 (has our patch included) + * SELinux SID selection uses -d instead of -S to stop the + confusion of signal names. + * Doesnt segfault on long cmdnames, thanks Ben Low + * More fixes for types, also some GCC 3.2 fixes + * Changed a long to a long long in pstree. +* Fri Jul 04 2003 - stepan@suse.de +- update to version 3.1.9 + * memory sizes fixed for 64-bit w/ gcc 3.x + * ps: detect broken OS install w/o /proc mounted + * top: fix suspend/resume behavior + * top: ditch warning until a _good_ interface is found + * kill: more info in the man page + * ps: document the -o, o, -O, and O options + * vmstat: choose units you like: 1000, 1024, 1000000... +* Fri Jun 13 2003 - coolo@suse.de +- fixing cwd +* Thu Jun 12 2003 - coolo@suse.de +- use %%find_lang +* Tue Jun 03 2003 - coolo@suse.de +- use BuildRoot +- use %%_mandir +* Wed May 14 2003 - stepan@suse.de +- drop XConsole and xcpustate as there are the almost identical + tools xconsole and xosview. This drops X11 dependencies of this + package completely. +- fix default permissions of locale directories (bug #26120) +* Thu Mar 27 2003 - stepan@suse.de +- fix truncating bug in pstree when specifying -al +- merge psmisc diffs +* Fri Mar 21 2003 - stepan@suse.de +- update procps to 3.1.8 +- update xcpustate to 2.6beta +- fix build on itanium +* Wed Mar 05 2003 - stepan@suse.de +- add xinetd config file for systat service +* Tue Mar 04 2003 - stepan@suse.de +- update procps to 3.1.6 + * includes discontig mem fixes + * includes fix for missing processes (bug #23526) +* Mon Feb 24 2003 - stepan@suse.de +- new, working discontig patch +* Wed Feb 19 2003 - stepan@suse.de +- fix broken ps with discontig kernel (bug #23788) +* Mon Feb 03 2003 - schwab@suse.de +- Don't package uptime, now part of coreutils. +* Wed Nov 27 2002 - stepan@suse.de +- fix newlines in string again, to satisfy compiler (killall) +* Fri Nov 22 2002 - stepan@suse.de +- make x utility build triggerable by %%{build_with_x} +* Thu Nov 14 2002 - werner@suse.de +- Stupid compiler does not accept newlines in strings. +* Tue Oct 15 2002 - werner@suse.de +- Fix bug #20604: new procps version 2.0.10 +- port all required patches to 2.0.10 +- Update psmisc to 21.2 +- port all required patches to 21.2 +* Tue Sep 10 2002 - adrian@suse.de +- fix split alias +-Obsoletes: ps:/usr/X11R6/bin/xcpustate + +Provides: ps:/usr/X11R6/bin/xcpustate +* Thu Aug 22 2002 - kukuk@suse.de +- fix PreRequires. +* Fri Aug 16 2002 - werner@suse.de +- Add PreReq (bug #17963) +* Thu Aug 15 2002 - ro@suse.de +- modify required-start in boot.sysctl: boot.setup is gone +* Tue Aug 06 2002 - werner@suse.de +- Statistics of cpu usage: no negative averages (bug #17449) +* Mon Aug 05 2002 - kukuk@suse.de +- boot.sysclt: rename serial to setserial, setserial and + boot.isapnp are "should-start". +* Wed Mar 20 2002 - ro@suse.de +- boot.sysctl: don't write out sysctl.conf if it doesn't exist + sysctl can't read the file of a complete dump +* Fri Feb 22 2002 - werner@suse.de +- Fix bug #12816: generate signal list with signal cpp macros + to get it correct on all architectures. Make SIG prefix + work of signal names. +* Fri Feb 01 2002 - ro@suse.de +- added stop/status for sysctl boot script +* Mon Jan 21 2002 - ro@suse.de +- added boot-script for sysctl (inactive by default) +* Mon Jan 07 2002 - ro@suse.de +- fixed segfault (thanks to andreas) +* Thu Dec 20 2001 - werner@suse.de +- Make it compile +* Thu Dec 20 2001 - werner@suse.de +- Sometimes it happens that /proc can not be open, then we have + to exit gratefully :^) +* Fri Nov 09 2001 - schwab@suse.de +- Fix idle time overflow in vmstat. +- Fix missing declarations. +* Mon Sep 17 2001 - werner@suse.de +- Fix lsdev from procinfo +- Use the correct type for uptime integers (procinfo) +* Tue Sep 04 2001 - werner@suse.de +- Move fuser from /usr/bin/ to /bin/ +* Tue Sep 04 2001 - werner@suse.de +- Fix bug #9797: update to psmisc-20.1 +- Update procinfo to procinfo-18 +- Add bigbuff, retcode, sysctl-error, and biguid patch frm RH + (last one should fix bug #9933) +* Tue Apr 24 2001 - werner@suse.de +- Package split (#7078) +* Fri Apr 20 2001 - werner@suse.de +- tty in proc's stat is an int +* Thu Mar 29 2001 - ro@suse.de +- initialize page_size before first use +* Wed Mar 28 2001 - schwab@suse.de +- Kill improper use of PAGE_SIZE. +* Tue Mar 27 2001 - werner@suse.de +- Make it work again +- Make w know about locale +* Tue Mar 13 2001 - schwab@suse.de +- Use getpagesize instead of PAGE_SHIFT. +- Don't compile with -fwritable-strings. +* Mon Mar 12 2001 - werner@suse.de +- Skip oldps +* Fri Mar 09 2001 - werner@suse.de +- Make it run on a IA64 +* Mon Feb 19 2001 - werner@suse.de +- Make program watch recognize locale environment (bug#6395) +* Thu Jan 25 2001 - werner@suse.de +- Make `fuser -s -k' work (bug#6143) +* Mon Jan 22 2001 - werner@suse.de +- Avoid segfaults on mmap'ed buffer by adding '\0' +* Wed Jan 10 2001 - werner@suse.de +- Fix format handling (bug#5386) +* Wed Dec 20 2000 - werner@suse.de +- Reset locale during sscanf calls to POSIX +* Tue Dec 19 2000 - werner@suse.de +- Use %%llu for input (sscanf) and output (printf) format of + unsigned long long (free.c, top.c, and sysinfo.c). +* Wed Dec 13 2000 - werner@suse.de +- Update to procps 2.0.7: now SMP should be visible in top +- Remove sessreg from file list +- Add pgrep and pkill to file list +* Mon Dec 04 2000 - ro@suse.de +- don't try to strip man-pages +* Wed Nov 22 2000 - uli@suse.de +- fixed to build on PPC +* Fri Nov 17 2000 - ro@suse.de +- compile-fix for old sessreg (glibc/X11 clash atexit) +* Sat May 27 2000 - kukuk@suse.de +- Add Group tag +- Use docdir macro +* Mon May 08 2000 - ro@suse.de +- procinfo fixed for smp/alpha +* Mon Feb 28 2000 - werner@suse.de +- Install some docus (closes bug #1509) +* Fri Feb 25 2000 - kukuk@suse.de +- Fix problem that glibc and ncurses uses the same define for + different things. +* Thu Feb 24 2000 - schwab@suse.de +- procps: fix scanf format string +* Fri Feb 04 2000 - kasal@suse.cz +- remove smp_num_cpus -- it's done in 2.0.6 +* Wed Jan 19 2000 - ro@suse.de +- usr/man -> usr/share/man +* Wed Jan 19 2000 - kasal@suse.de +- fixed "ps u" -- ie. fixed read_total_main() +* Mon Dec 06 1999 - werner@suse.de +- Argh: fix Makefile to install sysctl.conf.5 man page +* Mon Dec 06 1999 - werner@suse.de +- Install sysctl tool of procps 2.0.6 +* Fri Dec 03 1999 - kasal@suse.de +- upgraded procps to 2.0.6, to get the package compiled on sparc +* Wed Nov 24 1999 - kettner@suse.de +- fixed bug in procinfo on AXP +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Tue Sep 07 1999 - werner@suse.de +- Avoid SEGV if /proc isn't mounted (e.g. in single user mode) +* Tue Sep 07 1999 - werner@suse.de +- Fix some maunal page (missed tbl mark, some nasty .TH's) +* Wed Aug 18 1999 - werner@suse.de +- Update procinfo (ver 17), procps (ver 2.0.2) but hold + ver 1.2.11 (sessreg, XConsole, libproc for xcpustate), + update psmisc (ver 18) +- Patch procps 2.0.2 with debian diff and make ps + usable again (select bits should be 0x0a0a to see + all ttys if ps is called). +* Wed Apr 14 1999 - bk@suse.de +- updated procinfo patckage from version 15 to 16 + * annoying interrupt warning("recompile me!") is gone + * display on SMP has been fixed +* Tue Apr 06 1999 - bk@suse.de +- update to procps-1.2.11 +- fixed segfault in /usr/bin/w +* Mon Mar 22 1999 - florian@suse.de +- update to procps-1.2.10 +* Fri Oct 30 1998 - ro@suse.de +- update to procinfo-15 and procps-1.2.9 +- extra source for xcpustate-2.5 (no more in procps) +- patched xcpustate to display mem,swap,net for linux +* Thu May 07 1998 - florian@suse.de +- add "-g" option to killall to kill a complete process group +- update to procps 1.2.7 +- update to procinfo 13 +* Fri Mar 13 1998 - bs@suse.de +- switched version to `date` (problem with version for update). +* Mon Mar 02 1998 - florian@suse.de +- update to psmisc 17 +- update to procps 1.2.6 +- update to procinfo 12 +* Fri Oct 17 1997 - ro@suse.de +- ready for autobuild +* Sat Jul 05 1997 - florian@suse.de +- updated to 1.12.2 again (with fixes) +- fix output of free +- top with wrong options won't destroy the display +- XConsole is not suid-root anymore as "xconsole" can be used without + being suid root +* Mon Jun 30 1997 - bs@suse.de +- switched back to version 1.11.6 +* Sun Jun 22 1997 - florian@suse.de +- update to version 1.12.2 +- add procinfo 0.11 +* Tue May 20 1997 - florian@suse.de +- update to version 1.11.6 +* Sun Apr 13 1997 - florian@suse.de +- update to new version 1.11.3 +- update to psmisc 12a +* Wed Jan 22 1997 - florian@suse.de +- update to version 1.11.1 +* Thu Jan 02 1997 - florian@suse.de + new version 1.01 + 'top' is completely new + people might get a much faster 'ps', if they delete '/etc/psdevtab' + and call 'ps' as root... diff --git a/pwdx-bufferoverflow.diff b/pwdx-bufferoverflow.diff new file mode 100644 index 0000000..9eb3a33 --- /dev/null +++ b/pwdx-bufferoverflow.diff @@ -0,0 +1,10 @@ +--- procps-3.2.7/pwdx.c ++++ procps-3.2.7/pwdx.c 2006-06-26 16:38:12.000000000 +0200 +@@ -60,6 +60,7 @@ + for (i = 1; i < argc; i++) { + if (regexec(&re, argv[i], 0, NULL, 0) != 0) { + snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]); ++ buf[sizeof(buf)-1] = '\0'; + die(buf); + } + if (!strcmp("-V", argv[i]) || !strcmp("--version", argv[i])) diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/sysctl.conf b/sysctl.conf new file mode 100644 index 0000000..61574c0 --- /dev/null +++ b/sysctl.conf @@ -0,0 +1,7 @@ +# Disable response to broadcasts. +# You don't want yourself becoming a Smurf amplifier. +net.ipv4.icmp_echo_ignore_broadcasts = 1 +# enable route verification on all interfaces +net.ipv4.conf.all.rp_filter = 1 +# enable ipV6 forwarding +#net.ipv6.conf.all.forwarding = 1 diff --git a/systat.xinetd b/systat.xinetd new file mode 100644 index 0000000..e01e36d --- /dev/null +++ b/systat.xinetd @@ -0,0 +1,17 @@ +# Finger, systat and netstat give out user information which may be +# valuable to potential "system crackers." Many sites choose to disable +# some or all of these services to improve security. +# Try "telnet localhost systat" and "telnet localhost netstat" to see that +# information yourself! +# +service systat +{ + disable = yes + socket_type = stream + protocol = tcp + wait = no + user = nobody + server = /bin/ps + server_args = -auwwx +} +