Dr. Werner Fink 2013-05-29 13:55:21 +00:00 committed by Git OBS Bridge
parent dc63391a7d
commit 48cae9592b
14 changed files with 229 additions and 558 deletions

View File

@ -37,8 +37,16 @@
simple_select = 0; simple_select = 0;
sort_list = NULL; sort_list = NULL;
--- ps/output.c --- ps/output.c
+++ ps/output.c 2012-06-01 15:40:35.160510179 +0000 +++ ps/output.c 2013-05-29 11:17:11.345438367 +0000
@@ -471,11 +471,11 @@ static int pr_etimes(char *restrict cons @@ -128,6 +128,7 @@ static int sr_ ## NAME (const proc_t* P,
#define cook_time(P) (P->utime + P->stime) / Hertz
#define cook_etime(P) (((unsigned long long)seconds_since_boot >= (P->start_time / Hertz)) ? ((unsigned long long)seconds_since_boot - (P->start_time / Hertz)) : 0)
+#define cook_jtime(P) (((unsigned long long)jiffies_since_boot >= (P->start_time / Hertz)) ? ((unsigned long long)jiffies_since_boot - (P->start_time / Hertz)) : 0)
#define CMP_COOKED_TIME(NAME) \
static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
@@ -477,11 +478,11 @@ static int pr_etimes(char *restrict cons
static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){ static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */ unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 99 means 99% */ unsigned pcpu = 0; /* scaled %cpu, 99 means 99% */
@ -46,14 +54,14 @@
+ unsigned long long jiffies; /* jiffies of process life */ + unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime; total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime); if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz; - seconds = cook_etime(pp);
- if(seconds) pcpu = (total_time * 100ULL / Hertz) / seconds; - if(seconds) pcpu = (total_time * 100ULL / Hertz) / seconds;
+ jiffies = jiffies_since_boot - pp->start_time; + jiffies = cook_jtime(pp);
+ if(jiffies) pcpu = (total_time * 100ULL) / jiffies; + if(jiffies) pcpu = (total_time * 100ULL / Hertz) / jiffies;
if (pcpu > 99U) pcpu = 99U; if (pcpu > 99U) pcpu = 99U;
return snprintf(outbuf, COLWID, "%2u", pcpu); return snprintf(outbuf, COLWID, "%2u", pcpu);
} }
@@ -483,24 +483,24 @@ static int pr_c(char *restrict const out @@ -489,11 +490,11 @@ static int pr_c(char *restrict const out
static int pr_pcpu(char *restrict const outbuf, const proc_t *restrict const pp){ static int pr_pcpu(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */ unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */ unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
@ -61,17 +69,14 @@
+ unsigned long long jiffies; /* jiffies of process life */ + unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime; total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime); if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz; - seconds = cook_etime(pp);
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds; - if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
- if (pcpu > 999U) + jiffies = cook_jtime(pp);
- return snprintf(outbuf, COLWID, "%u", pcpu/10U); + if(jiffies) pcpu = (total_time * 1000ULL / Hertz) / jiffies;
+ jiffies = jiffies_since_boot - pp->start_time; if (pcpu > 999U)
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies; return snprintf(outbuf, COLWID, "%u", pcpu/10U);
+ if (pcpu/10U >= 100U) /* do not confuse the user by scale effects */
+ return snprintf(outbuf, COLWID, "100");
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U); return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
} @@ -502,11 +503,11 @@ static int pr_pcpu(char *restrict const
/* this is a "per-mill" format, like %cpu with no decimal point */
static int pr_cp(char *restrict const outbuf, const proc_t *restrict const pp){ static int pr_cp(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */ unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */ unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
@ -79,10 +84,10 @@
+ unsigned long long jiffies; /* jiffies of process life */ + unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime; total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime); if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz ; - seconds = cook_etime(pp);
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds; - if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
+ jiffies = jiffies_since_boot - pp->start_time; + jiffies = cook_jtime(pp);
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies; + if(jiffies) pcpu = (total_time * 1000ULL / Hertz) / jiffies;
if (pcpu > 999U) pcpu = 999U; if (pcpu > 999U) pcpu = 999U;
return snprintf(outbuf, COLWID, "%3u", pcpu); return snprintf(outbuf, COLWID, "%3u", pcpu);
} }

View File

@ -37,8 +37,8 @@
/* These are the symbol types, with relative popularity: /* These are the symbol types, with relative popularity:
--- proc/sysinfo.c --- proc/sysinfo.c
+++ proc/sysinfo.c 2012-06-04 10:03:34.464009483 +0000 +++ proc/sysinfo.c 2013-05-29 11:26:47.797640941 +0000
@@ -36,8 +36,6 @@ @@ -37,8 +37,6 @@
#include <netinet/in.h> /* htons */ #include <netinet/in.h> /* htons */
#endif #endif
@ -47,7 +47,7 @@
#define BAD_OPEN_MESSAGE \ #define BAD_OPEN_MESSAGE \
"Error: /proc must be mounted\n" \ "Error: /proc must be mounted\n" \
" To mount /proc at boot you need an /etc/fstab line like:\n" \ " To mount /proc at boot you need an /etc/fstab line like:\n" \
@@ -196,7 +194,7 @@ static void old_Hertz_hack(void){ @@ -200,7 +198,7 @@ static void old_Hertz_hack(void){
free(savelocale); free(savelocale);
jiffies = user_j + nice_j + sys_j + other_j + wait_j + hirq_j + sirq_j + stol_j ; jiffies = user_j + nice_j + sys_j + other_j + wait_j + hirq_j + sirq_j + stol_j ;
seconds = (up_1 + up_2) / 2; seconds = (up_1 + up_2) / 2;
@ -56,16 +56,16 @@
/* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */ /* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */
switch(h){ switch(h){
case 9 ... 11 : Hertz = 10; break; /* S/390 (sometimes) */ case 9 ... 11 : Hertz = 10; break; /* S/390 (sometimes) */
@@ -267,8 +265,6 @@ static void init_libproc(void){ @@ -271,8 +269,6 @@ static void init_libproc(void){
have_privs = check_for_privs(); have_privs = check_for_privs();
init_Linux_version(); /* Must be called before we check code */ init_Linux_version(); /* Must be called before we check code */
- cpuinfo(); - cpuinfo();
- -
#ifdef __linux__ #ifdef __linux__
if(linux_version_code > LINUX_VERSION(2, 4, 0)){ if(linux_version_code > LINUX_VERSION(2, 4, 0)){
Hertz = find_elf_note(AT_CLKTCK); Hertz = find_elf_note(AT_CLKTCK);
@@ -1008,7 +1004,12 @@ out: @@ -1012,7 +1008,12 @@ out:
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@ -79,7 +79,7 @@
// ought to count CPUs in /proc/stat instead of relying // ought to count CPUs in /proc/stat instead of relying
// on glibc, which foolishly tries to parse /proc/cpuinfo // on glibc, which foolishly tries to parse /proc/cpuinfo
// note: that may have been the case but now /proc/stat // note: that may have been the case but now /proc/stat
@@ -1020,7 +1021,9 @@ void cpuinfo (void) { @@ -1024,7 +1025,9 @@ void cpuinfo (void) {
// _SC_NPROCESSORS_CONF returns 2, resulting in HZ=512 // _SC_NPROCESSORS_CONF returns 2, resulting in HZ=512
// _SC_NPROCESSORS_ONLN returns 1, which should work OK // _SC_NPROCESSORS_ONLN returns 1, which should work OK
@ -112,8 +112,8 @@
EXTERN_C_END EXTERN_C_END
#endif /* SYSINFO_H */ #endif /* SYSINFO_H */
--- top/top.c --- top/top.c
+++ top/top.c 2012-10-30 11:16:32.138345792 +0000 +++ top/top.c 2013-05-29 11:28:34.945439635 +0000
@@ -370,7 +370,7 @@ static void bye_bye (const char *str) { @@ -411,7 +411,7 @@ static void bye_bye (const char *str) {
, LINUX_VERSION_PATCH(linux_version_code) , LINUX_VERSION_PATCH(linux_version_code)
, procps_version , procps_version
, (unsigned)Hertz, (unsigned)sizeof(Hertz), (unsigned)sizeof(Hertz) * 8 , (unsigned)Hertz, (unsigned)sizeof(Hertz), (unsigned)sizeof(Hertz) * 8
@ -122,7 +122,7 @@
, (unsigned)sizeof(HST_t), Page_size / (unsigned)sizeof(HST_t), HHist_siz , (unsigned)sizeof(HST_t), Page_size / (unsigned)sizeof(HST_t), HHist_siz
, (unsigned)sizeof(proc_t), (unsigned)sizeof(p->cmd), (unsigned)sizeof(proc_t*) , (unsigned)sizeof(proc_t), (unsigned)sizeof(p->cmd), (unsigned)sizeof(proc_t*)
, (long)Frames_libflags , (long)Frames_libflags
@@ -1896,7 +1896,7 @@ static void zap_fieldstab (void) { @@ -2230,7 +2230,7 @@ static void zap_fieldstab (void) {
/*** hotplug_acclimated ***/ /*** hotplug_acclimated ***/
Fieldstab[P_CPN].width = 1; Fieldstab[P_CPN].width = 1;
@ -131,8 +131,8 @@
if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt)); if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt));
Fieldstab[P_CPN].width = digits; Fieldstab[P_CPN].width = digits;
} }
@@ -1904,9 +1904,9 @@ static void zap_fieldstab (void) { @@ -2238,9 +2238,9 @@ static void zap_fieldstab (void) {
#ifdef PERCENTBOOST #ifdef BOOST_PERCNT
Cpu_pmax = 99.9; Cpu_pmax = 99.9;
Fieldstab[P_CPU].width = 5; Fieldstab[P_CPU].width = 5;
- if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) { - if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
@ -144,7 +144,7 @@
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0; if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
} else { } else {
if (Cpu_pmax > 999.9) Cpu_pmax = 999.9; if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
@@ -1915,9 +1915,9 @@ static void zap_fieldstab (void) { @@ -2249,9 +2249,9 @@ static void zap_fieldstab (void) {
#else #else
Cpu_pmax = 99.9; Cpu_pmax = 99.9;
Fieldstab[P_CPU].width = 4; Fieldstab[P_CPU].width = 4;
@ -157,16 +157,27 @@
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0; if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
} else { } else {
if (Cpu_pmax > 999.9) Cpu_pmax = 999.9; if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
@@ -1997,7 +1997,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus) @@ -2294,8 +2294,8 @@ static void zap_fieldstab (void) {
* cpus[sumSLOT] == tics from the 1st /proc/stat line
* [ and beyond sumSLOT == tics for each cpu NUMA node ] */
static CPU_t *cpus_refresh (CPU_t *cpus) {
- #define sumSLOT ( smp_num_cpus )
- #define totSLOT ( 1 + smp_num_cpus + Numa_node_tot)
+ #define sumSLOT ( smp_num_cpus() )
+ #define totSLOT ( 1 + smp_num_cpus() + Numa_node_tot)
static FILE *fp = NULL;
static int siz, sav_slot = -1;
static char *buf;
@@ -2358,7 +2358,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus)
we'll force it to be treated as 'idle' so as not to present misleading we'll force it to be treated as 'idle' so as not to present misleading
percentages. */ percentages. */
cpus[Cpu_faux_tot].edge = cpus[sumSLOT].edge =
- ((cpus[Cpu_faux_tot].cur.tot - cpus[Cpu_faux_tot].sav.tot) / smp_num_cpus) / (100 / TICS_EDGE); - ((cpus[sumSLOT].cur.tot - cpus[sumSLOT].sav.tot) / smp_num_cpus) / (100 / TICS_EDGE);
+ ((cpus[Cpu_faux_tot].cur.tot - cpus[Cpu_faux_tot].sav.tot) / smp_num_cpus()) / (100 / TICS_EDGE); + ((cpus[sumSLOT].cur.tot - cpus[sumSLOT].sav.tot) / smp_num_cpus()) / (100 / TICS_EDGE);
#endif #endif
// now value each separate cpu's tics, maybe
for (i = 0; i < Cpu_faux_tot && i < Screen_rows; i++) { #ifndef NUMA_DISABLE
@@ -2102,7 +2102,7 @@ static void procs_hlp (proc_t *this) { @@ -2496,7 +2496,7 @@ static void procs_hlp (proc_t *this) {
oldtimev.tv_usec = timev.tv_usec; oldtimev.tv_usec = timev.tv_usec;
// if in Solaris mode, adjust our scaling for all cpus // if in Solaris mode, adjust our scaling for all cpus
@ -175,26 +186,47 @@
#ifdef OFF_HST_HASH #ifdef OFF_HST_HASH
maxt_sav = Frame_maxtask; maxt_sav = Frame_maxtask;
#endif #endif
@@ -2255,8 +2255,7 @@ static void sysinfo_refresh (int forced) @@ -2649,8 +2649,7 @@ static void sysinfo_refresh (int forced)
#ifndef PRETEND4CPUS #ifndef PRETEND8CPUS
/*** hotplug_acclimated ***/ /*** hotplug_acclimated ***/
if (300 <= cur_secs - cpu_secs) { if (300 <= cur_secs - cpu_secs) {
- cpuinfo(); - cpuinfo();
- Cpu_faux_tot = smp_num_cpus; - Cpu_faux_tot = smp_num_cpus;
+ Cpu_faux_tot = smp_num_cpus(); + Cpu_faux_tot = smp_num_cpus();
cpu_secs = cur_secs; cpu_secs = cur_secs;
} #ifndef NUMA_DISABLE
#endif if (Libnuma_handle)
@@ -2285,10 +2284,10 @@ static void before (char *me) { @@ -3219,9 +3219,8 @@ static void before (char *me) {
initialize_nls();
// establish cpu particulars // establish cpu particulars
+ Cpu_faux_tot = smp_num_cpus(); #ifdef PRETEND8CPUS
#ifdef PRETEND4CPUS - smp_num_cpus = 8;
- smp_num_cpus = 4; + Cpu_faux_tot = 8;
+ Cpu_faux_tot = 4;
#endif #endif
- Cpu_faux_tot = smp_num_cpus; - Cpu_faux_tot = smp_num_cpus;
Cpu_States_fmts = N_unq(STATE_lin2x4_fmt); Cpu_States_fmts = N_unq(STATE_lin2x4_fmt);
if (linux_version_code > LINUX_VERSION(2, 5, 41)) if (linux_version_code > LINUX_VERSION(2, 5, 41))
Cpu_States_fmts = N_unq(STATE_lin2x5_fmt); Cpu_States_fmts = N_unq(STATE_lin2x5_fmt);
@@ -5020,19 +5019,19 @@ static void summary_show (void) {
if (CHKw(w, View_CPUNOD)) {
if (Numa_node_sel < 0) {
// display the 1st /proc/stat line, then the nodes (if room)
- summary_hlp(&smpcpu[smp_num_cpus], N_txt(WORD_allcpus_txt));
+ summary_hlp(&smpcpu[smp_num_cpus()], N_txt(WORD_allcpus_txt));
Msg_row += 1;
// display each cpu node's states
for (i = 0; i < Numa_node_tot; i++) {
if (!isROOM(anyFLG, 1)) break;
snprintf(tmp, sizeof(tmp), N_fmt(NUMA_nodenam_fmt), i);
- summary_hlp(&smpcpu[1 + smp_num_cpus + i], tmp);
+ summary_hlp(&smpcpu[1 + smp_num_cpus() + i], tmp);
Msg_row += 1;
}
} else {
// display the node summary, then the associated cpus (if room)
snprintf(tmp, sizeof(tmp), N_fmt(NUMA_nodenam_fmt), Numa_node_sel);
- summary_hlp(&smpcpu[1 + smp_num_cpus + Numa_node_sel], tmp);
+ summary_hlp(&smpcpu[1 + smp_num_cpus() + Numa_node_sel], tmp);
Msg_row += 1;
for (i = 0; i < Cpu_faux_tot; i++) {
if (Numa_node_sel == smpcpu[i].node) {

View File

@ -7,13 +7,19 @@ disconnect top finishes which is not what one would expect.
Index: procps-3.2.8/top.c Index: procps-3.2.8/top.c
--- top/top.c --- top/top.c
+++ top/top.c 2012-06-04 10:13:48.576010662 +0000 +++ top/top.c 2013-05-29 13:44:08.245439364 +0200
@@ -2147,6 +2147,8 @@ static void before (char *me) { @@ -3268,7 +3268,13 @@ static void before (char *me) {
sigemptyset(&sa.sa_mask); sa.sa_flags = 0;
sa.sa_flags = SA_RESTART;
for (i = SIGRTMAX; i; i--) { for (i = SIGRTMAX; i; i--) {
+ if (Batch && i == SIGHUP)
+ continue;
switch (i) { switch (i) {
case SIGALRM: case SIGHUP: case SIGINT: - case SIGALRM: case SIGHUP: case SIGINT:
+ case SIGHUP:
+ if (Batch)
+ sa.sa_handler = SIG_IGN;
+ else
+ sa.sa_handler = sig_endpgm;
+ break;
+ case SIGALRM: case SIGINT:
case SIGPIPE: case SIGQUIT: case SIGTERM: case SIGPIPE: case SIGQUIT: case SIGTERM:
case SIGUSR1: case SIGUSR2:
sa.sa_handler = sig_endpgm;

View File

@ -0,0 +1,23 @@
--- top/top.c
+++ top/top.c 2013-05-29 11:57:32.849439427 +0000
@@ -1496,9 +1496,9 @@ static inline const char *make_str (cons
static const char *scale_mem (int target, unsigned long num, int width, int justr) {
#ifndef NOBOOST_MEMS
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
- static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL };
+ static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL };
#else
- static const char *fmttab[] = { "%.0f", "%.0f%c", "%.0f%c", "%.0f%c", "%.0f%c", NULL };
+ static const char *fmttab[] = { "%.0f", "%.0f%c", "%.0f%c", "%.0f%c", "%.0f%c", "%.0f%c", NULL };
#endif
static char buf[SMLBUFSIZ];
float scaled_num;
@@ -1510,7 +1510,7 @@ static const char *scale_mem (int target
goto end_justifies;
scaled_num = num;
- for (i = SK_Kb, psfx = Scaled_sfxtab; i < SK_Eb; psfx++, i++) {
+ for (i = SK_Kb, psfx = Scaled_sfxtab; i <= SK_Eb; psfx++, i++) {
if (i >= target
&& (width >= snprintf(buf, sizeof(buf), fmttab[i], scaled_num, *psfx)))
goto end_justifies;

View File

@ -1,15 +1,15 @@
--- proc/readproc.c --- proc/readproc.c
+++ proc/readproc.c 2012-06-01 15:00:43.848010122 +0000 +++ proc/readproc.c 2013-05-29 10:55:48.129939330 +0000
@@ -527,7 +527,7 @@ static int file2str(const char *director @@ -544,7 +544,7 @@ static int file2str(const char *director
int fd, num_read; if (ub->buf) ub->buf[0] = '\0';
else ub->buf = xcalloc((ub->siz = buffGRW));
sprintf(filename, "%s/%s", directory, what); sprintf(path, "%s/%s", directory, what);
- fd = open(filename, O_RDONLY, 0); - if (-1 == (fd = open(path, O_RDONLY, 0))) return -1;
+ fd = open(filename, O_RDONLY, O_NOATIME); + if (-1 == (fd = open(path, O_RDONLY, O_NOATIME))) return -1;
if(unlikely(fd==-1)) return -1; while (0 < (num = read(fd, ub->buf + tot_read, ub->siz - tot_read))) {
num_read = read(fd, ret, cap - 1); tot_read += num;
close(fd); if (tot_read < ub->siz) break;
@@ -538,41 +538,42 @@ static int file2str(const char *director @@ -559,41 +559,42 @@ static int file2str(const char *director
static char** file2strvec(const char* directory, const char* what) { static char** file2strvec(const char* directory, const char* what) {
char buf[2048]; /* read buf bytes at a time */ char buf[2048]; /* read buf bytes at a time */
@ -74,7 +74,7 @@
endbuf = rbuf + tot; /* count space for pointers */ endbuf = rbuf + tot; /* count space for pointers */
align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1)); align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1));
for (c = 0, p = rbuf; p < endbuf; p++) { for (c = 0, p = rbuf; p < endbuf; p++) {
@@ -605,7 +606,7 @@ static int read_unvectored(char *restric @@ -626,7 +627,7 @@ static int read_unvectored(char *restric
unsigned n = 0; unsigned n = 0;
snprintf(path, sizeof(path), "%s/%s", whom, what); snprintf(path, sizeof(path), "%s/%s", whom, what);

View File

@ -1,5 +1,5 @@
--- ps/Makefile.am --- ps/Makefile.am
+++ ps/Makefile.am 2012-06-04 12:35:28.896510496 +0000 +++ ps/Makefile.am 2013-05-29 11:00:12.549939319 +0000
@@ -3,7 +3,7 @@ AM_CPPFLAGS = \ @@ -3,7 +3,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \ -I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\" -DLOCALEDIR=\"$(localedir)\"
@ -7,20 +7,19 @@
-AM_LDFLAGS = ../proc/libprocps.la -AM_LDFLAGS = ../proc/libprocps.la
+AM_LDFLAGS = ../proc/libprocps.la -ldl +AM_LDFLAGS = ../proc/libprocps.la -ldl
dist_man_MANS = ps.1 if WITH_SYSTEMD
AM_LDFLAGS += @SYSTEMD_LIBS@
--- ps/output.c --- ps/output.c
+++ ps/output.c 2012-06-01 15:20:53.892510827 +0000 +++ ps/output.c 2013-05-29 11:02:06.109939431 +0000
@@ -1164,7 +1164,7 @@ static int pr_sgi_p(char *restrict const @@ -1282,6 +1282,7 @@ fail:
/****************** FLASK & seLinux security stuff **********************/ /****************** FLASK & seLinux security stuff **********************/
// move the bulk of this to libproc sometime // move the bulk of this to libproc sometime
-
+#if 0 +#if 0
static int pr_context(char *restrict const outbuf, const proc_t *restrict const pp){ static int pr_context(char *restrict const outbuf, const proc_t *restrict const pp){
char filename[48]; char filename[48];
size_t len; size_t len;
@@ -1193,7 +1193,7 @@ fail: @@ -1310,7 +1311,7 @@ fail:
return 1; return 1;
} }
@ -30,8 +29,8 @@
// 1. the static linking option (maybe disable this in that case) // 1. the static linking option (maybe disable this in that case)
// 2. the -z and -Z option issue // 2. the -z and -Z option issue
--- ps/parser.c --- ps/parser.c
+++ ps/parser.c 2012-06-01 15:21:29.632010485 +0000 +++ ps/parser.c 2013-05-29 10:57:34.177440830 +0000
@@ -230,7 +230,7 @@ static const char *parse_sysv_option(voi @@ -238,7 +238,7 @@ static const char *parse_sysv_option(voi
// In the meantime, please do not add to it. The list is // In the meantime, please do not add to it. The list is
// intended to ONLY contain flags defined by the POSIX and UNIX // intended to ONLY contain flags defined by the POSIX and UNIX
// standards published by The Open Group, IEEE, and ISO. // standards published by The Open Group, IEEE, and ISO.
@ -53,8 +52,8 @@
user\-defined format. Identical to user\-defined format. Identical to
.B \-o .B \-o
--- w.c --- w.c
+++ w.c 2012-06-01 15:23:59.596010373 +0000 +++ w.c 2013-05-29 10:57:34.349888215 +0000
@@ -235,6 +235,12 @@ static const proc_t *getproc(const utmp_ @@ -356,6 +356,12 @@ static const proc_t *getproc(const utmp_
continue; continue;
best = tmp; best = tmp;
} }

View File

@ -1,6 +1,6 @@
--- configure.ac --- configure.ac
+++ configure.ac 2012-06-04 10:57:01.592841076 +0000 +++ configure.ac 2013-05-29 13:25:27.693939536 +0000
@@ -170,9 +170,17 @@ else @@ -137,9 +137,17 @@ else
else else
WATCH_NCURSES_LIBS="$NCURSES_LIBS" WATCH_NCURSES_LIBS="$NCURSES_LIBS"
fi fi
@ -16,8 +16,8 @@
AC_SUBST([WATCH_NCURSES_LIBS]) AC_SUBST([WATCH_NCURSES_LIBS])
+AC_SUBST([TOP_NCURSES_LIBS]) +AC_SUBST([TOP_NCURSES_LIBS])
AC_ARG_ENABLE([kill], AC_ARG_WITH([systemd],
AS_HELP_STRING([--disable-kill], [do not build kill]), [AS_HELP_STRING([--with-systemd], [enable systemd support])],
--- top/Makefile.am --- top/Makefile.am
+++ top/Makefile.am 2012-06-04 10:58:15.024104602 +0000 +++ top/Makefile.am 2012-06-04 10:58:15.024104602 +0000
@@ -19,7 +19,7 @@ top_SOURCES = \ @@ -19,7 +19,7 @@ top_SOURCES = \

View File

@ -0,0 +1,45 @@
--- top/top.1
+++ top/top.1 2013-05-29 10:50:57.169939440 +0000
@@ -9,7 +9,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])
.
@@ -32,11 +32,11 @@
.ds F \fIOff\fR
.ds O \fIOn\fR
.
-.ds AK asterisk (\'*\')
+.ds AK asterisk ('*')
.ds AM alternate\-display mode
.ds AS auxiliary storage
.ds CF configuration file
-.ds CG \'current\' window/field group
+.ds CG 'current' window/field group
.ds CI interactive command
\# - Note: our 'Command Line' used in 2 places
\# ( and managed to fit in an 80x24 terminal )
@@ -44,7 +44,7 @@
\-\fBu\fR|\fBU\fR user \-\fBp\fR pid \-\fBo\fR fld \-\fBw\fR [cols] \fR
.ds CO command\-line option
.ds CT command toggle
-.ds CW \'current\' window
+.ds CW 'current' window
.ds FG field group
.ds FM full\-screen mode
.ds KA arrow key
@@ -1578,8 +1578,8 @@ It does not require that the window name
.IP "*" 3
The \*(CIs shown with an \*(AK have use beyond \*(AM.
.Bd -literal -compact
- \'=', 'A', 'g' are always available
- \'a', 'w' act the same with color mapping
+ '=', 'A', 'g' are always available
+ 'a', 'w' act the same with color mapping
\ and fields management
.Ed

View File

@ -1,8 +1,8 @@
--- configure.ac --- configure.ac
+++ configure.ac 2012-06-04 13:33:19.308509976 +0000 +++ configure.ac 2013-05-29 10:45:47.473939111 +0000
@@ -125,7 +125,7 @@ AC_CHECK_FUNCS([\ @@ -69,7 +69,7 @@ AC_FUNC_MMAP
wcwidth AC_FUNC_REALLOC
]) AC_FUNC_STRTOD
-usrbin_execdir='${exec_prefix}/usr/bin' -usrbin_execdir='${exec_prefix}/usr/bin'
+usrbin_execdir='${exec_prefix}/bin' +usrbin_execdir='${exec_prefix}/bin'
@ -10,10 +10,10 @@
AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT_VERSION([0.14.1])
--- proc/libprocps.sym --- proc/libprocps.sym
+++ proc/libprocps.sym 2012-06-04 15:01:39.280509970 +0000 +++ proc/libprocps.sym 2013-05-29 10:46:13.165439719 +0000
@@ -11,6 +11,7 @@ global: @@ -12,6 +12,7 @@ global:
escaped_copy;
free_slabinfo; free_slabinfo;
freeproc;
get_pid_digits; get_pid_digits;
+ get_proc_stats; + get_proc_stats;
get_slabinfo; get_slabinfo;

3
procps-ng-3.3.8.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4109cfb6fe3bcfb5a0efb37efe04d0c8ce858bff3820d48cc258bad41bed46b
size 553056

View File

@ -1,38 +0,0 @@
--- top/top.c
+++ top/top.c 2012-10-30 11:24:24.226345149 +0000
@@ -1283,15 +1283,19 @@ end_justifies:
* SK_Kb (1) it's kilobytes
* SK_Mb (2) it's megabytes
* SK_Gb (3) it's gigabytes
- * SK_Tb (4) it's terabytes */
+ * SK_Tb (4) it's terabytes
+ * SK_Pb (5) it's petabytes
+ * SK_Eb (6) it's exabytes
+ */
static const char *scale_unum (unsigned long num, int type, int width, int justr) {
// kilobytes, megabytes, gigabytes, terabytes, duh!
- static double scale[] = { 1024.0, 1024.0*1024, 1024.0*1024*1024, 1024.0*1024*1024*1024, 0 };
- // kilo, mega, giga, tera, none
+ static double scale[] = { 1024.0, 1024.0*1024, 1024.0*1024*1024, 1024.0*1024*1024*1024,
+ 1024.0*1024*1024*1024*1024, 1024.0*1024*1024*1024*1024*1024, 0 };
+ // kilo, mega, giga, tera, peta, exa, none
#ifdef CASEUP_SUFIX
- static char nextup[] = { 'K', 'M', 'G', 'T', 0 };
+ static char nextup[] = { 'K', 'M', 'G', 'T', 'P', 'E', 0 };
#else
- static char nextup[] = { 'k', 'm', 'g', 't', 0 };
+ static char nextup[] = { 'k', 'm', 'g', 't', 'p', 'e', 0 };
#endif
static char buf[SMLBUFSIZ];
double *dp;
--- top/top.h
+++ top/top.h 2012-10-30 11:23:33.570344292 +0000
@@ -186,7 +186,7 @@ enum pflag {
/* The scaling 'type' used with scale_unum() -- this is how
the passed number is interpreted should scaling be necessary */
enum scale_unum {
- SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb
+ SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb, SK_Pb, SK_Eb
};
/* This typedef just ensures consistent 'process flags' handling */

View File

@ -1,403 +0,0 @@
--- top/top.1
+++ top/top.1 2012-10-30 11:10:06.558844692 +0000
@@ -23,7 +23,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])
.
@@ -46,18 +46,18 @@
.ds F \fIOff\fR
.ds O \fIOn\fR
.
-.ds AK asterisk (\'*\')
+.ds AK asterisk ('*')
.ds AM alternate\-display mode
.ds AS auxiliary storage
.ds CF configuration file
-.ds CG \'current\' window/field group
+.ds CG 'current' window/field group
.ds CI interactive command
\# - Note: our 'Command Line' used in 2 places
.ds CL \-\fBhv\fR|\-\fBbcHiSs\fR \-\fBd\fR delay \-\fBn\fR limit \
\-\fBu\fR|\fBU\fR user \-\fBp\fR pid[,pid] \-\fBw\fR [cols] \fR
.ds CO command\-line option
.ds CT command toggle
-.ds CW \'current\' window
+.ds CW 'current' window
.ds FG field group
.ds FM full\-screen mode
.ds KA arrow key
@@ -854,7 +854,7 @@ Use either of these keys if you have a l
to see current status,
.TP 7
-\ \ \'\fB?\fR\' | \'\fBh\fR\' :\fIHelp \fR
+\ \ '\fB?\fR' | '\fBh\fR' :\fIHelp \fR
There are two help levels available.
The first will provide a reminder of all the basic \*(CIs.
If \*(We is\fI secured\fR, that screen will be abbreviated.
@@ -863,7 +863,7 @@ Typing 'h' or '?' on that help screen wi
those \*(CIs applicable to \*(AM.
.TP 7
-\ \ \'\fB=\fR\' :\fIExit-Task-Limits \fR
+\ \ '\fB=\fR' :\fIExit-Task-Limits \fR
Removes restrictions on which tasks are shown.
This command will reverse any 'i' (idle tasks) and 'n' (max tasks)
commands that might be active.
@@ -879,13 +879,13 @@ vertical and horizontal scrolling.
When operating in \*(AM this command has a broader meaning.
.TP 7
-\ \ \'\fBA\fR\' :\fIAlternate-Display-Mode\fR toggle \fR
+\ \ '\fBA\fR' :\fIAlternate-Display-Mode\fR toggle \fR
This command will switch between \*(FM and \*(AM.
\*(XT 5. ALTERNATE\-DISPLAY Provisions and the 'g' \*(CI for insight
into \*(CWs and \*(FGs.
.TP 7
-\ \ \'\fBB\fR\' :\fIBold-Disable/Enable\fR toggle \fR
+\ \ '\fBB\fR' :\fIBold-Disable/Enable\fR toggle \fR
This command will influence use of the 'bold' terminfo capability and
alters\fB both\fR the \*(SA and \*(TA for the \*(CW.
While it is intended primarily for use with dumb terminals, it can be
@@ -897,7 +897,7 @@ Thus, unless the 'x' and/or 'y' toggles
there will be no visual confirmation that they are even on.
.TP 7
-*\ \'\fBd\fR\' | \'\fBs\fR\' :\fIChange-Delay-Time-interval \fR
+*\ '\fBd\fR' | '\fBs\fR' :\fIChange-Delay-Time-interval \fR
You will be prompted to enter the delay time, in seconds, between
display updates.
@@ -911,26 +911,26 @@ If at any time you wish to know the curr
help and view the system summary on the second line.
.TP 7
-\ \ \'\fBg\fR\' :\fIChoose-Another-Window/Field-Group \fR
+\ \ '\fBg\fR' :\fIChoose-Another-Window/Field-Group \fR
You will be prompted to enter a number between 1 and 4 designating the
\*(FG which should be made the \*(CW.
You will soon grow comfortable with these 4 windows, especially after
experimenting with \*(AM.
.TP 7
-\ \ \'\fBH\fR\' :\fIThreads-mode\fR toggle \fR
+\ \ '\fBH\fR' :\fIThreads-mode\fR toggle \fR
When this toggle is \*O, individual threads will be displayed for all
processes in all visible \*(TWs.
Otherwise, \*(We displays a summation of all threads in each process.
.TP 7
-\ \ \'\fBI\fR\' :\fIIrix/Solaris-Mode\fR toggle \fR
+\ \ '\fBI\fR' :\fIIrix/Solaris-Mode\fR toggle \fR
When operating in 'Solaris mode' ('I' toggled \*F), a task's \*(Pu usage
will be divided by the total number of \*(PUs.
After issuing this command, you'll be told the new state of this toggle.
.TP 7
-*\ \'\fBk\fR\' :\fIKill-a-task \fR
+*\ '\fBk\fR' :\fIKill-a-task \fR
You will be prompted for a PID and then the signal to send.
The default signal, as reflected in the prompt, is SIGTERM.
However, you can send any signal, via number or name.
@@ -941,24 +941,24 @@ depending on your progress:
2) at the signal prompt, type 0
.TP 7
-\ \ \'\fBq\fR\' :\fIQuit \fR
+\ \ '\fBq\fR' :\fIQuit \fR
.TP 7
-*\ \'\fBr\fR\' :\fIRenice-a-Task \fR
+*\ '\fBr\fR' :\fIRenice-a-Task \fR
You will be prompted for a PID and then the value to nice it to.
Entering a positive value will cause a process to lose priority.
Conversely, a negative value will cause a process to be viewed more
favorably by the kernel.
.TP 7
-\ \ \'\fBW\fR\' :\fIWrite-the-Configuration-File \fR
+\ \ '\fBW\fR' :\fIWrite-the-Configuration-File \fR
This will save all of your options and toggles plus the current
display mode and delay time.
By issuing this command just before quitting \*(We, you will be able
restart later in exactly that same state.
.TP 7
-\ \ \'\fBX\fR\' :\fIExtra-Fixed-Width \fR
+\ \ '\fBX\fR' :\fIExtra-Fixed-Width \fR
Some fields are fixed width and not scalable.
As such, they are subject to truncation which would be indicated
by a '+' in the last position.
@@ -988,7 +988,7 @@ these fields are never decreased by \*(W
To narrow them you must specify a smaller number or restore the defaults.
.TP 7
-\ \ \'\fBZ\fR\' :\fIChange-Color-Mapping \fR
+\ \ '\fBZ\fR' :\fIChange-Color-Mapping \fR
This key will take you to a separate screen where you can change the
colors for the \*(CW, or for all windows.
For details regarding this \*(CI \*(Xt 4d. COLOR Mapping.
@@ -1009,12 +1009,12 @@ These commands always impact just the \*
\*(CWs and \*(FGs.
.TP 7
-\ \ \'\fBl\fR\' :\fILoad-Average/Uptime\fR toggle \fR
+\ \ '\fBl\fR' :\fILoad-Average/Uptime\fR toggle \fR
This is also the line containing the program name (possibly an alias)
when operating in \*(FM or the \*(CW name when operating in \*(AM.
.TP 7
-\ \ \'\fBt\fR\' :\fITask/Cpu-States\fR toggle \fR
+\ \ '\fBt\fR' :\fITask/Cpu-States\fR toggle \fR
This command affects from 2 to many \*(SA lines, depending on the state
of the '1' toggle and whether or not \*(We is running under true SMP.
@@ -1022,7 +1022,7 @@ This portion of the \*(SA is also influe
as reflected in the total label which shows either 'Tasks' or 'Threads'.
.TP 7
-\ \ \'\fB1\fR\' :\fISingle/Separate-Cpu-States\fR toggle \fR
+\ \ '\fB1\fR' :\fISingle/Separate-Cpu-States\fR toggle \fR
This command affects how the 't' command's Cpu States portion is shown.
Although this toggle exists primarily to serve massively-parallel SMP
machines, it is not restricted to solely SMP environments.
@@ -1033,7 +1033,7 @@ Otherwise, each \*(Pu is displayed separ
up to available screen height.
.TP 7
-\ \ \'\fBm\fR\' :\fIMemory/Swap-Usage\fR toggle \fR
+\ \ '\fBm\fR' :\fIMemory/Swap-Usage\fR toggle \fR
This command affects the two \*(SA lines dealing with physical
and virtual memory.
@@ -1056,14 +1056,14 @@ The \*(TA \*(CIs are\fB never available\
.B APPEARANCE\fR of \*(TW
.PD 0
.TP 7
-\ \ \'\fBJ\fR\' :\fIJustify-Numeric-Columns\fR toggle \fR
+\ \ '\fBJ\fR' :\fIJustify-Numeric-Columns\fR toggle \fR
Alternates between right-justified (the default) and
left-justified numeric data.
If the numeric data completely fills the available column, this
\*(CT may impact the column header only.
.TP 7
-\ \ \'\fBj\fR\' :\fIJustify-Character-Columns\fR toggle \fR
+\ \ '\fBj\fR' :\fIJustify-Character-Columns\fR toggle \fR
Alternates between left-justified (the default) and
right-justified character data.
If the character data completely fills the available column, this
@@ -1076,12 +1076,12 @@ global 'B' (bold enable) toggle.
.RS -2
.TP 7
-\ \ \'\fBb\fR\' :\fIBold/Reverse\fR toggle \fR
+\ \ '\fBb\fR' :\fIBold/Reverse\fR toggle \fR
This command will impact how the 'x' and 'y' toggles are displayed.
Further, it will only be available when at least one of those toggles is \*O.
.TP 7
-\ \ \'\fBx\fR\' :\fIColumn-Highlight\fR toggle \fR
+\ \ '\fBx\fR' :\fIColumn-Highlight\fR toggle \fR
Changes highlighting for the current sort field.
If you forget which field is being sorted this command can serve as a quick
visual reminder, providing the sort field is being displayed.
@@ -1090,7 +1090,7 @@ The sort field might\fI not\fR be visibl
2) the 'f' \*(CI turned it \*F
.TP 7
-\ \ \'\fBy\fR\' :\fIRow-Highlight\fR toggle \fR
+\ \ '\fBy\fR' :\fIRow-Highlight\fR toggle \fR
Changes highlighting for "running" tasks.
For additional insight into this task state,
\*(Xt 3a. DESCRIPTIONS of Fields, the 'S' field (Process Status).
@@ -1099,7 +1099,7 @@ Use of this provision provides important
The only costs will be a few additional tty escape sequences.
.TP 7
-\ \ \'\fBz\fR\' :\fIColor/Monochrome\fR toggle \fR
+\ \ '\fBz\fR' :\fIColor/Monochrome\fR toggle \fR
Switches the \*(CW between your last used color scheme and the older form
of black-on-white or white-on-black.
This command will alter\fB both\fR the \*(SA and \*(TA but does not affect
@@ -1110,20 +1110,20 @@ the state of the 'x', 'y' or 'b' toggles
.B CONTENT\fR of \*(TW
.PD 0
.TP 7
-\ \ \'\fBc\fR\' :\fICommand-Line/Program-Name\fR toggle \fR
+\ \ '\fBc\fR' :\fICommand-Line/Program-Name\fR toggle \fR
This command will be honored whether or not the 'COMMAND' column
is currently visible.
Later, should that field come into view, the change you applied will be seen.
.TP 7
-\ \ \'\fBf\fR\' | \'\fBF\fR\' :\fIFields-Management \fR
+\ \ '\fBf\fR' | '\fBF\fR' :\fIFields-Management \fR
These keys display a separate screen where you can change which fields are
displayed, their order and also designate the sort field.
For additional information on these \*(CIs
\*(Xt 3b. MANAGING Fields.
.TP 7
-\ \ \'\fBS\fR\' :\fICumulative-Time-Mode\fR toggle \fR
+\ \ '\fBS\fR' :\fICumulative-Time-Mode\fR toggle \fR
When 'Cumulative mode' is \*O, each process is listed with the \*(Pu
time that it and its dead children have used.
@@ -1139,7 +1139,7 @@ If you wish to know in advance whether o
effect, simply ask for help and view the window summary on the second line.
.TP 7
-\ \ \'\fBu\fR' | '\fBU\fR' :\fIShow-Specific-User-Only \fR
+\ \ '\fBu\fR' | '\fBU\fR' :\fIShow-Specific-User-Only \fR
You will be prompted for the\fB uid\fR or\fB name\fR of the user to display.
The '-u' option matches on \fB effective\fR user whereas the '-U' option
matches on\fB any\fR user (real, effective, saved, or filesystem).
@@ -1152,7 +1152,7 @@ Later, if you wish to monitor all tasks
command but just press <Enter> at the prompt.
.TP 7
-\ \ \'\fBV\fR' :\fIForest-View-Mode\fR toggle \fR
+\ \ '\fBV\fR' :\fIForest-View-Mode\fR toggle \fR
In this mode, processes are reordered according to their parents and
the layout of the COMMAND column resembles that of a tree.
In forest view mode it is still possible to toggle between program
@@ -1168,7 +1168,7 @@ mode in the \*(CW.
.B SIZE\fR of \*(TW
.PD 0
.TP 7
-\ \ \'\fBi\fR\' :\fIIdle-Process\fR toggle \fR
+\ \ '\fBi\fR' :\fIIdle-Process\fR toggle \fR
Displays all tasks or just active tasks.
When this toggle is \*F, tasks that have not used any \*(PU since the
last update will not be displayed.
@@ -1180,7 +1180,7 @@ If this command is applied to the last \
affect the window's size, as all prior \*(TDs will have already been painted.
.TP 7
-\ \ \'\fBn\fR\' | \'\fB#\fR\' :\fISet-Maximum-Tasks \fR
+\ \ '\fBn\fR' | '\fB#\fR' :\fISet-Maximum-Tasks \fR
You will be prompted to enter the number of tasks to display.
The lessor of your number and available screen rows will be used.
@@ -1218,12 +1218,12 @@ The sort field might\fI not\fR be visibl
2) the 'f' \*(CI turned it \*F
.TP 7
-\ \ \'\fB<\fR\' :\fIMove-Sort-Field-Left \fR
+\ \ '\fB<\fR' :\fIMove-Sort-Field-Left \fR
Moves the sort column to the left unless the current sort field is
the first field being displayed.
.TP 7
-\ \ \'\fB>\fR\' :\fIMove-Sort-Field-Right \fR
+\ \ '\fB>\fR' :\fIMove-Sort-Field-Right \fR
Moves the sort column to the right unless the current sort field is
the last field being displayed.
@@ -1234,14 +1234,14 @@ the current sort field is visible.
.in
.TP 7
-\ \ \'\fBf\fR\' | \'\fBF\fR\' :\fIFields-Management \fR
+\ \ '\fBf\fR' | '\fBF\fR' :\fIFields-Management \fR
These keys display a separate screen where you can change which field
is used as the sort column, among other functions.
This can be a convenient way to simply verify the current sort field,
when running \*(We with column highlighting turned \*F.
.TP 7
-\ \ \'\fBR\fR\' :\fIReverse/Normal-Sort-Field\fR toggle \fR
+\ \ '\fBR\fR' :\fIReverse/Normal-Sort-Field\fR toggle \fR
Using this \*(CI you can alternate between high-to-low and low-to-high sorts.
.PP
@@ -1320,7 +1320,7 @@ know what window is the \*(CW.
.SS 5b. COMMANDS for Windows
.\" ----------------------------------------------------------------------
.TP 7
-\ \ \'\fB-\fR\' | \'\fB_\fR\' :\fIShow/Hide-Window(s)\fR toggles \fR
+\ \ '\fB-\fR' | '\fB_\fR' :\fIShow/Hide-Window(s)\fR toggles \fR
The '-' key turns the \*(CW's \*(TD \*O and \*F.
When \*O, that \*(TA will show a minimum of the columns header you've
established with the 'f' \*(CI.
@@ -1334,7 +1334,7 @@ If all 4 \*(TDs are currently visible, t
as the only display element.
.TP 7
-*\ \'\fB=\fR\' | \'\fB+\fR\' :\fIEqualize-(re-balance)-Window(s) \fR
+*\ '\fB=\fR' | '\fB+\fR' :\fIEqualize-(re-balance)-Window(s) \fR
The '=' key forces the \*(CW's \*(TD to be visible.
It also reverses any 'i' (idle tasks), 'n' (max tasks) and 'u'/'U'
(user filter) commands that might be active.
@@ -1349,7 +1349,7 @@ except for the 'i' (idle tasks), 'n' (ma
and scrolling \*(CIs.
.TP 7
-*\ \'\fBA\fR\' :\fIAlternate-Display-Mode\fR toggle \fR
+*\ '\fBA\fR' :\fIAlternate-Display-Mode\fR toggle \fR
This command will switch between \*(FM and \*(AM.
The first time you issue this command, all four \*(TDs will be shown.
@@ -1357,7 +1357,7 @@ Thereafter when you switch modes, you wi
chosen to make visible.
.TP 7
-*\ \'\fBa\fR\' | \'\fBw\fR\' :\fINext-Window-Forward/Backward \fR
+*\ '\fBa\fR' | '\fBw\fR' :\fINext-Window-Forward/Backward \fR
This will change the \*(CW, which in turn changes the window to which
commands are directed.
These keys act in a circular fashion so you can reach any desired \*(CW
@@ -1368,7 +1368,7 @@ whenever the \*(CW name loses its emphas
the \*(TD is \*F and many commands will be restricted.
.TP 7
-*\ \'\fBg\fR\' :\fIChoose-Another-Window/Field-Group \fR
+*\ '\fBg\fR' :\fIChoose-Another-Window/Field-Group \fR
You will be prompted to enter a number between 1 and 4 designating the
\*(FG which should be made the \*(CW.
@@ -1377,7 +1377,7 @@ In \*(AM, it is simply a less convenient
commands.
.TP 7
-\ \ \'\fBG\fR\' :\fIChange-Window/Field-Group-Name \fR
+\ \ '\fBG\fR' :\fIChange-Window/Field-Group-Name \fR
You will be prompted for a new name to be applied to the \*(CW.
It does not require that the window name be visible
(the 'l' toggle to be \*O).
@@ -1385,8 +1385,8 @@ It does not require that the window name
.IP "*" 3
The \*(CIs shown with an \*(AK have use beyond \*(AM.
.Bd -literal -compact
- \'=', 'A', 'g' are always available
- \'a', 'w' act the same with color mapping
+ '=', 'A', 'g' are always available
+ 'a', 'w' act the same with color mapping
\ and fields management
.Ed
@@ -1485,7 +1485,7 @@ available in \*(AM if the \*(CW's \*(TD
You can use these \*(CIs to locate a task row containing a particular value.
.TP 4
-'\fBL\fR\' :\fILocate-a-string\fR
+'\fBL\fR' :\fILocate-a-string\fR
You will be prompted for the case-sensitive string to locate starting from
the current window coordinates.
There are no restrictions on search string content.
@@ -1498,7 +1498,7 @@ Keying <Enter> with no input will effect
a new search string is entered.
.TP 4
-'\fB&\fR\' :\fILocate-next\fR
+'\fB&\fR' :\fILocate-next\fR
Assuming a search string has been established, \*(We will attempt to locate
the next occurrence.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c64679456dd4b9c7b23ab261950fe37a441f0ce087b9d7f70f0cf03ddc7e0752
size 293552

View File

@ -21,51 +21,51 @@
%define libname libprocps%{somajor} %define libname libprocps%{somajor}
Name: procps Name: procps
#Also: http://gitorious.org/procps/
Url: http://sf.net/projects/procps-ng/ Url: http://sf.net/projects/procps-ng/
BuildRequires: automake BuildRequires: automake
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: pkg-config BuildRequires: pkg-config
%if 0%{?suse_version} >= 1210
BuildRequires: pkgconfig(systemd)
%endif
BuildRequires: xz
PreReq: %fillup_prereq %insserv_prereq PreReq: %fillup_prereq %insserv_prereq
Provides: ps = %version-%release Provides: ps = %version-%release
Obsoletes: ps < %version-%release Obsoletes: ps < %version-%release
Version: 3.3.5 Version: 3.3.8
Release: 0 Release: 0
Summary: The ps utilities for /proc Summary: The ps utilities for /proc
License: GPL-2.0+ and LGPL-2.1+ License: GPL-2.0+ and LGPL-2.1+
Group: System/Monitoring Group: System/Monitoring
Source: http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3.8.tar.xz
#Git-Clone: git://gitorious.org/procps/procps
Source: procps-v%version.tar.bz2
Source1: procps-pmap-legacy.tar.bz2 Source1: procps-pmap-legacy.tar.bz2
Source2: boot.sysctl Source2: boot.sysctl
Source3: systat.xinetd Source3: systat.xinetd
Patch0: procps-v3.3.4-watch.patch Patch0: procps-ng-3.3.8-watch.patch
Patch1: procps-v3.3.3-ia64.diff Patch1: procps-v3.3.3-ia64.diff
Patch2: procps-v3.3.4-stealtime.patch Patch2: procps-v3.3.4-stealtime.patch
Patch3: procps-v3.3.4-w-notruncate.diff Patch3: procps-v3.3.4-w-notruncate.diff
Patch4: procps-v3.3.4-w-simply-work.diff Patch4: procps-v3.3.4-w-simply-work.diff
Patch5: procps-v3.3.4-top.1.diff Patch5: procps-ng-3.3.8-top.1.diff
Patch6: procps-v3.3.3-buffersize.diff Patch6: procps-v3.3.3-buffersize.diff
Patch7: procps-v3.3.3-readeof.patch Patch7: procps-ng-3.3.8-readeof.patch
Patch8: procps-v3.3.3-slab.patch Patch8: procps-v3.3.3-slab.patch
Patch9: procps-v3.3.3-selinux.patch Patch9: procps-ng-3.3.8-selinux.patch
Patch10: procps-v3.3.3-accuracy.dif Patch10: procps-ng-3.3.8-accuracy.dif
Patch11: procps-v3.3.4-xen.dif Patch11: procps-v3.3.4-xen.dif
Patch12: procps-v3.3.3-fdleak.dif Patch12: procps-v3.3.3-fdleak.dif
Patch13: procps-v3.3.3-columns.dif Patch13: procps-v3.3.3-columns.dif
Patch14: procps-v3.3.3-integer-overflow.patch Patch14: procps-v3.3.3-integer-overflow.patch
Patch15: procps-v3.3.4-bnc634071_procstat2.diff Patch15: procps-ng-3.3.8-bnc634071_procstat2.diff
Patch16: procps-v3.3.3-bnc634840.patch Patch16: procps-ng-3.3.8-bnc634840.patch
Patch17: procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff Patch17: procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
Patch18: procps-v3.3.4-petabytes.patch Patch18: procps-ng-3.3.8-petabytes.patch
Patch19: procps-v3.3.4-large_pcpu.patch Patch19: procps-v3.3.4-large_pcpu.patch
Patch20: procps-v3.3.3-tinfo.dif Patch20: procps-ng-3.3.8-tinfo.dif
Patch21: procps-v3.3.3-pwdx.patch Patch21: procps-v3.3.3-pwdx.patch
Patch22: procps-v3.3.3-chroot.diff
# PATCH-FIX-UPSTREAM procps-v3.3.5-top-locale.patch -- bnc#794678 - top has a locale-dpendent config file
Patch23: procps-v3.3.5-top-locale.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -106,8 +106,7 @@ The props library can be used to read informations out from /proc
the process information pseudo-file system, the process information pseudo-file system,
%prep %prep
%setup -q -n %{name}-v%{version} %setup -q -n %{name}-ng-%{version}
%__tar --strip-components=1 -xjf %{S:1}
%patch0 %patch0
%patch1 %patch1
%patch2 %patch2
@ -130,13 +129,11 @@ the process information pseudo-file system,
%patch19 %patch19
%patch20 %patch20
%patch21 %patch21
%patch22
%patch23
%build %build
sh po/update-potfiles
test -s .tarball-version || echo %{version} > .tarball-version test -s .tarball-version || echo %{version} > .tarball-version
./autogen.sh #./autogen.sh
autoreconf
export NCURSESW_CFLAGS="$(ncursesw5-config --cflags)" export NCURSESW_CFLAGS="$(ncursesw5-config --cflags)"
export NCURSESW_LIBS="$(ncursesw5-config --libs)" export NCURSESW_LIBS="$(ncursesw5-config --libs)"
export LFS_CFLAGS="$(getconf LFS_CFLAGS)" export LFS_CFLAGS="$(getconf LFS_CFLAGS)"
@ -151,7 +148,13 @@ export LFS_CFLAGS="$(getconf LFS_CFLAGS)"
--enable-skill \ --enable-skill \
--enable-oomem \ --enable-oomem \
--enable-w-from \ --enable-w-from \
--enable-sigwinch \
--enable-wide-percent \
--enable-w-from \
--with-pic=yes \ --with-pic=yes \
%if 0%{?suse_version} >= 1210
--with-systemd \
%endif
--with-gnu-ld --with-gnu-ld
make %{?_smp_mflags} make %{?_smp_mflags}
@ -279,7 +282,6 @@ make check
%files -n %{libname} %files -n %{libname}
%defattr (-,root,root,755) %defattr (-,root,root,755)
%{_libdir}/libprocps.so.1 %{_libdir}/libprocps.so.%{somajor}*
%{_libdir}/libprocps.so.1.0.0
%changelog %changelog