<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/unixtop/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/unixtop/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 15 Jan 2017 12:15:57 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/unixtop/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>Fixed segmentation fault in batch mode when window size is changed</title><link>https://sourceforge.net/p/unixtop/patches/22/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When top is running in batch mode in a terminal for example 'top -b -d 10', it crashes if changes the window size.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">WHR</dc:creator><pubDate>Sun, 15 Jan 2017 12:15:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netb05a0dcc48df62ba609051e3470f24da9f11c9fc</guid></item><item><title>Dragofly Support</title><link>https://sourceforge.net/p/unixtop/patches/21/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;attached is a patch that will add support for Dragonfly BSD. For this to work you will also need to upgrade config.guess and config.sub to the latest versions (not part of the patch).&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 21 Nov 2009 20:24:01 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net35be12f559f98f62c7d350c0d4d733a6546a508c</guid></item><item><title>Minor changes to fix compiler warnings</title><link>https://sourceforge.net/p/unixtop/patches/20/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;My development environment compiles on Linux for a few architectures, and fails if there are any warnings.  These are the changes required to satisfy all of the compilers (all warnings were valid).&lt;/p&gt;
&lt;p&gt;I also added #ifdefs to complete the removal of code not needed when building without colors or kill.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 05 Aug 2008 19:38:26 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netd56e51dad4d83b9a6883be1ba22b81d77b52f08b</guid></item><item><title>netbsd fixes</title><link>https://sourceforge.net/p/unixtop/patches/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;1. 'renice x' command causes coredump [fix]&lt;br /&gt;
2. allow sub-second delays [enhancement]&lt;br /&gt;
3. add per-cpu state statistics [enhancement]&lt;br /&gt;
4. new netbsd module that supports threads [enhancement]&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 16 Jul 2008 14:42:57 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net582428e06278ca6894d9bc0ff44152943a79b06a</guid></item><item><title>Patch for WERASE (^W) in readline()</title><link>https://sourceforge.net/p/unixtop/patches/18/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I tried to use ^W in readline mode, but it didn't work.&lt;br /&gt;
I'm quite addicted to ^W, so I patched it :)&lt;/p&gt;
&lt;p&gt;(Patched on v3.5beta12 (FreeBSD 6.3))&lt;br /&gt;
It also seems to work on FreeBSD CURRENT (8.0) (also v3.5beta12 someone just said)&lt;br /&gt;
(I will upgrade FreeBSD to the newest top, I think)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Quis</dc:creator><pubDate>Mon, 07 Apr 2008 12:49:12 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net9671cb3ade2afbab304172651baf93e5fd168feb</guid></item><item><title>Fix warnings emitted when compiled with gcc -W flags</title><link>https://sourceforge.net/p/unixtop/patches/17/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When buiding top with the gcc flag -Wwrite-strings lots of warnings are generated.   The attached patch makes function arguments and structure members const where string literals are used and where it appears functions should not modify those values.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Sun, 10 Feb 2008 18:52:05 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net1b66b6b57d03ab43e8fbac7316c74f7051756df1</guid></item><item><title>SCO unix or unix ware</title><link>https://sourceforge.net/p/unixtop/patches/16/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;From mbfe  Thu Nov 16 10:27:48 2006&lt;br /&gt;
Return-Path: mbfe&lt;br /&gt;
Received: (from mbfe@localhost) by syyhxezf.syyhxezf (8.12.9 w/patch for CAN-2003-0694/UW7.1.3) id kAG2Rmnc013&lt;/p&gt;
&lt;p&gt;061 for bill@lefebvre.org; Thu, 16 Nov 2006 10:27:48 +0800 (GMT+0800)&lt;br /&gt;
Message-Id: &amp;lt;200611160227.kAG2Rmnc013061@syyhxezf.syyhxezf&amp;gt;&lt;br /&gt;
From: mbfe@syyhxezf.syyhxezf&lt;br /&gt;
To: bill@lefebvre.org&lt;br /&gt;
Date: Thu, 16 Nov 2006 10:27 GMT&lt;br /&gt;
Subject: sysv5UnixWare7.1.1&lt;br /&gt;
Mime-Version: 1.0&lt;br /&gt;
Content-Type: text/plain; charset=ISO-8859-1&lt;/p&gt;
&lt;p&gt;UnixWare syyhxezf 5 7.1.1 i386 x86at SCO UNIX_SVR5&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 16 Nov 2006 02:33:11 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net0e070aeae0d9855cb91065e3335259a21af8e594</guid></item><item><title>crash on OSF1/Tru64</title><link>https://sourceforge.net/p/unixtop/patches/15/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;OS:&lt;br /&gt;
﻿OSF1 deh12 V5.1 2650 alpha&lt;/p&gt;
&lt;p&gt;Problem:&lt;br /&gt;
top crashes after running a couple hours.&lt;/p&gt;
&lt;p&gt;From dbx:&lt;/p&gt;
&lt;p&gt;﻿signal Segmentation fault at &lt;br /&gt;
[do_threads_calculations:890 +0xc,0x12000eb6c] &lt;br /&gt;
Source not available&lt;br /&gt;
(dbx) where&lt;br /&gt;
&amp;gt;  0 do_threads_calculations(thisproc = 0x140661318) &lt;br /&gt;
["machine/m_decosf1.c":890, 0x12000eb6c]&lt;br /&gt;
1 get_process_info(si = 0x11fffbdb8, sel = &lt;br /&gt;
0x11fffbcd0, compare_index = 0) &lt;br /&gt;
["machine/m_decosf1.c":482, 0x12000ded0]&lt;br /&gt;
2 main( = 0, argc = 1, argv = 0x11fffc018) &lt;br /&gt;
["top.c":708, 0x12000b000]&lt;/p&gt;
&lt;p&gt;We tried to debug it, and came up with the following &lt;br /&gt;
patch:&lt;/p&gt;
&lt;p&gt;﻿# diff m_decosf1.c.orig m_decosf1.c&lt;br /&gt;
886c886,888&lt;br /&gt;
&amp;lt;       (void) task_threads(thistask, &amp;amp;threadarr, &lt;br /&gt;
&amp;amp;threadarr_l);&lt;br /&gt;
---&lt;br /&gt;
&amp;gt;       if (task_threads(thistask, &amp;amp;threadarr, &lt;br /&gt;
&amp;amp;threadarr_l) != KERN_SUCCESS)&lt;br /&gt;
&amp;gt;       return;&lt;br /&gt;
﻿&lt;br /&gt;
The same check is present in m_macosx.c (also a Mach-&lt;br /&gt;
based kernel).&lt;/p&gt;
&lt;p&gt;Please review and apply.&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;Derkjan de Haan&lt;br /&gt;
haanjdj@xs4all.nl&lt;/p&gt;
&lt;p&gt;Onno v/d Linden&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 26 Jul 2006 11:59:15 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net153e4ec90746dd3208014ee8573b2ae9ba223551</guid></item><item><title>Solaris CPU stats problems (fix for 2/3)</title><link>https://sourceforge.net/p/unixtop/patches/14/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've encountered 3 problems with top v3.6 on Solaris&lt;br /&gt;
and I'm including fixes for 2 of them.&lt;/p&gt;
&lt;p&gt;Before v3.6 (good):&lt;br /&gt;
-------------------&lt;br /&gt;
foo.bar:/u/woodd &amp;gt; top -b 3&lt;br /&gt;
...&lt;br /&gt;
PID USERNAME THR PRI NICE  SIZE   RES STATE    TIME&lt;br /&gt;
CPU COMMAND&lt;br /&gt;
3771 sybase   259  20    0   15G   12G cpu/3  181.6H&lt;br /&gt;
21.21% dataserver&lt;br /&gt;
3770 sybase   259  20    0   15G   12G cpu/2  178.4H&lt;br /&gt;
19.50% dataserver&lt;br /&gt;
3769 sybase   259  20    0   15G   12G cpu/1  175.8H&lt;br /&gt;
18.77% dataserver&lt;/p&gt;
&lt;p&gt;After v3.6 (bad):&lt;br /&gt;
-----------------&lt;br /&gt;
PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME&lt;br /&gt;
CPU COMMAND&lt;br /&gt;
3770 sybase   259   0    0   15G   12G cpu    187.3H&lt;br /&gt;
82.95% dataserver&lt;br /&gt;
3769 sybase   259   0    0   15G   12G run    175.8H&lt;br /&gt;
77.26% dataserver&lt;br /&gt;
3771 sybase   259   0    0   15G   12G sleep  181.6H&lt;br /&gt;
60.18% dataserver&lt;/p&gt;
&lt;p&gt;Problems with v3.6:&lt;/p&gt;
&lt;p&gt;1) The CPU number of the running process is no longer&lt;br /&gt;
displayed.&lt;/p&gt;
&lt;p&gt;2) CPU percentages are no longer calculated as a&lt;br /&gt;
fraction of total available computing resources.&lt;/p&gt;
&lt;p&gt;3) The CPU percentages for the first update are always&lt;br /&gt;
zero.  This wreaks havoc with scripts that depend on&lt;br /&gt;
"top -b".&lt;/p&gt;
&lt;p&gt;Problem #1 is caused by cpucount never being set.&lt;/p&gt;
&lt;p&gt;Problem #2 is caused by this change in v3.6:&lt;/p&gt;
&lt;p&gt;/* kernels 5.4 and above track pctcpu in the proc&lt;br /&gt;
structure,&lt;br /&gt;
but the results are less than desirable, so we&lt;br /&gt;
continue to&lt;br /&gt;
pretend that they don't and just calculate it on our own&lt;br /&gt;
*/&lt;br /&gt;
#if (OSREV &amp;gt;= 54)&lt;br /&gt;
/* #define PROC_HAS_PCTCPU */&lt;br /&gt;
#endif&lt;/p&gt;
&lt;p&gt;I ran out of time and haven't pursued problem #3.&lt;/p&gt;
&lt;p&gt;Fixes for problems #1 and #2:&lt;br /&gt;
-----------------------------&lt;br /&gt;
--- m_sunos5.c  9 Apr 2006 05:18:31 -0000       1.1.1.8&lt;br /&gt;
+++ m_sunos5.c  27 Apr 2006 03:59:17 -0000&lt;br /&gt;
@@ -297,7 +297,7 @@&lt;br /&gt;
/* "cpucount" is used to store the value for the&lt;br /&gt;
kernel variable "ncpus".&lt;br /&gt;
But since &amp;lt;sys/cpuvar.h&amp;gt; actually defines a&lt;br /&gt;
variable "ncpus" we need&lt;br /&gt;
to use a different name here.   --wnl */&lt;br /&gt;
-static int cpucount;&lt;br /&gt;
+static int cpucount = 1;&lt;/p&gt;
&lt;p&gt;/* these are for keeping track of the proc array */&lt;br /&gt;
static struct prpsinfo *pbase;&lt;br /&gt;
@@ -811,6 +811,7 @@&lt;br /&gt;
cpu_num * sizeof(unsigned int)&lt;br /&gt;
* CPUSTATES);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;+    cpucount = cpu_num;&lt;br /&gt;
cpu_stat_p = cpu_stat;&lt;br /&gt;
cp_stats_p = cp_stats;&lt;br /&gt;
for (i = 0; i &amp;lt; cpu_num; i++)&lt;br /&gt;
@@ -1513,7 +1514,7 @@&lt;br /&gt;
percent_cpu (currproc) =&lt;br /&gt;
((currproc-&amp;gt;pr_time.tv_sec * 1.0e9 +&lt;br /&gt;
currproc-&amp;gt;pr_time.tv_nsec)&lt;br /&gt;
-                    - op-&amp;gt;oldtime) / timediff;&lt;br /&gt;
+                    - op-&amp;gt;oldtime) / timediff / cpucount;&lt;br /&gt;
#endif&lt;br /&gt;
weighted_cpu (currproc) =&lt;br /&gt;
op-&amp;gt;oldpct * beta + percent_cpu&lt;br /&gt;
(currproc) * alpha;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Wood</dc:creator><pubDate>Thu, 27 Apr 2006 04:04:53 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net3612ee9b2fa927e322cfbd4b4ba93f120b9b3c4a</guid></item><item><title>patch to support common \"linux top\" shortcuts</title><link>https://sourceforge.net/p/unixtop/patches/13/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;With this patch "top" support thoses shortcuts (like&lt;br /&gt;
"standard linux top") :&lt;/p&gt;
&lt;p&gt;N: sort by pid&lt;br /&gt;
P: sort by CPU usage&lt;br /&gt;
M: sort by memory usage&lt;br /&gt;
T: sort by time&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">scresto</dc:creator><pubDate>Fri, 21 Apr 2006 21:08:31 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net0b50e2ac1fb519c5ca16aedf7d89cdc668cf2c85</guid></item></channel></rss>