Hello community,
here is the log from the commit of package htop
checked in at Sun Jun 3 21:24:49 CEST 2007.
--------
--- htop/htop.changes 2007-05-22 13:19:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/htop/htop.changes 2007-06-02 16:38:53.235847000 +0200
@@ -1,0 +2,12 @@
+Sat Jun 2 16:34:51 CEST 2007 - thoenig@suse.de
+
+- Update to htop 0.6.6
+- Changes:
+ * Add support of NLWP field
+ * BUGFIX: Fix use of configurable /proc location
+ * Fix memory percentage calculation and make it saner
+ * Added display of DRS, DT, LRS and TRS
+ * BUGFIX: LRS and DRS memory values were flipped
+ * BUGFIX: Don't crash on very high UIDs
+
+-------------------------------------------------------------------
Old:
----
htop-0.6.5.tar.gz
New:
----
htop-0.6.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ htop.spec ++++++
--- /var/tmp/diff_new_pack.C13328/_old 2007-06-03 21:24:20.000000000 +0200
+++ /var/tmp/diff_new_pack.C13328/_new 2007-06-03 21:24:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package htop (Version 0.6.5)
+# spec file for package htop (Version 0.6.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: htop
URL: http://htop.sourceforge.net
Summary: htop is an interactive text-mode process viewer for Linux. It aims to be a better 'top'.
-Version: 0.6.5
+Version: 0.6.6
Release: 1
License: GNU General Public License (GPL)
Group: System/Monitoring
@@ -62,6 +62,15 @@
%{_mandir}/*/%{name}*
%changelog
+* Sat Jun 02 2007 - thoenig@suse.de
+- Update to htop 0.6.6
+- Changes:
+ * Add support of NLWP field
+ * BUGFIX: Fix use of configurable /proc location
+ * Fix memory percentage calculation and make it saner
+ * Added display of DRS, DT, LRS and TRS
+ * BUGFIX: LRS and DRS memory values were flipped
+ * BUGFIX: Don't crash on very high UIDs
* Tue May 22 2007 - thoenig@suse.de
- Initial package submission (htop 0.6.5)
- Add patch htop-desktop-file-fix-thoenig-01.patch
++++++ htop-0.6.5.tar.gz -> htop-0.6.6.tar.gz ++++++
++++ 10374 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/ChangeLog new/htop-0.6.6/ChangeLog
--- old/htop-0.6.5/ChangeLog 2006-11-20 17:45:42.000000000 +0100
+++ new/htop-0.6.6/ChangeLog 2007-05-21 21:28:08.000000000 +0200
@@ -1,3 +1,17 @@
+What's new in version 0.6.6
+
+* Add support of NLWP field
+ (thanks to Bert Wesarg)
+* BUGFIX: Fix use of configurable /proc location
+ (thanks to Florent Thoumie)
+* Fix memory percentage calculation and make it saner
+ (thanks to Olev Kartau for the report)
+* Added display of DRS, DT, LRS and TRS
+ (thanks to Matthias Lederhofer)
+* BUGFIX: LRS and DRS memory values were flipped
+ (thanks to Matthias Lederhofer)
+* BUGFIX: Don't crash on very high UIDs
+ (thanks to Egmont Koblinger)
What's new in version 0.6.5
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/config.h new/htop-0.6.6/config.h
--- old/htop-0.6.5/config.h 2006-11-16 16:15:28.000000000 +0100
+++ new/htop-0.6.6/config.h 2007-05-21 20:06:58.000000000 +0200
@@ -1,4 +1,4 @@
-/* config.h. Generated by configure. */
+/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if the `closedir' function returns void instead of `int'. */
@@ -105,13 +105,13 @@
#define PACKAGE_NAME "htop"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "htop 0.6.5"
+#define PACKAGE_STRING "htop 0.6.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "htop"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.6.5"
+#define PACKAGE_VERSION "0.6.6"
/* Path of proc filesystem */
#define PROCDIR "/proc"
@@ -123,7 +123,7 @@
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "0.6.5"
+#define VERSION "0.6.6"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/configure.ac new/htop-0.6.6/configure.ac
--- old/htop-0.6.5/configure.ac 2006-11-14 18:22:54.000000000 +0100
+++ new/htop-0.6.6/configure.ac 2007-05-21 20:06:15.000000000 +0200
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT([htop],[0.6.5],[loderunner@users.sourceforge.net])
+AC_INIT([htop],[0.6.6],[loderunner@users.sourceforge.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([htop.c])
AC_CONFIG_HEADER([config.h])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/Hashtable.c new/htop-0.6.6/Hashtable.c
--- old/htop-0.6.5/Hashtable.c 2006-11-13 19:03:29.000000000 +0100
+++ new/htop-0.6.6/Hashtable.c 2007-05-17 19:07:38.000000000 +0200
@@ -19,7 +19,7 @@
typedef void(*Hashtable_PairFunction)(int, void*, void*);
typedef struct HashtableItem {
- int key;
+ unsigned int key;
void* value;
struct HashtableItem* next;
} HashtableItem;
@@ -61,7 +61,7 @@
#endif
-HashtableItem* HashtableItem_new(int key, void* value) {
+HashtableItem* HashtableItem_new(unsigned int key, void* value) {
HashtableItem* this;
this = (HashtableItem*) malloc(sizeof(HashtableItem));
@@ -104,8 +104,8 @@
return this->items;
}
-void Hashtable_put(Hashtable* this, int key, void* value) {
- int index = key % this->size;
+void Hashtable_put(Hashtable* this, unsigned int key, void* value) {
+ unsigned int index = key % this->size;
HashtableItem** bucketPtr = &(this->buckets[index]);
while (true)
if (*bucketPtr == NULL) {
@@ -122,8 +122,8 @@
assert(Hashtable_isConsistent(this));
}
-void* Hashtable_remove(Hashtable* this, int key) {
- int index = key % this->size;
+void* Hashtable_remove(Hashtable* this, unsigned int key) {
+ unsigned int index = key % this->size;
assert(Hashtable_isConsistent(this));
@@ -149,8 +149,8 @@
return NULL;
}
-inline void* Hashtable_get(Hashtable* this, int key) {
- int index = key % this->size;
+inline void* Hashtable_get(Hashtable* this, unsigned int key) {
+ unsigned int index = key % this->size;
HashtableItem* bucketPtr = this->buckets[index];
while (true) {
if (bucketPtr == NULL) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/Hashtable.h new/htop-0.6.6/Hashtable.h
--- old/htop-0.6.5/Hashtable.h 2006-11-13 19:03:30.000000000 +0100
+++ new/htop-0.6.6/Hashtable.h 2007-05-21 21:26:17.000000000 +0200
@@ -21,7 +21,7 @@
typedef void(*Hashtable_PairFunction)(int, void*, void*);
typedef struct HashtableItem {
- int key;
+ unsigned int key;
void* value;
struct HashtableItem* next;
} HashtableItem;
@@ -41,7 +41,7 @@
#endif
-HashtableItem* HashtableItem_new(int key, void* value);
+HashtableItem* HashtableItem_new(unsigned int key, void* value);
Hashtable* Hashtable_new(int size, bool owner);
@@ -49,11 +49,11 @@
inline int Hashtable_size(Hashtable* this);
-void Hashtable_put(Hashtable* this, int key, void* value);
+void Hashtable_put(Hashtable* this, unsigned int key, void* value);
-void* Hashtable_remove(Hashtable* this, int key);
+void* Hashtable_remove(Hashtable* this, unsigned int key);
-inline void* Hashtable_get(Hashtable* this, int key);
+inline void* Hashtable_get(Hashtable* this, unsigned int key);
void Hashtable_foreach(Hashtable* this, Hashtable_PairFunction f, void* userData);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/htop.1 new/htop-0.6.6/htop.1
--- old/htop-0.6.5/htop.1 2006-11-14 18:23:12.000000000 +0100
+++ new/htop-0.6.6/htop.1 2007-05-17 21:03:19.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "htop" "1" "0.6.5" "Bartosz Fenski " "Utils"
+.TH "htop" "1" "0.6.6" "Bartosz Fenski " "Utils"
.SH "NAME"
htop \- interactive process viewer
.SH "SYNTAX"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/htop.c new/htop-0.6.6/htop.c
--- old/htop-0.6.5/htop.c 2006-11-16 16:19:14.000000000 +0100
+++ new/htop-0.6.6/htop.c 2007-05-17 19:07:38.000000000 +0200
@@ -312,7 +312,7 @@
incSearchIndex = 0;
incSearchBuffer[0] = 0;
int currPos = Panel_getSelectedIndex(panel);
- int currPid = 0;
+ unsigned int currPid = 0;
int currScrollV = panel->scrollV;
if (follow)
currPid = ProcessList_get(pl, currPos)->pid;
@@ -406,7 +406,7 @@
continue;
}
if (isdigit((char)ch)) {
- int pid = ch-48 + acc;
+ unsigned int pid = ch-48 + acc;
for (int i = 0; i < ProcessList_size(pl) && ((Process*) Panel_getSelected(panel))->pid != pid; i++)
Panel_setSelected(panel, i);
acc = pid * 10;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/htop.desktop new/htop-0.6.6/htop.desktop
--- old/htop-0.6.5/htop.desktop 2006-11-14 18:23:02.000000000 +0100
+++ new/htop-0.6.6/htop.desktop 2007-05-17 21:03:51.000000000 +0200
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
-Version=0.6.5
+Version=0.6.6
Name=Htop
Type=Application
Comment=Show System Processes
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/Makefile.am new/htop-0.6.6/Makefile.am
--- old/htop-0.6.5/Makefile.am 2006-11-08 22:34:18.000000000 +0100
+++ new/htop-0.6.6/Makefile.am 2007-05-21 21:26:12.000000000 +0200
@@ -11,22 +11,27 @@
AM_CFLAGS = -pedantic -Wall -std=c99
AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
-htop_SOURCES = AvailableMetersPanel.c CategoriesPanel.c ClockMeter.c \
-CPUMeter.c CRT.c DebugMemory.c DisplayOptionsPanel.c FunctionBar.c \
-Hashtable.c Header.c htop.c Panel.c ListItem.c LoadAverageMeter.c \
-MemoryMeter.c Meter.c MetersPanel.c Object.c Process.c \
-ProcessList.c RichString.c ScreenManager.c Settings.c SignalItem.c \
-SignalsPanel.c String.c SwapMeter.c TasksMeter.c Vector.c \
-UptimeMeter.c UsersTable.c AvailableMetersPanel.h CategoriesPanel.h \
-ClockMeter.h config.h CPUMeter.h CRT.h debug.h DebugMemory.h \
-DisplayOptionsPanel.h FunctionBar.h Hashtable.h Header.h htop.h Panel.h \
-ListItem.h LoadAverageMeter.h MemoryMeter.h Meter.h \
-MetersPanel.h Object.h Process.h ProcessList.h RichString.h ScreenManager.h \
-Settings.h SignalItem.h SignalsPanel.h String.h SwapMeter.h TasksMeter.h \
-Vector.h UptimeMeter.h UsersTable.h CheckItem.c CheckItem.h \
-ColorsPanel.c ColorsPanel.h TraceScreen.c TraceScreen.h \
-AvailableColumnsPanel.c AvailableColumnsPanel.h ColumnsPanel.c \
-ColumnsPanel.h
+myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \
+ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c DebugMemory.c \
+DisplayOptionsPanel.c FunctionBar.c Hashtable.c Header.c htop.c ListItem.c \
+LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \
+Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
+SignalItem.c SignalsPanel.c String.c SwapMeter.c TasksMeter.c TraceScreen.c \
+UptimeMeter.c UsersTable.c Vector.c AvailableColumnsPanel.c
+
+myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
+CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
+CPUMeter.h CRT.h DebugMemory.h DisplayOptionsPanel.h FunctionBar.h \
+Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
+Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
+ScreenManager.h Settings.h SignalItem.h SignalsPanel.h String.h \
+SwapMeter.h TasksMeter.h TraceScreen.h UptimeMeter.h UsersTable.h Vector.h \
+Process.h
+
+SUFFIXES = .h
+
+BUILT_SOURCES = $(myhtopheaders)
+htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h
profile:
$(MAKE) all CFLAGS="-pg -O2"
@@ -40,3 +45,8 @@
debuglite:
$(MAKE) all CFLAGS="-ggdb -DDEBUGLITE"
+.c.h:
+ scripts/MakeHeader.py $<
+
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/missing new/htop-0.6.6/missing
--- old/htop-0.6.5/missing 2006-03-31 20:13:07.000000000 +0200
+++ new/htop-0.6.6/missing 2007-05-17 19:11:49.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2003-09-02.23
+scriptversion=2005-06-08.21
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
@@ -19,8 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -60,11 +60,6 @@
msg="probably too old"
fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -92,10 +87,12 @@
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to ."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -104,12 +101,42 @@
exit 1
;;
- aclocal*)
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@@ -119,11 +146,6 @@
;;
autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -133,11 +155,6 @@
;;
autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -157,11 +174,6 @@
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@@ -173,11 +185,6 @@
;;
autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@@ -254,11 +261,6 @@
;;
help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
@@ -279,11 +281,6 @@
;;
makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -291,20 +288,23 @@
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
tar)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/Process.c new/htop-0.6.6/Process.c
--- old/htop-0.6.5/Process.c 2006-11-29 19:34:57.000000000 +0100
+++ new/htop-0.6.6/Process.c 2007-05-21 21:18:08.000000000 +0200
@@ -28,7 +28,9 @@
// This works only with glibc 2.1+. On earlier versions
// the behavior is similar to have a hardcoded page size.
+#ifndef PAGE_SIZE
#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) / 1024 )
+#endif
#define PROCESS_COMM_LEN 300
@@ -39,7 +41,7 @@
STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE,
STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SSIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL,
PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM,
- USER, TIME, LAST_PROCESSFIELD
+ USER, TIME, NLWP, LAST_PROCESSFIELD
} ProcessField;
struct ProcessList_;
@@ -50,16 +52,16 @@
struct ProcessList_ *pl;
bool updated;
- int pid;
+ unsigned int pid;
char* comm;
int indent;
char state;
bool tag;
- int ppid;
- int pgrp;
- int session;
- int tty_nr;
- int tpgid;
+ unsigned int ppid;
+ unsigned int pgrp;
+ unsigned int session;
+ unsigned int tty_nr;
+ unsigned int tpgid;
unsigned long int flags;
#ifdef DEBUG
unsigned long int minflt;
@@ -73,6 +75,7 @@
long int cstime;
long int priority;
long int nice;
+ long int nlwp;
#ifdef DEBUG
long int itrealvalue;
unsigned long int starttime;
@@ -116,7 +119,7 @@
#endif
char *Process_fieldNames[] = {
- "", "PID", "Command", "STATE", "PPID", "PGRP", "SESSION", "TTY_NR", "TPGID", "FLAGS", "MINFLT", "CMINFLT", "MAJFLT", "CMAJFLT", "UTIME", "STIME", "CUTIME", "CSTIME", "PRIORITY", "NICE", "ITREALVALUE", "STARTTIME", "VSIZE", "RSS", "RLIM", "STARTCODE", "ENDCODE", "STARTSTACK", "KSTKESP", "KSTKEIP", "SIGNAL", "BLOCKED", "SIGIGNORE", "SIGCATCH", "WCHAN", "NSWAP", "CNSWAP", "EXIT_SIGNAL", "PROCESSOR", "M_SIZE", "M_RESIDENT", "M_SHARE", "M_TRS", "M_DRS", "M_LRS", "M_DT", "ST_UID", "PERCENT_CPU", "PERCENT_MEM", "USER", "TIME", "*** report bug! ***"
+ "", "PID", "Command", "STATE", "PPID", "PGRP", "SESSION", "TTY_NR", "TPGID", "FLAGS", "MINFLT", "CMINFLT", "MAJFLT", "CMAJFLT", "UTIME", "STIME", "CUTIME", "CSTIME", "PRIORITY", "NICE", "ITREALVALUE", "STARTTIME", "VSIZE", "RSS", "RLIM", "STARTCODE", "ENDCODE", "STARTSTACK", "KSTKESP", "KSTKEIP", "SIGNAL", "BLOCKED", "SIGIGNORE", "SIGCATCH", "WCHAN", "NSWAP", "CNSWAP", "EXIT_SIGNAL", "PROCESSOR", "M_SIZE", "M_RESIDENT", "M_SHARE", "M_TRS", "M_DRS", "M_LRS", "M_DT", "ST_UID", "PERCENT_CPU", "PERCENT_MEM", "USER", "TIME", "NLWP", "*** report bug! ***"
};
static int Process_getuid = -1;
@@ -261,13 +264,14 @@
int n = PROCESS_COMM_LEN;
switch (field) {
- case PID: snprintf(buffer, n, "%5d ", this->pid); break;
- case PPID: snprintf(buffer, n, "%5d ", this->ppid); break;
- case PGRP: snprintf(buffer, n, "%5d ", this->pgrp); break;
- case SESSION: snprintf(buffer, n, "%5d ", this->session); break;
- case TTY_NR: snprintf(buffer, n, "%5d ", this->tty_nr); break;
- case TPGID: snprintf(buffer, n, "%5d ", this->tpgid); break;
+ case PID: snprintf(buffer, n, "%5u ", this->pid); break;
+ case PPID: snprintf(buffer, n, "%5u ", this->ppid); break;
+ case PGRP: snprintf(buffer, n, "%5u ", this->pgrp); break;
+ case SESSION: snprintf(buffer, n, "%5u ", this->session); break;
+ case TTY_NR: snprintf(buffer, n, "%5u ", this->tty_nr); break;
+ case TPGID: snprintf(buffer, n, "%5u ", this->tpgid); break;
case PROCESSOR: snprintf(buffer, n, "%3d ", this->processor+1); break;
+ case NLWP: snprintf(buffer, n, "%4ld ", this->nlwp); break;
case COMM: {
if (!this->pl->treeView || this->indent == 0) {
Process_writeCommand(this, attr, str);
@@ -316,6 +320,10 @@
: attr;
break;
}
+ case M_DRS: Process_printLargeNumber(this, str, this->m_drs * PAGE_SIZE); return;
+ case M_DT: Process_printLargeNumber(this, str, this->m_dt * PAGE_SIZE); return;
+ case M_LRS: Process_printLargeNumber(this, str, this->m_lrs * PAGE_SIZE); return;
+ case M_TRS: Process_printLargeNumber(this, str, this->m_trs * PAGE_SIZE); return;
case M_SIZE: Process_printLargeNumber(this, str, this->m_size * PAGE_SIZE); return;
case M_RESIDENT: Process_printLargeNumber(this, str, this->m_resident * PAGE_SIZE); return;
case M_SHARE: Process_printLargeNumber(this, str, this->m_share * PAGE_SIZE); return;
@@ -391,6 +399,14 @@
return (p1->state - p2->state);
case NICE:
return (p1->nice - p2->nice);
+ case M_DRS:
+ return (p2->m_drs - p1->m_drs);
+ case M_DT:
+ return (p2->m_dt - p1->m_dt);
+ case M_LRS:
+ return (p2->m_lrs - p1->m_lrs);
+ case M_TRS:
+ return (p2->m_trs - p1->m_trs);
case M_SIZE:
return (p2->m_size - p1->m_size);
case M_RESIDENT:
@@ -409,6 +425,8 @@
return ((p2->utime+p2->stime) - (p1->utime+p1->stime));
case COMM:
return strcmp(p1->comm, p2->comm);
+ case NLWP:
+ return (p1->nlwp - p2->nlwp);
default:
return (p1->pid - p2->pid);
}
@@ -427,6 +445,10 @@
case STATE: return "S ";
case PRIORITY: return "PRI ";
case NICE: return " NI ";
+ case M_DRS: return " DATA ";
+ case M_DT: return " DIRTY ";
+ case M_LRS: return " LIB ";
+ case M_TRS: return " CODE ";
case M_SIZE: return " VIRT ";
case M_RESIDENT: return " RES ";
case M_SHARE: return " SHR ";
@@ -438,6 +460,7 @@
case PERCENT_CPU: return "CPU% ";
case PERCENT_MEM: return "MEM% ";
case PROCESSOR: return "CPU ";
+ case NLWP: return "NLWP ";
default: return "- ";
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/Process.h new/htop-0.6.6/Process.h
--- old/htop-0.6.5/Process.h 2006-11-20 17:38:24.000000000 +0100
+++ new/htop-0.6.6/Process.h 2007-05-21 21:26:18.000000000 +0200
@@ -31,7 +31,9 @@
// This works only with glibc 2.1+. On earlier versions
// the behavior is similar to have a hardcoded page size.
+#ifndef PAGE_SIZE
#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) / 1024 )
+#endif
#define PROCESS_COMM_LEN 300
@@ -41,7 +43,7 @@
STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE,
STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SSIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL,
PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM,
- USER, TIME, LAST_PROCESSFIELD
+ USER, TIME, NLWP, LAST_PROCESSFIELD
} ProcessField;
struct ProcessList_;
@@ -52,16 +54,16 @@
struct ProcessList_ *pl;
bool updated;
- int pid;
+ unsigned int pid;
char* comm;
int indent;
char state;
bool tag;
- int ppid;
- int pgrp;
- int session;
- int tty_nr;
- int tpgid;
+ unsigned int ppid;
+ unsigned int pgrp;
+ unsigned int session;
+ unsigned int tty_nr;
+ unsigned int tpgid;
unsigned long int flags;
#ifdef DEBUG
unsigned long int minflt;
@@ -75,6 +77,7 @@
long int cstime;
long int priority;
long int nice;
+ long int nlwp;
#ifdef DEBUG
long int itrealvalue;
unsigned long int starttime;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/ProcessList.c new/htop-0.6.6/ProcessList.c
--- old/htop-0.6.5/ProcessList.c 2006-11-13 23:03:49.000000000 +0100
+++ new/htop-0.6.6/ProcessList.c 2007-05-21 20:05:47.000000000 +0200
@@ -37,11 +37,11 @@
#endif
#ifndef PROCSTATFILE
-#define PROCSTATFILE "/proc/stat"
+#define PROCSTATFILE PROCDIR "/stat"
#endif
#ifndef PROCMEMINFOFILE
-#define PROCMEMINFOFILE "/proc/meminfo"
+#define PROCMEMINFOFILE PROCDIR "/meminfo"
#endif
#ifndef MAX_NAME
@@ -312,7 +312,7 @@
assert(Hashtable_get(this->processTable, p->pid) != NULL);
Process* pp = Hashtable_remove(this->processTable, p->pid);
assert(pp == p); (void)pp;
- int pid = p->pid;
+ unsigned int pid = p->pid;
int index = Vector_indexOf(this->processes, p, Process_pidCompare);
assert(index != -1);
Vector_remove(this->processes, index);
@@ -408,7 +408,7 @@
#ifdef DEBUG_PROC
int num = ProcessList_read(this, location,
- "%c %d %d %d %d %d %lu %lu %lu %lu "
+ "%c %u %u %u %u %u %lu %lu %lu %lu "
"%lu %lu %lu %ld %ld %ld %ld %ld %ld "
"%lu %lu %ld %lu %lu %lu %lu %lu "
"%lu %lu %lu %lu %lu %lu %lu %lu "
@@ -417,7 +417,7 @@
&proc->tpgid, &proc->flags,
&proc->minflt, &proc->cminflt, &proc->majflt, &proc->cmajflt,
&proc->utime, &proc->stime, &proc->cutime, &proc->cstime,
- &proc->priority, &proc->nice, &zero, &proc->itrealvalue,
+ &proc->priority, &proc->nice, &proc->nlwp, &proc->itrealvalue,
&proc->starttime, &proc->vsize, &proc->rss, &proc->rlim,
&proc->startcode, &proc->endcode, &proc->startstack, &proc->kstkesp,
&proc->kstkeip, &proc->signal, &proc->blocked, &proc->sigignore,
@@ -426,7 +426,7 @@
#else
long int uzero;
int num = ProcessList_read(this, location,
- "%c %d %d %d %d %d %lu %lu %lu %lu "
+ "%c %u %u %u %u %u %lu %lu %lu %lu "
"%lu %lu %lu %ld %ld %ld %ld %ld %ld "
"%lu %lu %ld %lu %lu %lu %lu %lu "
"%lu %lu %lu %lu %lu %lu %lu %lu "
@@ -435,7 +435,7 @@
&proc->tpgid, &proc->flags,
&zero, &zero, &zero, &zero,
&proc->utime, &proc->stime, &proc->cutime, &proc->cstime,
- &proc->priority, &proc->nice, &uzero, &uzero,
+ &proc->priority, &proc->nice, &proc->nlwp, &uzero,
&zero, &zero, &uzero, &zero,
&zero, &zero, &zero, &zero,
&zero, &zero, &zero, &zero,
@@ -555,7 +555,7 @@
}
int num = ProcessList_fread(this, status, "%d %d %d %d %d %d %d",
&process->m_size, &process->m_resident, &process->m_share,
- &process->m_trs, &process->m_drs, &process->m_lrs,
+ &process->m_trs, &process->m_lrs, &process->m_drs,
&process->m_dt);
fclose(status);
@@ -602,8 +602,8 @@
process->percent_cpu = (process->utime + process->stime - lasttimes) /
period * 100.0;
- process->percent_mem = process->m_resident /
- (float)(this->usedMem - this->cachedMem - this->buffersMem) *
+ process->percent_mem = (process->m_resident * PAGE_SIZE) /
+ (float)(this->totalMem) *
100.0;
this->totalTasks++;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/ProcessList.h new/htop-0.6.6/ProcessList.h
--- old/htop-0.6.5/ProcessList.h 2006-11-08 21:07:55.000000000 +0100
+++ new/htop-0.6.6/ProcessList.h 2007-05-21 21:26:17.000000000 +0200
@@ -39,11 +39,11 @@
#endif
#ifndef PROCSTATFILE
-#define PROCSTATFILE "/proc/stat"
+#define PROCSTATFILE PROCDIR "/stat"
#endif
#ifndef PROCMEMINFOFILE
-#define PROCMEMINFOFILE "/proc/meminfo"
+#define PROCMEMINFOFILE PROCDIR "/meminfo"
#endif
#ifndef MAX_NAME
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/scripts/MakeHeader.py new/htop-0.6.6/scripts/MakeHeader.py
--- old/htop-0.6.5/scripts/MakeHeader.py 2006-06-06 22:11:20.000000000 +0200
+++ new/htop-0.6.6/scripts/MakeHeader.py 2007-05-17 19:14:03.000000000 +0200
@@ -21,6 +21,8 @@
self.file.write(text + "\n")
out = writer(out)
+print("Generating "+name+".h")
+
selfheader = '#include "' + name + '.h"'
out.write( "/* Do not edit this file. It was automatically generated. */" )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/UsersTable.c new/htop-0.6.6/UsersTable.c
--- old/htop-0.6.5/UsersTable.c 2006-06-03 00:06:37.000000000 +0200
+++ new/htop-0.6.6/UsersTable.c 2007-05-17 19:07:38.000000000 +0200
@@ -35,7 +35,7 @@
free(this);
}
-char* UsersTable_getRef(UsersTable* this, int uid) {
+char* UsersTable_getRef(UsersTable* this, unsigned int uid) {
char* name = (char*) (Hashtable_get(this->users, uid));
if (name == NULL) {
struct passwd* userData = getpwuid(uid);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/htop-0.6.5/UsersTable.h new/htop-0.6.6/UsersTable.h
--- old/htop-0.6.5/UsersTable.h 2006-07-11 07:59:24.000000000 +0200
+++ new/htop-0.6.6/UsersTable.h 2007-05-21 21:26:18.000000000 +0200
@@ -28,7 +28,7 @@
void UsersTable_delete(UsersTable* this);
-char* UsersTable_getRef(UsersTable* this, int uid);
+char* UsersTable_getRef(UsersTable* this, unsigned int uid);
inline int UsersTable_size(UsersTable* this);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org