Sync from SUSE:SLFO:Main procps revision 90cf1b80923b9f8269a440e1d362954c
This commit is contained in:
parent
844627c634
commit
fb2f19b539
176
79042e07.patch
Normal file
176
79042e07.patch
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
From 79042e07fab9956135a21b1df7a69d1fbde7ef79 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Craig Small <csmall@dropbear.xyz>
|
||||||
|
Date: Tue, 12 Sep 2023 16:59:18 +1000
|
||||||
|
Subject: [PATCH] ps: Don't crash when using short option
|
||||||
|
|
||||||
|
ps would crash with the -si or -sf options with systemd enabled.
|
||||||
|
The issue was the utmp wasn't filled in, the long option checked, the
|
||||||
|
short option did not.
|
||||||
|
|
||||||
|
Refactored the showinfo() function so instead of a branch with duplicate
|
||||||
|
prints for the items in both long and short we just branch on the items
|
||||||
|
for long output.
|
||||||
|
|
||||||
|
Also, made the function prototypes not dependendent on systemd enabled,
|
||||||
|
it was too messy that way and passing a char* NULL is not really going
|
||||||
|
to hurt anything.
|
||||||
|
|
||||||
|
References:
|
||||||
|
#301
|
||||||
|
|
||||||
|
Signed-off-by: Craig Small <csmall@dropbear.xyz>
|
||||||
|
---
|
||||||
|
NEWS | 1 +
|
||||||
|
src/w.c | 61 ++++++++++++++++++++-------------------------------------
|
||||||
|
2 files changed, 22 insertions(+), 40 deletions(-)
|
||||||
|
|
||||||
|
|diff --git a/NEWS b/NEWS
|
||||||
|
|index 4ad9f74e..883f9139 100644
|
||||||
|
|--- a/NEWS
|
||||||
|
|+++ b/NEWS
|
||||||
|
|@@ -1,5 +1,6 @@
|
||||||
|
| procps-ng-NEXT
|
||||||
|
| ---------------
|
||||||
|
|+ * w: Don't segfault with -s option issue #301
|
||||||
|
|
|
||||||
|
| procps-ng-4.0.4
|
||||||
|
| ---------------
|
||||||
|
diff --git a/src/w.c b/src/w.c
|
||||||
|
index fd6e75f7..e2d754b5 100644
|
||||||
|
--- a/src/w.c
|
||||||
|
+++ b/src/w.c
|
||||||
|
@@ -207,9 +207,7 @@ static void print_display_or_interface(const char *restrict host, int len, int r
|
||||||
|
|
||||||
|
/* This routine prints either the hostname or the IP address of the remote */
|
||||||
|
static void print_from(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
const char *session,
|
||||||
|
-#endif
|
||||||
|
const utmp_t *restrict const u, const int ip_addresses, const int fromlen) {
|
||||||
|
#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
if (session) {
|
||||||
|
@@ -508,11 +506,10 @@ static int find_best_proc(
|
||||||
|
#undef PIDS_GETSTR
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
static void showinfo(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
const char *session, const char *name,
|
||||||
|
-#endif
|
||||||
|
- utmp_t * u, int formtype, int maxcmd, int from,
|
||||||
|
+ utmp_t * u, const int longform, int maxcmd, int from,
|
||||||
|
const int userlen, const int fromlen, const int ip_addresses,
|
||||||
|
const int pids)
|
||||||
|
{
|
||||||
|
@@ -575,25 +572,20 @@ static void showinfo(
|
||||||
|
/* force NUL term for printf */
|
||||||
|
uname[UT_NAMESIZE] = '\0';
|
||||||
|
|
||||||
|
- if (formtype) {
|
||||||
|
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, tty + 5);
|
||||||
|
+ printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, tty + 5);
|
||||||
|
+ if (from)
|
||||||
|
+ print_from(session, NULL, ip_addresses, fromlen);
|
||||||
|
+
|
||||||
|
+ /* login time */
|
||||||
|
+ if (longform) {
|
||||||
|
#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
if (session) {
|
||||||
|
uint64_t ltime;
|
||||||
|
|
||||||
|
- if (from)
|
||||||
|
- print_from(session, NULL, ip_addresses, fromlen);
|
||||||
|
-
|
||||||
|
sd_session_get_start_time(session, <ime);
|
||||||
|
print_logintime(ltime/((uint64_t) 1000000ULL), stdout);
|
||||||
|
} else {
|
||||||
|
#endif
|
||||||
|
- if (from)
|
||||||
|
- print_from(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
- NULL,
|
||||||
|
-#endif
|
||||||
|
- u, ip_addresses, fromlen);
|
||||||
|
|
||||||
|
#ifdef HAVE_UTMPX_H
|
||||||
|
print_logintime(u->ut_tv.tv_sec, stdout);
|
||||||
|
@@ -603,11 +595,16 @@ static void showinfo(
|
||||||
|
#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
- if (u && *u->ut_line == ':')
|
||||||
|
- /* idle unknown for xdm logins */
|
||||||
|
- printf(" ?xdm? ");
|
||||||
|
- else
|
||||||
|
- print_time_ival7(idletime(tty), 0, stdout);
|
||||||
|
+ }
|
||||||
|
+ /* idle */
|
||||||
|
+ if (u && *u->ut_line == ':')
|
||||||
|
+ /* idle unknown for xdm logins */
|
||||||
|
+ printf(" ?xdm? ");
|
||||||
|
+ else
|
||||||
|
+ print_time_ival7(idletime(tty), 0, stdout);
|
||||||
|
+
|
||||||
|
+ /* jpcpu/pcpu */
|
||||||
|
+ if (longform) {
|
||||||
|
print_time_ival7(jcpu / hertz, (jcpu % hertz) * (100. / hertz),
|
||||||
|
stdout);
|
||||||
|
if (pcpu > 0)
|
||||||
|
@@ -616,20 +613,8 @@ static void showinfo(
|
||||||
|
stdout);
|
||||||
|
else
|
||||||
|
printf(" ? ");
|
||||||
|
- } else {
|
||||||
|
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, tty + 5);
|
||||||
|
- if (from)
|
||||||
|
- print_from(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
- NULL,
|
||||||
|
-#endif
|
||||||
|
- u, ip_addresses, fromlen);
|
||||||
|
- if (u && *u->ut_line == ':')
|
||||||
|
- /* idle unknown for xdm logins */
|
||||||
|
- printf(" ?xdm? ");
|
||||||
|
- else
|
||||||
|
- print_time_ival7(idletime(tty), 0, stdout);
|
||||||
|
}
|
||||||
|
+ /* what */
|
||||||
|
if (pids) {
|
||||||
|
pid_t ut_pid = -1;
|
||||||
|
if (u)
|
||||||
|
@@ -798,9 +783,9 @@ int main(int argc, char **argv)
|
||||||
|
* headers. Try to keep alignment intact. */
|
||||||
|
printf(_("%-*s TTY "), userlen, _("USER"));
|
||||||
|
if (from)
|
||||||
|
- printf("%-*s", fromlen - 1, _("FROM"));
|
||||||
|
+ printf("%-*s", fromlen, _("FROM"));
|
||||||
|
if (longform)
|
||||||
|
- printf(_(" LOGIN@ IDLE JCPU PCPU WHAT\n"));
|
||||||
|
+ printf(_(" LOGIN@ IDLE JCPU PCPU WHAT\n"));
|
||||||
|
else
|
||||||
|
printf(_(" IDLE WHAT\n"));
|
||||||
|
}
|
||||||
|
@@ -857,9 +842,7 @@ int main(int argc, char **argv)
|
||||||
|
continue;
|
||||||
|
if (!strncmp(u->ut_user, user, UT_NAMESIZE))
|
||||||
|
showinfo(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
NULL, NULL,
|
||||||
|
-#endif
|
||||||
|
u, longform, maxcmd, from, userlen,
|
||||||
|
fromlen, ip_addresses, pids);
|
||||||
|
}
|
||||||
|
@@ -876,9 +859,7 @@ int main(int argc, char **argv)
|
||||||
|
continue;
|
||||||
|
if (*u->ut_user)
|
||||||
|
showinfo(
|
||||||
|
-#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
||||||
|
NULL, NULL,
|
||||||
|
-#endif
|
||||||
|
u, longform, maxcmd, from, userlen,
|
||||||
|
fromlen, ip_addresses, pids);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -1,102 +0,0 @@
|
|||||||
From 2c933ecba3bb1d3041a5a7a53a7b4078a6003413 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Craig Small <csmall@dropbear.xyz>
|
|
||||||
Date: Thu, 10 Aug 2023 21:18:38 +1000
|
|
||||||
Subject: [PATCH] ps: Fix possible buffer overflow in -C option
|
|
||||||
|
|
||||||
ps allocates memory using malloc(length of arg * len of struct).
|
|
||||||
In certain strange circumstances, the arg length could be very large
|
|
||||||
and the multiplecation will overflow, allocating a small amount of
|
|
||||||
memory.
|
|
||||||
|
|
||||||
Subsequent strncpy() will then write into unallocated memory.
|
|
||||||
The fix is to use calloc. It's slower but this is a one-time
|
|
||||||
allocation. Other malloc(x * y) calls have also been replaced
|
|
||||||
by calloc(x, y)
|
|
||||||
|
|
||||||
References:
|
|
||||||
https://www.freelists.org/post/procps/ps-buffer-overflow-CVE-20234016
|
|
||||||
https://nvd.nist.gov/vuln/detail/CVE-2023-4016
|
|
||||||
https://gitlab.com/procps-ng/procps/-/issues/297
|
|
||||||
https://bugs.debian.org/1042887
|
|
||||||
|
|
||||||
Signed-off-by: Craig Small <csmall@dropbear.xyz>
|
|
||||||
---
|
|
||||||
ps/parser.c | 24 ++++++++++++------------
|
|
||||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
--- ps/parser.c
|
|
||||||
+++ ps/parser.c 2023-08-15 12:19:13.375422122 +0000
|
|
||||||
@@ -183,8 +183,7 @@ static const char *parse_list(const char
|
|
||||||
int need_item;
|
|
||||||
const char *err; /* error code that could or did happen */
|
|
||||||
/*** prepare to operate ***/
|
|
||||||
- node = malloc(sizeof(selection_node));
|
|
||||||
- node->u = malloc(strlen(arg)*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
+ node = xmalloc(sizeof(selection_node));
|
|
||||||
node->n = 0;
|
|
||||||
buf = strdup(arg);
|
|
||||||
/*** sanity check and count items ***/
|
|
||||||
@@ -205,6 +204,7 @@ static const char *parse_list(const char
|
|
||||||
} while (*++walk);
|
|
||||||
if(need_item) goto parse_error;
|
|
||||||
node->n = items;
|
|
||||||
+ node->u = xcalloc(items*sizeof(sel_union));
|
|
||||||
/*** actually parse the list ***/
|
|
||||||
walk = buf;
|
|
||||||
while(items--){
|
|
||||||
@@ -569,8 +569,8 @@ static const char *parse_bsd_option(void
|
|
||||||
/* put our tty on a tiny list */
|
|
||||||
{
|
|
||||||
selection_node *node;
|
|
||||||
- node = malloc(sizeof(selection_node));
|
|
||||||
- node->u = malloc(sizeof(sel_union));
|
|
||||||
+ node = xmalloc(sizeof(selection_node));
|
|
||||||
+ node->u = xmalloc(sizeof(sel_union));
|
|
||||||
node->u[0].tty = cached_tty;
|
|
||||||
node->typecode = SEL_TTY;
|
|
||||||
node->n = 1;
|
|
||||||
@@ -706,8 +706,8 @@ static const char *parse_bsd_option(void
|
|
||||||
if(!arg){
|
|
||||||
/* Wow, obsolete BSD syntax. Put our tty on a tiny list. */
|
|
||||||
selection_node *node;
|
|
||||||
- node = malloc(sizeof(selection_node));
|
|
||||||
- node->u = malloc(sizeof(sel_union));
|
|
||||||
+ node = xmalloc(sizeof(selection_node));
|
|
||||||
+ node->u = xmalloc(sizeof(sel_union));
|
|
||||||
node->u[0].tty = cached_tty;
|
|
||||||
node->typecode = SEL_TTY;
|
|
||||||
node->n = 1;
|
|
||||||
@@ -1030,16 +1030,16 @@ static const char *parse_trailing_pids(v
|
|
||||||
argp = ps_argv + thisarg;
|
|
||||||
thisarg = ps_argc - 1; /* we must be at the end now */
|
|
||||||
|
|
||||||
- pidnode = malloc(sizeof(selection_node));
|
|
||||||
- pidnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
+ pidnode = xmalloc(sizeof(selection_node));
|
|
||||||
+ pidnode->u = xcalloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
pidnode->n = 0;
|
|
||||||
|
|
||||||
- grpnode = malloc(sizeof(selection_node));
|
|
||||||
- grpnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
+ grpnode = xmalloc(sizeof(selection_node));
|
|
||||||
+ grpnode->u = xcalloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
grpnode->n = 0;
|
|
||||||
|
|
||||||
- sidnode = malloc(sizeof(selection_node));
|
|
||||||
- sidnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
+ sidnode = xmalloc(sizeof(selection_node));
|
|
||||||
+ sidnode->u = xcalloc(i*sizeof(sel_union)); /* waste is insignificant */
|
|
||||||
sidnode->n = 0;
|
|
||||||
|
|
||||||
while(i--){
|
|
||||||
--- proc/libprocps.sym
|
|
||||||
+++ proc/libprocps.sym 2023-08-15 12:43:18.905661726 +0000
|
|
||||||
@@ -67,6 +67,8 @@ global:
|
|
||||||
unix_print_signals;
|
|
||||||
uptime;
|
|
||||||
xalloc_err_handler;
|
|
||||||
+ xcalloc;
|
|
||||||
+ xmalloc;
|
|
||||||
local:
|
|
||||||
*;
|
|
||||||
};
|
|
@ -1,33 +0,0 @@
|
|||||||
From 23da4f40ea27afe998e92ca317f2dcb48a6ffc1f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tommi Rantala <tommi.t.rantala@nokia.com>
|
|
||||||
Date: Mon, 11 Oct 2021 13:33:18 +0300
|
|
||||||
Subject: [PATCH] ps: ignore SIGURG
|
|
||||||
|
|
||||||
Stop registering signal handler for SIGURG, to avoid ps failure if
|
|
||||||
someone sends such signal. Without the signal handler, SIGURG will
|
|
||||||
just be ignored.
|
|
||||||
|
|
||||||
Signal 23 (URG) caught by ps (3.3.16).
|
|
||||||
ps:ps/display.c:66: please report this bug
|
|
||||||
|
|
||||||
https://man7.org/linux/man-pages/man7/signal.7.html
|
|
||||||
https://www.freebsd.org/cgi/man.cgi?sektion=3&query=signal
|
|
||||||
---
|
|
||||||
ps/display.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/ps/display.c b/ps/display.c
|
|
||||||
index 04803c3b..346e21a7 100644
|
|
||||||
--- a/ps/display.c
|
|
||||||
+++ b/ps/display.c
|
|
||||||
@@ -673,6 +673,7 @@ int main(int argc, char *argv[]){
|
|
||||||
case SIGKILL: /* can not catch */
|
|
||||||
case SIGSTOP: /* can not catch */
|
|
||||||
case SIGWINCH: /* don't care if window size changes */
|
|
||||||
+ case SIGURG: /* Urgent condition on socket (4.2BSD) */
|
|
||||||
;
|
|
||||||
}
|
|
||||||
} while (0);
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From 3dd1661a3d91671ca6c977c2e514f47d807be79d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Craig Small <csmall@dropbear.xyz>
|
|
||||||
Date: Mon, 29 Mar 2021 22:11:27 +1100
|
|
||||||
Subject: [PATCH] docs: psr ps field is last run processor
|
|
||||||
|
|
||||||
The ps.1 manpage incorrectly stated that psr field showed the
|
|
||||||
processor the process was assigned to. However if the assignment
|
|
||||||
has changed but the process has not run, then the field doesn't
|
|
||||||
change.
|
|
||||||
|
|
||||||
Some digging by @srikard showed it wasn't the processor assigned
|
|
||||||
but the last one it was run on. The man page now correctly
|
|
||||||
describes psr in that way.
|
|
||||||
|
|
||||||
References:
|
|
||||||
procps-ng/procps#187
|
|
||||||
---
|
|
||||||
ps/ps.1 | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git ps/ps.1 ps/ps.1
|
|
||||||
index 8678123..b433655 100644
|
|
||||||
--- ps/ps.1
|
|
||||||
+++ ps/ps.1
|
|
||||||
|@@ -4,7 +4,7 @@
|
|
||||||
| .\" Quick hack conversion by Albert Cahalan, 1998.
|
|
||||||
| .\" Licensed under version 2 of the Gnu General Public License.
|
|
||||||
| .\"
|
|
||||||
|-.TH PS "1" "2021-03-05" "procps-ng" "User Commands"
|
|
||||||
|+.TH PS "1" "2021-03-29" "procps-ng" "User Commands"
|
|
||||||
| .\"
|
|
||||||
| .\" To render this page:
|
|
||||||
| .\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 &
|
|
||||||
@@ -1518,7 +1518,7 @@ priority of the process. Higher number means lower priority.
|
|
||||||
T}
|
|
||||||
|
|
||||||
psr PSR T{
|
|
||||||
-processor that process is currently assigned to.
|
|
||||||
+processor that process last executed on.
|
|
||||||
T}
|
|
||||||
|
|
||||||
rgid RGID T{
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
--- procps-3.3.17/sysctl.c.old 2021-02-09 11:11:25.000000000 +0100
|
|
||||||
+++ procps-3.3.17/sysctl.c 2023-12-14 13:56:36.785976315 +0100
|
|
||||||
@@ -546,6 +546,8 @@
|
|
||||||
fp = (globbuf.gl_pathv[j][0] == '-' && !globbuf.gl_pathv[j][1])
|
|
||||||
? stdin : fopen(globbuf.gl_pathv[j], "r");
|
|
||||||
if (!fp) {
|
|
||||||
+ if (strcmp ("/usr/lib/sysctl.d/99-sysctl.conf", globbuf.gl_pathv[j]) == 0)
|
|
||||||
+ continue;
|
|
||||||
xwarn(_("cannot open \"%s\""), globbuf.gl_pathv[j]);
|
|
||||||
rc = -1;
|
|
||||||
goto out;
|
|
@ -1,41 +0,0 @@
|
|||||||
---
|
|
||||||
free.1 | 2 +-
|
|
||||||
proc/sysinfo.c | 9 +++++----
|
|
||||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- free.1
|
|
||||||
+++ free.1 2022-12-15 09:40:32.807087343 +0000
|
|
||||||
@@ -19,7 +19,7 @@ columns are:
|
|
||||||
Total installed memory (MemTotal and SwapTotal in /proc/meminfo)
|
|
||||||
.TP
|
|
||||||
\fBused\fR
|
|
||||||
-Used memory (calculated as \fBtotal\fR - \fBfree\fR - \fBbuffers\fR - \fBcache\fR)
|
|
||||||
+Used memory (calculated as \fBtotal\fR - \fBavailable\fR)
|
|
||||||
.TP
|
|
||||||
\fBfree\fR
|
|
||||||
Unused memory (MemFree and SwapFree in /proc/meminfo)
|
|
||||||
--- proc/sysinfo.c
|
|
||||||
+++ proc/sysinfo.c 2022-06-22 11:29:39.240066488 +0000
|
|
||||||
@@ -794,10 +794,6 @@ nextline:
|
|
||||||
where such values will be dramatically distorted over those of the host. */
|
|
||||||
if (kb_main_available > kb_main_total)
|
|
||||||
kb_main_available = kb_main_free;
|
|
||||||
- mem_used = kb_main_total - kb_main_free - kb_main_cached - kb_main_buffers;
|
|
||||||
- if (mem_used < 0)
|
|
||||||
- mem_used = kb_main_total - kb_main_free;
|
|
||||||
- kb_main_used = (unsigned long)mem_used;
|
|
||||||
|
|
||||||
/* zero? might need fallback for 2.6.27 <= kernel <? 3.14 */
|
|
||||||
if (!kb_main_available) {
|
|
||||||
@@ -821,6 +817,11 @@ nextline:
|
|
||||||
kb_main_available = kb_main_free;
|
|
||||||
#endif /* linux */
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ mem_used = kb_main_total - kb_main_available;
|
|
||||||
+ if (mem_used < 0)
|
|
||||||
+ mem_used = kb_main_total - kb_main_free;
|
|
||||||
+ kb_main_used = (unsigned long)mem_used;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************/
|
|
@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
top/top.1 | 4 ++--
|
|
||||||
top/top.c | 6 ++++--
|
|
||||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- top/top.1
|
|
||||||
+++ top/top.1 2022-06-22 12:05:55.572154830 +0000
|
|
||||||
@@ -565,8 +565,8 @@ visual graphs of those representations.
|
|
||||||
|
|
||||||
In the case of \*(MP, the percentage represents the \fBtotal\fR minus the estimated
|
|
||||||
\fBavail\fR noted above.
|
|
||||||
-The `Mem' graph itself is divided between \fBused\fR and any remaining memory not
|
|
||||||
-otherwise accounted for by \fBavail\fR.
|
|
||||||
+The `Mem' graph itself is divided between the non-cached portion of \fBused\fR and
|
|
||||||
+any remaining memory not otherwise accounted for by \fBavail\fR.
|
|
||||||
\*(XT 4b. SUMMARY AREA Commands and the `m' command for additional information
|
|
||||||
on that special 4-way toggle.
|
|
||||||
|
|
||||||
--- top/top.c
|
|
||||||
+++ top/top.c 2022-06-22 12:03:17.911044097 +0000
|
|
||||||
@@ -6086,12 +6086,14 @@ numa_nope:
|
|
||||||
char used[SMLBUFSIZ], util[SMLBUFSIZ], dual[MEDBUFSIZ];
|
|
||||||
float pct_used, pct_misc, pct_swap;
|
|
||||||
int ix, num_used, num_misc;
|
|
||||||
+ unsigned long my_ulong;
|
|
||||||
|
|
||||||
- pct_used = (float)kb_main_used * (100.0 / (float)kb_main_total);
|
|
||||||
+ my_ulong = kb_main_total - kb_main_buffers - kb_main_cached - kb_main_free;
|
|
||||||
+ pct_used = (float)my_ulong * (100.0 / (float)kb_main_total);
|
|
||||||
#ifdef MEMGRAPH_OLD
|
|
||||||
pct_misc = (float)(kb_main_buffers + kb_main_cached) * (100.0 / (float)kb_main_total);
|
|
||||||
#else
|
|
||||||
- pct_misc = (float)(kb_main_total - kb_main_available - kb_main_used) * (100.0 / (float)kb_main_total);
|
|
||||||
+ pct_misc = (float)(kb_main_total - kb_main_available - my_ulong) * (100.0 / (float)kb_main_total);
|
|
||||||
#endif
|
|
||||||
if (pct_used + pct_misc > 100.0 || pct_misc < 0) pct_misc = 0;
|
|
||||||
pct_swap = kb_swap_total ? (float)kb_swap_used * (100.0 / (float)kb_swap_total) : 0;
|
|
@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
proc/libprocps.sym | 1 +
|
|
||||||
proc/sysinfo.c | 13 +++++++++++--
|
|
||||||
proc/sysinfo.h | 2 ++
|
|
||||||
3 files changed, 14 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- proc/libprocps.sym
|
|
||||||
+++ proc/libprocps.sym 2018-04-04 11:30:51.841725161 +0000
|
|
||||||
@@ -60,6 +60,7 @@ global:
|
|
||||||
signal_name_to_number;
|
|
||||||
signal_number_to_name;
|
|
||||||
smp_num_cpus;
|
|
||||||
+ __smp_num_cpus;
|
|
||||||
sprint_uptime;
|
|
||||||
strtosig;
|
|
||||||
tty_to_dev;
|
|
||||||
--- proc/sysinfo.c
|
|
||||||
+++ proc/sysinfo.c 2018-04-04 11:33:26.306886237 +0000
|
|
||||||
@@ -47,7 +47,8 @@
|
|
||||||
#endif
|
|
||||||
#include <elf.h>
|
|
||||||
|
|
||||||
-long smp_num_cpus; /* number of CPUs */
|
|
||||||
+#undef smp_num_cpus
|
|
||||||
+long smp_num_cpus=-1; /* number of CPUs */
|
|
||||||
long page_bytes; /* this architecture's page size */
|
|
||||||
|
|
||||||
#define BAD_OPEN_MESSAGE \
|
|
||||||
@@ -1166,7 +1167,11 @@ out:
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
-void cpuinfo (void) {
|
|
||||||
+long __smp_num_cpus (void) {
|
|
||||||
+
|
|
||||||
+ if (smp_num_cpus != -1)
|
|
||||||
+ return(smp_num_cpus);
|
|
||||||
+
|
|
||||||
// ought to count CPUs in /proc/stat instead of relying
|
|
||||||
// on glibc, which foolishly tries to parse /proc/cpuinfo
|
|
||||||
// note: that may have been the case but now /proc/stat
|
|
||||||
@@ -1181,4 +1186,8 @@ void cpuinfo (void) {
|
|
||||||
smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
|
||||||
if (smp_num_cpus<1) /* SPARC glibc is buggy */
|
|
||||||
smp_num_cpus=1;
|
|
||||||
+
|
|
||||||
+ return smp_num_cpus;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+void cpuinfo (void) { (void)__smp_num_cpus(); }
|
|
||||||
--- proc/sysinfo.h
|
|
||||||
+++ proc/sysinfo.h 2018-04-04 11:30:51.841725161 +0000
|
|
||||||
@@ -8,6 +8,8 @@ EXTERN_C_BEGIN
|
|
||||||
|
|
||||||
extern unsigned long long Hertz; /* clock tick frequency */
|
|
||||||
extern long smp_num_cpus; /* number of CPUs */
|
|
||||||
+extern long __smp_num_cpus(void);
|
|
||||||
+#define smp_num_cpus __smp_num_cpus()
|
|
||||||
extern int have_privs; /* boolean, true if setuid or similar */
|
|
||||||
extern long page_bytes; /* this architecture's bytes per page */
|
|
||||||
|
|
@ -6,20 +6,20 @@ open("/usr/lib/locale/de_DE.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = 3
|
|||||||
and this causes a problem later on (bsc#908516)
|
and this causes a problem later on (bsc#908516)
|
||||||
|
|
||||||
---
|
---
|
||||||
free.c | 5 +++++
|
src/free.c | 5 +++++
|
||||||
1 file changed, 5 insertions(+)
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
--- free.c
|
--- src/free.c
|
||||||
+++ free.c 2018-04-04 12:47:06.360757839 +0000
|
+++ src/free.c 2022-10-20 13:33:28.880818112 +0000
|
||||||
@@ -197,6 +197,7 @@ int main(int argc, char **argv)
|
@@ -208,6 +208,7 @@ int main(int argc, char **argv)
|
||||||
{
|
int c, flags = 0, unit_set = 0, rc = 0;
|
||||||
int c, flags = 0, unit_set = 0;
|
|
||||||
struct commandline_arguments args;
|
struct commandline_arguments args;
|
||||||
|
struct meminfo_info *mem_info = NULL;
|
||||||
+ int errsv;
|
+ int errsv;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For long options that have no equivalent short option, use a
|
* For long options that have no equivalent short option, use a
|
||||||
@@ -247,10 +248,12 @@ int main(int argc, char **argv)
|
@@ -260,10 +261,12 @@ int main(int argc, char **argv)
|
||||||
#ifdef HAVE_PROGRAM_INVOCATION_NAME
|
#ifdef HAVE_PROGRAM_INVOCATION_NAME
|
||||||
program_invocation_name = program_invocation_short_name;
|
program_invocation_name = program_invocation_short_name;
|
||||||
#endif
|
#endif
|
||||||
@ -30,9 +30,9 @@ and this causes a problem later on (bsc#908516)
|
|||||||
atexit(close_stdout);
|
atexit(close_stdout);
|
||||||
+ errno = errsv;
|
+ errno = errsv;
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "bkmghltCc:ws:V", longopts, NULL)) != -1)
|
while ((c = getopt_long(argc, argv, "bkmghlLtvCc:ws:V", longopts, NULL)) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@@ -317,11 +320,13 @@ int main(int argc, char **argv)
|
@@ -336,11 +339,13 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
flags |= FREE_REPEAT;
|
flags |= FREE_REPEAT;
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
vmstat.c | 7 +++----
|
|
||||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- vmstat.c
|
|
||||||
+++ vmstat.c 2018-04-04 11:16:07.577968520 +0000
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <time.h>
|
|
||||||
@@ -708,13 +709,12 @@ static void slabheader(void)
|
|
||||||
|
|
||||||
static void slabformat(void)
|
|
||||||
{
|
|
||||||
- FILE *fSlab;
|
|
||||||
+ struct stat fSlab;
|
|
||||||
struct slab_cache *slabs;
|
|
||||||
unsigned long nSlab, i, j, k;
|
|
||||||
const char format[] = "%-24s %6u %6u %6u %6u\n";
|
|
||||||
|
|
||||||
- fSlab = fopen("/proc/slabinfo", "rb");
|
|
||||||
- if (!fSlab) {
|
|
||||||
+ if (stat("/proc/slabinfo", &fSlab) < 0) {
|
|
||||||
xwarnx(_("your kernel does not support slabinfo or your permissions are insufficient"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -746,7 +746,6 @@ static void slabformat(void)
|
|
||||||
}
|
|
||||||
free(slabs);
|
|
||||||
}
|
|
||||||
- fclose(fSlab);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void disksum_format(void)
|
|
@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
free.c | 19 ++++++++++++++++---
|
|
||||||
proc/sysinfo.c | 5 ++++-
|
|
||||||
2 files changed, 20 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- free.c
|
|
||||||
+++ free.c 2021-02-10 09:58:35.409695062 +0000
|
|
||||||
@@ -134,7 +134,7 @@ static const char *scale_size(unsigned l
|
|
||||||
if (args.exponent > 1) {
|
|
||||||
/* In desired scale. */
|
|
||||||
snprintf(buf, sizeof(buf), "%ld",
|
|
||||||
- (long int)((size * 1024.0) / power(base, args.exponent-1))
|
|
||||||
+ (long int)(((long long int)size * 1024) / power(base, args.exponent-1))
|
|
||||||
);
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
@@ -381,15 +381,28 @@ int main(int argc, char **argv)
|
|
||||||
* to print the high info, even if it is zero.
|
|
||||||
*/
|
|
||||||
if (flags & FREE_LOHI) {
|
|
||||||
+ unsigned long kb_low_used;
|
|
||||||
+ unsigned long kb_high_used;
|
|
||||||
+
|
|
||||||
+ if (kb_low_total > kb_low_free)
|
|
||||||
+ kb_low_used = kb_low_total - kb_low_free;
|
|
||||||
+ else
|
|
||||||
+ kb_low_used = 0;
|
|
||||||
+
|
|
||||||
+ if (kb_high_total > kb_high_free)
|
|
||||||
+ kb_high_used = kb_high_total - kb_high_free;
|
|
||||||
+ else
|
|
||||||
+ kb_high_used = 0;
|
|
||||||
+
|
|
||||||
printf("%-9s", _("Low:"));
|
|
||||||
printf("%11s", scale_size(kb_low_total, flags, args));
|
|
||||||
- printf(" %11s", scale_size(kb_low_total - kb_low_free, flags, args));
|
|
||||||
+ printf(" %11s", scale_size(kb_low_used, flags, args));
|
|
||||||
printf(" %11s", scale_size(kb_low_free, flags, args));
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
printf("%-9s", _("High:"));
|
|
||||||
printf("%11s", scale_size(kb_high_total, flags, args));
|
|
||||||
- printf(" %11s", scale_size(kb_high_total - kb_high_free, flags, args));
|
|
||||||
+ printf(" %11s", scale_size(kb_high_used, flags, args));
|
|
||||||
printf(" %11s", scale_size(kb_high_free, flags, args));
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
--- proc/sysinfo.c
|
|
||||||
+++ proc/sysinfo.c 2021-02-10 10:00:35.227385913 +0000
|
|
||||||
@@ -783,7 +783,10 @@ nextline:
|
|
||||||
kb_main_cached = kb_page_cache + kb_slab_reclaimable;
|
|
||||||
if ((ev=getenv("PS_FULL_CACHE")))
|
|
||||||
kb_main_cached += kb_swap_cached + kb_nfs_unstable;
|
|
||||||
- kb_swap_used = kb_swap_total - kb_swap_free;
|
|
||||||
+ if (kb_swap_total > kb_swap_free)
|
|
||||||
+ kb_swap_used = kb_swap_total - kb_swap_free;
|
|
||||||
+ else
|
|
||||||
+ kb_swap_used = 0;
|
|
||||||
|
|
||||||
/* if kb_main_available is greater than kb_main_total or our calculation of
|
|
||||||
mem_used overflows, that's symptomatic of running within a lxc container
|
|
@ -1,19 +0,0 @@
|
|||||||
---
|
|
||||||
top/top.c | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- top/top.c
|
|
||||||
+++ top/top.c 2018-04-04 12:09:16.087193018 +0000
|
|
||||||
@@ -2404,7 +2404,11 @@ static void zap_fieldstab (void) {
|
|
||||||
Cpu_pmax = 99.9;
|
|
||||||
if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
|
|
||||||
Cpu_pmax = 100.0 * smp_num_cpus;
|
|
||||||
- if (smp_num_cpus > 10) {
|
|
||||||
+ if (smp_num_cpus > 1000) {
|
|
||||||
+ if (Cpu_pmax > 9999999.0) Cpu_pmax = 9999999.0;
|
|
||||||
+ } else if (smp_num_cpus > 100) {
|
|
||||||
+ if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
|
|
||||||
+ } else if (smp_num_cpus > 10) {
|
|
||||||
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
|
|
||||||
} else {
|
|
||||||
if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
|
|
@ -1,13 +1,43 @@
|
|||||||
---
|
---
|
||||||
free.1 | 6 ++++++
|
library/meminfo.c | 7 ++++++-
|
||||||
free.c | 7 ++++++-
|
man/free.1 | 6 ++++++
|
||||||
proc/sysinfo.c | 4 ++++
|
src/free.c | 7 ++++++-
|
||||||
vmstat.c | 6 +++++-
|
src/vmstat.c | 7 ++++++-
|
||||||
4 files changed, 21 insertions(+), 2 deletions(-)
|
4 files changed, 24 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- free.1
|
--- library/meminfo.c
|
||||||
+++ free.1 2019-12-11 06:20:16.659772479 +0000
|
+++ library/meminfo.c 2023-09-12 12:08:41.033738450 +0000
|
||||||
@@ -100,6 +100,12 @@ Switch to the wide mode. The wide mode p
|
@@ -3,6 +3,7 @@
|
||||||
|
*
|
||||||
|
* Copyright © 2015-2023 Jim Warner <james.warner@comcast.net>
|
||||||
|
* Copyright © 2015-2023 Craig Small <csmall@dropbear.xyz>
|
||||||
|
+ * Copyright © 2008 Bart Van Assche.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -640,6 +641,7 @@ static int meminfo_read_failed (
|
||||||
|
int size;
|
||||||
|
unsigned long *valptr;
|
||||||
|
signed long mem_used;
|
||||||
|
+ const char *ev;
|
||||||
|
|
||||||
|
// remember history from last time around
|
||||||
|
memcpy(&info->hist.old, &info->hist.new, sizeof(struct meminfo_data));
|
||||||
|
@@ -692,7 +694,10 @@ static int meminfo_read_failed (
|
||||||
|
|
||||||
|
if (0 == mHr(MemAvailable))
|
||||||
|
mHr(MemAvailable) = mHr(MemFree);
|
||||||
|
- mHr(derived_mem_cached) = mHr(Cached) + mHr(SReclaimable);
|
||||||
|
+ if ((ev=getenv("PS_FULL_CACHE")))
|
||||||
|
+ mHr(derived_mem_cached) = mHr(Cached) + mHr(SReclaimable) + mHr(NFS_Unstable);
|
||||||
|
+ else
|
||||||
|
+ mHr(derived_mem_cached) = mHr(Cached) + mHr(SReclaimable);
|
||||||
|
|
||||||
|
/* if 'available' is greater than 'total' or our calculation of mem_used
|
||||||
|
overflows, that's symptomatic of running within a lxc container where
|
||||||
|
--- man/free.1
|
||||||
|
+++ man/free.1 2023-09-12 12:08:41.029738522 +0000
|
||||||
|
@@ -110,6 +110,12 @@ Switch to the wide mode. The wide mode p
|
||||||
than 80 characters. In this mode \fBbuffers\fR and \fBcache\fR
|
than 80 characters. In this mode \fBbuffers\fR and \fBcache\fR
|
||||||
are reported in two separate columns.
|
are reported in two separate columns.
|
||||||
.TP
|
.TP
|
||||||
@ -20,34 +50,34 @@
|
|||||||
\fB\-c\fR, \fB\-\-count\fR \fIcount\fR
|
\fB\-c\fR, \fB\-\-count\fR \fIcount\fR
|
||||||
Display the result
|
Display the result
|
||||||
.I count
|
.I count
|
||||||
--- free.c
|
--- src/free.c
|
||||||
+++ free.c 2019-12-11 06:20:16.659772479 +0000
|
+++ src/free.c 2023-09-12 12:10:26.647842455 +0000
|
||||||
@@ -90,6 +90,7 @@ static void __attribute__ ((__noreturn__
|
@@ -92,6 +92,7 @@ static void __attribute__ ((__noreturn__
|
||||||
fputs(_(" -t, --total show total for RAM + swap\n"), out);
|
fputs(_(" -v, --committed show committed memory and commit limit\n"), out);
|
||||||
fputs(_(" -s N, --seconds N repeat printing every N seconds\n"), out);
|
fputs(_(" -s N, --seconds N repeat printing every N seconds\n"), out);
|
||||||
fputs(_(" -c N, --count N repeat printing N times, then exit\n"), out);
|
fputs(_(" -c N, --count N repeat printing N times, then exit\n"), out);
|
||||||
+ fputs(_(" -C, --full-cache add further cache lines to main cache\n"), out);
|
+ fputs(_(" -C, --full-cache add further cache lines to main cache\n"), out);
|
||||||
fputs(_(" -w, --wide wide output\n"), out);
|
fputs(_(" -w, --wide wide output\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(_(" --help display this help and exit\n"), out);
|
fputs(_(" --help display this help and exit\n"), out);
|
||||||
@@ -231,6 +232,7 @@ int main(int argc, char **argv)
|
@@ -244,6 +245,7 @@ int main(int argc, char **argv)
|
||||||
{ "total", no_argument, NULL, 't' },
|
{ "committed", no_argument, NULL, 'v' },
|
||||||
{ "seconds", required_argument, NULL, 's' },
|
{ "seconds", required_argument, NULL, 's' },
|
||||||
{ "count", required_argument, NULL, 'c' },
|
{ "count", required_argument, NULL, 'c' },
|
||||||
+ { "full-cache",required_argument, NULL, HELP_OPTION },
|
+ { "full-cache",no_argument, NULL, 'C' },
|
||||||
{ "wide", no_argument, NULL, 'w' },
|
{ "wide", no_argument, NULL, 'w' },
|
||||||
{ "help", no_argument, NULL, HELP_OPTION },
|
{ "help", no_argument, NULL, HELP_OPTION },
|
||||||
{ "version", no_argument, NULL, 'V' },
|
{ "version", no_argument, NULL, 'V' },
|
||||||
@@ -250,7 +252,7 @@ int main(int argc, char **argv)
|
@@ -263,7 +265,7 @@ int main(int argc, char **argv)
|
||||||
textdomain(PACKAGE);
|
textdomain(PACKAGE);
|
||||||
atexit(close_stdout);
|
atexit(close_stdout);
|
||||||
|
|
||||||
- while ((c = getopt_long(argc, argv, "bkmghltc:ws:V", longopts, NULL)) != -1)
|
- while ((c = getopt_long(argc, argv, "bkmghlLtvc:ws:V", longopts, NULL)) != -1)
|
||||||
+ while ((c = getopt_long(argc, argv, "bkmghltCc:ws:V", longopts, NULL)) != -1)
|
+ while ((c = getopt_long(argc, argv, "bkmghlLtvCc:ws:V", longopts, NULL)) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'b':
|
case 'b':
|
||||||
check_unit_set(&unit_set);
|
check_unit_set(&unit_set);
|
||||||
@@ -333,6 +335,9 @@ int main(int argc, char **argv)
|
@@ -352,6 +354,9 @@ int main(int argc, char **argv)
|
||||||
case 'w':
|
case 'w':
|
||||||
flags |= FREE_WIDE;
|
flags |= FREE_WIDE;
|
||||||
break;
|
break;
|
||||||
@ -57,59 +87,40 @@
|
|||||||
case HELP_OPTION:
|
case HELP_OPTION:
|
||||||
usage(stdout);
|
usage(stdout);
|
||||||
case 'V':
|
case 'V':
|
||||||
--- proc/sysinfo.c
|
--- src/vmstat.c
|
||||||
+++ proc/sysinfo.c 2019-12-11 06:20:16.659772479 +0000
|
+++ src/vmstat.c 2023-09-12 12:08:41.033738450 +0000
|
||||||
@@ -3,6 +3,7 @@
|
@@ -230,6 +230,7 @@ static void __attribute__ ((__noreturn__
|
||||||
* Copyright (C) 1992-1998 by Michael K. Johnson, johnsonm@redhat.com
|
fputs(_(" -p, --partition <dev> partition specific statistics\n"), out);
|
||||||
* Copyright 1998-2003 Albert Cahalan
|
fputs(_(" -S, --unit <char> define display unit\n"), out);
|
||||||
* June 2003, Fabian Frederick, disk and slab info
|
fputs(_(" -w, --wide wide output\n"), out);
|
||||||
+ * Copyright (c) 2008 Bart Van Assche.
|
+ fputs(_(" -C, --full-cache add further cache lines to main cache\n"), out);
|
||||||
*
|
fputs(_(" -t, --timestamp show timestamp\n"), out);
|
||||||
* This library is free software; you can redistribute it and/or
|
fputs(_(" -y, --no-first skips first line of output\n"), out);
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
fputs(USAGE_SEPARATOR, out);
|
||||||
@@ -700,6 +701,7 @@ void meminfo(void){
|
@@ -951,6 +952,7 @@ int main(int argc, char *argv[])
|
||||||
int linux_version_code = procps_linux_version();
|
{"partition", required_argument, NULL, 'p'},
|
||||||
mem_table_struct findme = { namebuf, NULL};
|
{"unit", required_argument, NULL, 'S'},
|
||||||
mem_table_struct *found;
|
{"wide", no_argument, NULL, 'w'},
|
||||||
+ const char *ev;
|
+ {"full-cache", no_argument, NULL, 'C'},
|
||||||
char *head;
|
{"timestamp", no_argument, NULL, 't'},
|
||||||
char *tail;
|
{"help", no_argument, NULL, 'h'},
|
||||||
static const mem_table_struct mem_table[] = {
|
{"version", no_argument, NULL, 'V'},
|
||||||
@@ -779,6 +781,8 @@ nextline:
|
@@ -967,7 +969,7 @@ int main(int argc, char *argv[])
|
||||||
kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
|
atexit(close_stdout);
|
||||||
}
|
|
||||||
kb_main_cached = kb_page_cache + kb_slab_reclaimable;
|
|
||||||
+ if ((ev=getenv("PS_FULL_CACHE")))
|
|
||||||
+ kb_main_cached += kb_swap_cached + kb_nfs_unstable;
|
|
||||||
kb_swap_used = kb_swap_total - kb_swap_free;
|
|
||||||
|
|
||||||
/* if kb_main_available is greater than kb_main_total or our calculation of
|
while ((c =
|
||||||
--- vmstat.c
|
- getopt_long(argc, argv, "afmnsdDp:S:wthVy", longopts, NULL)) != -1)
|
||||||
+++ vmstat.c 2019-12-11 06:22:44.716984764 +0000
|
+ getopt_long(argc, argv, "aCfmnsdDp:S:wthVy", longopts, NULL)) != -1)
|
||||||
@@ -103,6 +103,7 @@ static void __attribute__ ((__noreturn__
|
switch (c) {
|
||||||
fputs(_(" -p, --partition <dev> partition specific statistics\n"), out);
|
case 'V':
|
||||||
fputs(_(" -S, --unit <char> define display unit\n"), out);
|
printf(PROCPS_NG_VERSION);
|
||||||
fputs(_(" -w, --wide wide output\n"), out);
|
@@ -1034,6 +1036,9 @@ int main(int argc, char *argv[])
|
||||||
+ fputs(_(" -C, --full-cache add further cache lines to main cache\n"), out);
|
case 't':
|
||||||
fputs(_(" -t, --timestamp show timestamp\n"), out);
|
t_option = 1;
|
||||||
fputs(USAGE_SEPARATOR, out);
|
break;
|
||||||
fputs(USAGE_HELP, out);
|
+ case 'C':
|
||||||
@@ -899,7 +900,7 @@ int main(int argc, char *argv[])
|
+ setenv("PS_FULL_CACHE", "yes", 1);
|
||||||
atexit(close_stdout);
|
+ break;
|
||||||
|
case 'y':
|
||||||
while ((c =
|
/* Don't display stats since system restart */
|
||||||
- getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts,
|
y_option = 1;
|
||||||
+ getopt_long(argc, argv, "aCfmnsdDp:S:wthV", longopts,
|
|
||||||
NULL)) != -1)
|
|
||||||
switch (c) {
|
|
||||||
case 'V':
|
|
||||||
@@ -968,6 +969,9 @@ int main(int argc, char *argv[])
|
|
||||||
case 't':
|
|
||||||
t_option = 1;
|
|
||||||
break;
|
|
||||||
+ case 'C':
|
|
||||||
+ setenv("PS_FULL_CACHE", "yes", 1);
|
|
||||||
+ break;
|
|
||||||
default:
|
|
||||||
/* no other aguments defined yet. */
|
|
||||||
usage(stderr);
|
|
||||||
|
@ -1,29 +1,33 @@
|
|||||||
--- vmstat.c
|
---
|
||||||
+++ vmstat.c 2015-01-27 14:57:19.467491788 +0000
|
vmstat.c | 12 ++++++------
|
||||||
@@ -295,7 +295,7 @@ static void new_format(void)
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
unsigned int intr[2], ctxt[2];
|
|
||||||
unsigned int sleep_half;
|
|
||||||
unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul;
|
|
||||||
- int debt = 0; /* handle idle ticks running backwards */
|
|
||||||
+ long long debt = 0; /* handle idle ticks running backwards */
|
|
||||||
struct tm *tm_ptr;
|
|
||||||
time_t the_time;
|
|
||||||
char timebuf[32];
|
|
||||||
@@ -386,12 +386,12 @@ static void new_format(void)
|
|
||||||
|
|
||||||
/* idle can run backwards for a moment -- kernel "feature" */
|
--- src/vmstat.c
|
||||||
if (debt) {
|
+++ src/vmstat.c 2022-03-29 09:21:41.156855432 +0000
|
||||||
- didl = (int)didl + debt;
|
@@ -357,7 +357,7 @@ static void new_format(void)
|
||||||
- debt = 0;
|
unsigned long pgpgin[2], pgpgout[2], pswpin[2] = {0,0}, pswpout[2];
|
||||||
+ didl = (long long)didl + debt;
|
unsigned int sleep_half;
|
||||||
+ debt = 0LL;
|
unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul;
|
||||||
}
|
- int debt = 0; /* handle idle ticks running backwards */
|
||||||
- if ((int)didl < 0) {
|
+ long long debt = 0; /* handle idle ticks running backwards */
|
||||||
- debt = (int)didl;
|
struct tm *tm_ptr;
|
||||||
- didl = 0;
|
time_t the_time;
|
||||||
+ if ((long long)didl < 0) {
|
char timebuf[32];
|
||||||
+ debt = (long long)didl;
|
@@ -484,12 +484,12 @@ static void new_format(void)
|
||||||
+ didl = 0ULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
Div = duse + dsys + didl + diow + dstl;
|
/* idle can run backwards for a moment -- kernel "feature" */
|
||||||
|
if (debt) {
|
||||||
|
- cpu_idl = (int)cpu_idl + debt;
|
||||||
|
- debt = 0;
|
||||||
|
+ cpu_idl = cpu_idl + debt;
|
||||||
|
+ debt = 0LL;
|
||||||
|
}
|
||||||
|
- if ((int)cpu_idl < 0) {
|
||||||
|
- debt = (int)cpu_idl;
|
||||||
|
- cpu_idl = 0;
|
||||||
|
+ if (cpu_idl < 0) {
|
||||||
|
+ debt = cpu_idl;
|
||||||
|
+ cpu_idl = 0LL;
|
||||||
|
}
|
||||||
|
|
||||||
|
Div = cpu_use + cpu_sys + cpu_idl + cpu_iow + cpu_sto;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
pmap.c | 47 ++++++++++++++++++++++++++++++++-----------
|
src/pmap.c | 47 ++++++++++++++++++++++++++++++++-----------
|
||||||
testsuite/pmap.test/pmap.exp | 17 +++++++--------
|
testsuite/pmap.test/pmap.exp | 17 +++++++--------
|
||||||
2 files changed, 44 insertions(+), 20 deletions(-)
|
2 files changed, 44 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
--- pmap.c
|
--- src/pmap.c
|
||||||
+++ pmap.c 2018-06-05 09:37:34.404294888 +0000
|
+++ src/pmap.c 2023-09-12 12:23:39.537610124 +0000
|
||||||
@@ -49,7 +49,9 @@ const char *nls_Address,
|
@@ -59,7 +59,9 @@ const char *nls_Address,
|
||||||
*nls_Kbytes,
|
*nls_Kbytes,
|
||||||
*nls_Mode,
|
*nls_Mode,
|
||||||
*nls_RSS,
|
*nls_RSS,
|
||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
static void nls_initialize(void)
|
static void nls_initialize(void)
|
||||||
{
|
{
|
||||||
@@ -73,7 +75,9 @@ static void nls_initialize(void)
|
@@ -83,7 +85,9 @@ static void nls_initialize(void)
|
||||||
nls_Kbytes = _("Kbytes");
|
nls_Kbytes = _("Kbytes");
|
||||||
nls_Mode = _("Mode");
|
nls_Mode = _("Mode");
|
||||||
nls_RSS = _("RSS");
|
nls_RSS = _("RSS");
|
||||||
@ -26,20 +26,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int justify_print(const char *str, int width, int right)
|
static int justify_print(const char *str, int width, int right)
|
||||||
@@ -141,10 +145,10 @@ static int d_option;
|
@@ -150,10 +154,10 @@ static int d_option = 0;
|
||||||
static int n_option;
|
static int n_option = 0;
|
||||||
static int N_option;
|
static int N_option = 0;
|
||||||
static int q_option;
|
static int q_option = 0;
|
||||||
-static int x_option;
|
-static int x_option = 0;
|
||||||
+static int x_option = 1;
|
+static int x_option = 1;
|
||||||
static int X_option;
|
static int X_option = 0;
|
||||||
|
|
||||||
-static int map_desc_showpath;
|
-static int map_desc_showpath;
|
||||||
+static int map_desc_showpath = 1;
|
+static int map_desc_showpath = 1;
|
||||||
|
|
||||||
static unsigned shm_minor = ~0u;
|
static unsigned shm_minor = ~0u;
|
||||||
|
|
||||||
@@ -522,12 +526,17 @@ static int one_proc(const proc_t * p)
|
@@ -544,12 +548,17 @@ static int one_proc (struct pids_stack *
|
||||||
char perms[32] = "";
|
char perms[32] = "";
|
||||||
const char *cp2 = NULL;
|
const char *cp2 = NULL;
|
||||||
unsigned long long rss = 0ull;
|
unsigned long long rss = 0ull;
|
||||||
@ -55,12 +55,12 @@
|
|||||||
int maxw1=0, maxw2=0, maxw3=0, maxw4=0, maxw5=0;
|
int maxw1=0, maxw2=0, maxw3=0, maxw4=0, maxw5=0;
|
||||||
+ int maxw6=0, maxw7=0;
|
+ int maxw6=0, maxw7=0;
|
||||||
|
|
||||||
/* Overkill, but who knows what is proper? The "w" prog uses
|
printf("%u: %s\n", PIDS_VAL(tgid, s_int, p, Pids_info), PIDS_VAL(cmdline, str, p, Pids_info));
|
||||||
* the tty width to determine this.
|
|
||||||
@@ -557,13 +566,15 @@ static int one_proc(const proc_t * p)
|
@@ -572,13 +581,15 @@ static int one_proc (struct pids_stack *
|
||||||
if (x_option) {
|
if (x_option) {
|
||||||
maxw1 = 16;
|
maxw1 = 16;
|
||||||
if (sizeof(KLONG) == 4) maxw1 = 8;
|
if (sizeof(long) == 4) maxw1 = 8;
|
||||||
- maxw2 = maxw3 = maxw4 = 7;
|
- maxw2 = maxw3 = maxw4 = 7;
|
||||||
+ maxw2 = maxw3 = maxw4 = maxw6 = maxw7 = 7;
|
+ maxw2 = maxw3 = maxw4 = maxw6 = maxw7 = 7;
|
||||||
maxw5 = 5;
|
maxw5 = 5;
|
||||||
@ -74,7 +74,7 @@
|
|||||||
maxw5 = justify_print(nls_Mode, maxw5, 0);
|
maxw5 = justify_print(nls_Mode, maxw5, 0);
|
||||||
justify_print(nls_Mapping, 0, 0);
|
justify_print(nls_Mapping, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -603,6 +614,11 @@ static int one_proc(const proc_t * p)
|
@@ -618,6 +629,11 @@ static int one_proc (struct pids_stack *
|
||||||
total_rss += smap_value;
|
total_rss += smap_value;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -86,29 +86,30 @@
|
|||||||
if (strcmp("Shared_Dirty", smap_key) == 0) {
|
if (strcmp("Shared_Dirty", smap_key) == 0) {
|
||||||
shared_dirty = smap_value;
|
shared_dirty = smap_value;
|
||||||
total_shared_dirty += smap_value;
|
total_shared_dirty += smap_value;
|
||||||
@@ -615,15 +631,19 @@ static int one_proc(const proc_t * p)
|
@@ -630,16 +646,20 @@ static int one_proc (struct pids_stack *
|
||||||
}
|
}
|
||||||
if (strcmp("Swap", smap_key) == 0) {
|
if (strcmp("Swap", smap_key) == 0) {
|
||||||
/* doesn't matter as long as last */
|
/* doesn't matter as long as last */
|
||||||
- if (cp2) printf("%0*" KLF "x %*lu %*llu %*llu %*s %s\n",
|
|
||||||
+ swap = smap_value;
|
+ swap = smap_value;
|
||||||
+ total_swap += smap_value;
|
+ total_swap += smap_value;
|
||||||
+ if (cp2) printf("%0*" KLF "x %*lu %*llu %*llu %*llu %*llu %*s %s\n",
|
if (cp2)
|
||||||
maxw1, start,
|
- printf("%0*lx %*lu %*llu %*llu %*s %s\n",
|
||||||
maxw2, (unsigned long)(diff >> 10),
|
+ printf("%0*lx %*lu %*llu %*llu %*llu %*llu %*s %s\n",
|
||||||
maxw3, rss,
|
maxw1, start_To_Avoid_Warning,
|
||||||
+ maxw6, pss,
|
maxw2, (unsigned long)(diff >> 10),
|
||||||
maxw4, (private_dirty + shared_dirty),
|
maxw3, rss,
|
||||||
+ maxw7, swap,
|
+ maxw6, pss,
|
||||||
maxw5, perms,
|
maxw4, (private_dirty + shared_dirty),
|
||||||
cp2);
|
+ maxw7, swap,
|
||||||
|
maxw5, perms,
|
||||||
|
cp2);
|
||||||
/* reset some counters */
|
/* reset some counters */
|
||||||
- rss = shared_dirty = private_dirty = 0ull;
|
- rss = shared_dirty = private_dirty = 0ull;
|
||||||
+ rss = pss = shared_dirty = private_dirty = swap = 0ull;
|
+ rss = pss = shared_dirty = private_dirty = swap = 0ull;
|
||||||
start = diff = end = 0;
|
diff = end = 0;
|
||||||
perms[0] = '\0';
|
perms[0] = '\0';
|
||||||
cp2 = NULL;
|
cp2 = NULL;
|
||||||
@@ -656,7 +676,6 @@ static int one_proc(const proc_t * p)
|
@@ -673,7 +693,6 @@ static int one_proc (struct pids_stack *
|
||||||
if (perms[3] == 's')
|
if (perms[3] == 's')
|
||||||
total_shared += diff;
|
total_shared += diff;
|
||||||
if (perms[3] == 'p') {
|
if (perms[3] == 'p') {
|
||||||
@ -116,7 +117,7 @@
|
|||||||
if (perms[1] == 'w')
|
if (perms[1] == 'w')
|
||||||
total_private_writeable += diff;
|
total_private_writeable += diff;
|
||||||
else
|
else
|
||||||
@@ -708,17 +727,21 @@ static int one_proc(const proc_t * p)
|
@@ -725,17 +744,21 @@ static int one_proc (struct pids_stack *
|
||||||
justify_print("----------------", maxw1, 0);
|
justify_print("----------------", maxw1, 0);
|
||||||
justify_print("-------", maxw2, 1);
|
justify_print("-------", maxw2, 1);
|
||||||
justify_print("-------", maxw3, 1);
|
justify_print("-------", maxw3, 1);
|
||||||
@ -140,7 +141,7 @@
|
|||||||
}
|
}
|
||||||
if (d_option) {
|
if (d_option) {
|
||||||
printf
|
printf
|
||||||
@@ -1028,16 +1051,18 @@ int main(int argc, char **argv)
|
@@ -1052,16 +1075,18 @@ int main(int argc, char **argv)
|
||||||
while ((c = getopt_long(argc, argv, "xXrdqA:hVcC:nN:p", longopts, NULL)) != -1)
|
while ((c = getopt_long(argc, argv, "xXrdqA:hVcC:nN:p", longopts, NULL)) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'x':
|
case 'x':
|
||||||
@ -162,7 +163,7 @@
|
|||||||
case 'q':
|
case 'q':
|
||||||
q_option = 1;
|
q_option = 1;
|
||||||
--- testsuite/pmap.test/pmap.exp
|
--- testsuite/pmap.test/pmap.exp
|
||||||
+++ testsuite/pmap.test/pmap.exp 2018-06-05 09:23:53.955370363 +0000
|
+++ testsuite/pmap.test/pmap.exp 2023-09-12 12:25:22.375764402 +0000
|
||||||
@@ -8,16 +8,16 @@ set pmap_procname "${mypid}:\\s+\\S+\[^\
|
@@ -8,16 +8,16 @@ set pmap_procname "${mypid}:\\s+\\S+\[^\
|
||||||
set pmap_initname "1:\\s+\\S+\[^\\r\]+\\s+"
|
set pmap_initname "1:\\s+\\S+\[^\\r\]+\\s+"
|
||||||
set pmap_std_header $pmap_procname
|
set pmap_std_header $pmap_procname
|
||||||
@ -205,12 +206,12 @@
|
|||||||
set test "pmap device output quiet (dq)"
|
set test "pmap device output quiet (dq)"
|
||||||
spawn $pmap -dq $mypid
|
spawn $pmap -dq $mypid
|
||||||
expect_table $test $pmap_procname $pmap_device_items "\$"
|
expect_table $test $pmap_procname $pmap_device_items "\$"
|
||||||
@@ -47,7 +46,7 @@ expect_table $test $pmap_procname $pmap_
|
@@ -50,7 +49,7 @@ if { [ file readable "/proc/self/smaps"
|
||||||
|
} else {
|
||||||
|
set test "pmap extended output"
|
||||||
|
spawn $pmap -x $mypid
|
||||||
|
- expect_table $test $pmap_ext_header $pmap_ext_items $pmap_ext_footer
|
||||||
|
+ expect_table $test $pmap_std_header $pmap_std_items $pmap_std_footer
|
||||||
|
|
||||||
set test "pmap extended output"
|
# -X and -XX have no real format as its dependent on smaps
|
||||||
spawn $pmap -x $mypid
|
set test "pmap extra extended output"
|
||||||
-expect_table $test $pmap_ext_header $pmap_ext_items $pmap_ext_footer
|
|
||||||
+expect_table $test $pmap_std_header $pmap_std_items $pmap_std_footer
|
|
||||||
|
|
||||||
# -X and -XX have no real format as its dependent on smaps
|
|
||||||
set test "pmap extra extended output"
|
|
||||||
|
@ -1,407 +0,0 @@
|
|||||||
diff -ur procps-3.3.17/configure.ac procps-3.3.17-no-utmp/configure.ac
|
|
||||||
--- procps-3.3.17/configure.ac 2023-10-27 17:02:55.230522174 +0200
|
|
||||||
+++ procps-3.3.17-no-utmp/configure.ac 2023-10-27 17:05:56.027565296 +0200
|
|
||||||
@@ -214,6 +214,13 @@
|
|
||||||
AS_IF([test "x$with_systemd" != "xno"], [
|
|
||||||
PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
|
|
||||||
AC_DEFINE(WITH_SYSTEMD, 1, [enable systemd support])
|
|
||||||
+
|
|
||||||
+ # The functions needed to replace utmp with logind are only available
|
|
||||||
+ # with systemd v254 or later.
|
|
||||||
+ old_LIBS="$LIBS"
|
|
||||||
+ LIBS="$LIBS $SYSTEMD_LIBS"
|
|
||||||
+ AC_CHECK_FUNCS([sd_session_get_leader])
|
|
||||||
+ LIBS="$old_LIBS"
|
|
||||||
])
|
|
||||||
AM_CONDITIONAL([WITH_SYSTEMD], [test x$with_systemd != xno])
|
|
||||||
|
|
||||||
diff -ur procps-3.3.17/proc/whattime.c procps-3.3.17-no-utmp/proc/whattime.c
|
|
||||||
--- procps-3.3.17/proc/whattime.c 2021-02-09 11:11:25.000000000 +0100
|
|
||||||
+++ procps-3.3.17-no-utmp/proc/whattime.c 2023-10-27 17:05:56.027565296 +0200
|
|
||||||
@@ -38,6 +38,15 @@
|
|
||||||
#include "whattime.h"
|
|
||||||
#include "sysinfo.h"
|
|
||||||
|
|
||||||
+#ifdef WITH_SYSTEMD
|
|
||||||
+#include <systemd/sd-daemon.h>
|
|
||||||
+#include <systemd/sd-login.h>
|
|
||||||
+#endif
|
|
||||||
+#ifdef WITH_ELOGIND
|
|
||||||
+#include <elogind/sd-daemon.h>
|
|
||||||
+#include <elogind/sd-login.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static char buf[256];
|
|
||||||
static double av[3];
|
|
||||||
|
|
||||||
@@ -98,6 +107,11 @@
|
|
||||||
/* count the number of users */
|
|
||||||
|
|
||||||
numuser = 0;
|
|
||||||
+#if defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)
|
|
||||||
+ if (sd_booted() > 0)
|
|
||||||
+ numuser = sd_get_sessions(NULL);
|
|
||||||
+ else {
|
|
||||||
+#endif
|
|
||||||
setutent();
|
|
||||||
while ((utmpstruct = getutent())) {
|
|
||||||
if ((utmpstruct->ut_type == USER_PROCESS) &&
|
|
||||||
@@ -105,6 +119,10 @@
|
|
||||||
numuser++;
|
|
||||||
}
|
|
||||||
endutent();
|
|
||||||
+#if defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
|
|
||||||
pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s");
|
|
||||||
|
|
||||||
Datei procps-3.3.17/screen.620TQo/23075..f05 ist ein Socket, während Datei procps-3.3.17-no-utmp/screen.620TQo/23075..f05 ein Socket ist.
|
|
||||||
diff -ur procps-3.3.17/w.c procps-3.3.17-no-utmp/w.c
|
|
||||||
--- procps-3.3.17/w.c 2023-10-27 17:02:55.194521966 +0200
|
|
||||||
+++ procps-3.3.17-no-utmp/w.c 2023-10-27 18:10:00.371042829 +0200
|
|
||||||
@@ -56,11 +56,22 @@
|
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#ifdef HAVE_UTMPX_H
|
|
||||||
-# include <utmpx.h>
|
|
||||||
+#include <utmpx.h>
|
|
||||||
+#ifndef HAVE_UT_HOSTSIZE_IN_UTMPX
|
|
||||||
+#include <utmp.h>
|
|
||||||
+#endif
|
|
||||||
#else
|
|
||||||
# include <utmp.h>
|
|
||||||
#endif
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
+#ifdef WITH_SYSTEMD
|
|
||||||
+# include <systemd/sd-login.h>
|
|
||||||
+# include <systemd/sd-daemon.h>
|
|
||||||
+#endif
|
|
||||||
+#ifdef WITH_ELOGIND
|
|
||||||
+# include <elogind/sd-login.h>
|
|
||||||
+# include <elogind/sd-daemon.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static int ignoreuser = 0; /* for '-u' */
|
|
||||||
static int oldstyle = 0; /* for '-o' */
|
|
||||||
@@ -72,12 +83,6 @@
|
|
||||||
typedef struct utmp utmp_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE)
|
|
||||||
-# define UT_HOSTSIZE __UT_HOSTSIZE
|
|
||||||
-# define UT_LINESIZE __UT_LINESIZE
|
|
||||||
-# define UT_NAMESIZE __UT_NAMESIZE
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#ifdef W_SHOWFROM
|
|
||||||
# define FROM_STRING "on"
|
|
||||||
#else
|
|
||||||
@@ -198,7 +203,25 @@
|
|
||||||
|
|
||||||
|
|
||||||
/* This routine prints either the hostname or the IP address of the remote */
|
|
||||||
-static void print_from(const utmp_t *restrict const u, const int ip_addresses, const int fromlen) {
|
|
||||||
+static void print_from(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ const char *session,
|
|
||||||
+#endif
|
|
||||||
+ const utmp_t *restrict const u, const int ip_addresses, const int fromlen) {
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (session) {
|
|
||||||
+ char *host = NULL;
|
|
||||||
+ int r;
|
|
||||||
+
|
|
||||||
+ r = sd_session_get_remote_host(session, &host);
|
|
||||||
+ if (r < 0 || host == NULL)
|
|
||||||
+ print_host("", 0, fromlen);
|
|
||||||
+ else {
|
|
||||||
+ print_host(host, strlen(host), fromlen == 0?strlen(host):fromlen);
|
|
||||||
+ free(host);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
char buf[fromlen + 1];
|
|
||||||
char buf_ipv6[INET6_ADDRSTRLEN];
|
|
||||||
int len;
|
|
||||||
@@ -243,6 +266,9 @@
|
|
||||||
#else
|
|
||||||
print_host(u->ut_host, UT_HOSTSIZE, fromlen);
|
|
||||||
#endif
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -341,7 +367,11 @@
|
|
||||||
* the user for that login session is doing currently. This the
|
|
||||||
* essential core of 'w'.
|
|
||||||
*/
|
|
||||||
-static const proc_t *getproc(const utmp_t * restrict const u,
|
|
||||||
+static const proc_t *getproc(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ const char *session,
|
|
||||||
+#endif
|
|
||||||
+ const utmp_t * restrict const u,
|
|
||||||
const char *restrict const tty,
|
|
||||||
unsigned long long *restrict const jcpu,
|
|
||||||
int *restrict const found_utpid)
|
|
||||||
@@ -351,9 +381,16 @@
|
|
||||||
const proc_t *best = NULL;
|
|
||||||
const proc_t *secondbest = NULL;
|
|
||||||
unsigned uid = ~0U;
|
|
||||||
+ pid_t ut_pid = -1;
|
|
||||||
|
|
||||||
*found_utpid = 0;
|
|
||||||
if (!ignoreuser) {
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (session) {
|
|
||||||
+ if (sd_session_get_uid(session, &uid) < 0)
|
|
||||||
+ return 0;
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
char buf[UT_NAMESIZE + 1];
|
|
||||||
/* pointer to static data */
|
|
||||||
struct passwd *passwd_data;
|
|
||||||
@@ -364,12 +401,21 @@
|
|
||||||
return NULL;
|
|
||||||
uid = passwd_data->pw_uid;
|
|
||||||
/* OK to have passwd_data go out of scope here */
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
line = tty_to_dev(tty);
|
|
||||||
*jcpu = 0;
|
|
||||||
+ if (u)
|
|
||||||
+ ut_pid = u->ut_pid;
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ else
|
|
||||||
+ sd_session_get_leader(session, &ut_pid);
|
|
||||||
+#endif
|
|
||||||
for (; *pptr; pptr++) {
|
|
||||||
- const proc_t *restrict const tmp = *pptr;
|
|
||||||
- if (unlikely(tmp->tgid == u->ut_pid)) {
|
|
||||||
+ const proc_t *restrict const tmp = *pptr;
|
|
||||||
+ if (unlikely(tmp->tgid == ut_pid)) {
|
|
||||||
*found_utpid = 1;
|
|
||||||
if (!best)
|
|
||||||
best = tmp;
|
|
||||||
@@ -393,7 +439,11 @@
|
|
||||||
return best ? best : secondbest;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void showinfo(utmp_t * u, int formtype, int maxcmd, int from,
|
|
||||||
+static void showinfo(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ const char *session, const char *name,
|
|
||||||
+#endif
|
|
||||||
+ utmp_t * u, int formtype, int maxcmd, int from,
|
|
||||||
int userlen, int fromlen, const int ip_addresses)
|
|
||||||
{
|
|
||||||
unsigned long long jcpu;
|
|
||||||
@@ -402,14 +452,36 @@
|
|
||||||
char uname[UT_NAMESIZE + 1] = "", tty[5 + UT_LINESIZE + 1] = "/dev/";
|
|
||||||
const proc_t *best;
|
|
||||||
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (session) {
|
|
||||||
+ char *sd_tty;
|
|
||||||
+
|
|
||||||
+ if (sd_session_get_tty(session, &sd_tty) >= 0) {
|
|
||||||
+ for (i = 0; i < strlen (sd_tty); i++)
|
|
||||||
+ /* clean up tty if garbled */
|
|
||||||
+ if (isalnum(sd_tty[i]) || (sd_tty[i] == '/'))
|
|
||||||
+ tty[i + 5] = sd_tty[i];
|
|
||||||
+ else
|
|
||||||
+ tty[i + 5] = '\0';
|
|
||||||
+ free(sd_tty);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
for (i = 0; i < UT_LINESIZE; i++)
|
|
||||||
/* clean up tty if garbled */
|
|
||||||
if (isalnum(u->ut_line[i]) || (u->ut_line[i] == '/'))
|
|
||||||
tty[i + 5] = u->ut_line[i];
|
|
||||||
else
|
|
||||||
tty[i + 5] = '\0';
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
- best = getproc(u, tty + 5, &jcpu, &ut_pid_found);
|
|
||||||
+ best = getproc(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ session,
|
|
||||||
+#endif
|
|
||||||
+ u, tty + 5, &jcpu, &ut_pid_found);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* just skip if stale utmp entry (i.e. login proc doesn't
|
|
||||||
@@ -420,26 +492,56 @@
|
|
||||||
if (!ut_pid_found)
|
|
||||||
return;
|
|
||||||
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (name)
|
|
||||||
+ strncpy(uname, name, UT_NAMESIZE);
|
|
||||||
+ else
|
|
||||||
+#endif
|
|
||||||
+ strncpy(uname, u->ut_user, UT_NAMESIZE);
|
|
||||||
/* force NUL term for printf */
|
|
||||||
- strncpy(uname, u->ut_user, UT_NAMESIZE);
|
|
||||||
+ uname[UT_NAMESIZE] = '\0';
|
|
||||||
|
|
||||||
if (formtype) {
|
|
||||||
- int utlnlen = 8;
|
|
||||||
- if (formtype > 1) {
|
|
||||||
- userlen = strnlen(uname, UT_NAMESIZE);
|
|
||||||
- fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
|
|
||||||
- utlnlen = strnlen(u->ut_line, UT_LINESIZE);
|
|
||||||
- maxcmd = MAX_CMD_WIDTH;
|
|
||||||
+ int utlnlen = 8;
|
|
||||||
+ if (formtype > 1) {
|
|
||||||
+ userlen = strnlen(uname, UT_NAMESIZE);
|
|
||||||
+ if (u) {
|
|
||||||
+ fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
|
|
||||||
+ utlnlen = strnlen(u->ut_line, UT_LINESIZE);
|
|
||||||
+ } else {
|
|
||||||
+ fromlen = 0;
|
|
||||||
+ utlnlen = strlen (tty+5);
|
|
||||||
}
|
|
||||||
- printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, u->ut_line);
|
|
||||||
+ maxcmd = MAX_CMD_WIDTH;
|
|
||||||
+ }
|
|
||||||
+ printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, tty+5);
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (session) {
|
|
||||||
+ uint64_t ltime;
|
|
||||||
+
|
|
||||||
if (from)
|
|
||||||
- print_from(u, ip_addresses, fromlen);
|
|
||||||
+ print_from(session, NULL, ip_addresses, fromlen);
|
|
||||||
+
|
|
||||||
+ sd_session_get_start_time(session, <ime);
|
|
||||||
+ print_logintime(ltime/((uint64_t) 1000000ULL), stdout);
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
+ if (from)
|
|
||||||
+ print_from(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ NULL,
|
|
||||||
+#endif
|
|
||||||
+ u, ip_addresses, fromlen);
|
|
||||||
+
|
|
||||||
#ifdef HAVE_UTMPX_H
|
|
||||||
print_logintime(u->ut_tv.tv_sec, stdout);
|
|
||||||
#else
|
|
||||||
print_logintime(u->ut_time, stdout);
|
|
||||||
#endif
|
|
||||||
- if (*u->ut_line == ':')
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+ if (u && *u->ut_line == ':')
|
|
||||||
/* idle unknown for xdm logins */
|
|
||||||
printf(" ?xdm? ");
|
|
||||||
else
|
|
||||||
@@ -454,11 +556,15 @@
|
|
||||||
} else
|
|
||||||
printf(" ? ");
|
|
||||||
} else {
|
|
||||||
- printf("%-*.*s%-9.8s", userlen + 1, userlen, u->ut_user,
|
|
||||||
- u->ut_line);
|
|
||||||
+ printf("%-*.*s%-9.8s", userlen + 1, userlen, uname,
|
|
||||||
+ tty+5);
|
|
||||||
if (from)
|
|
||||||
- print_from(u, ip_addresses, fromlen);
|
|
||||||
- if (*u->ut_line == ':')
|
|
||||||
+ print_from(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ session,
|
|
||||||
+#endif
|
|
||||||
+ u, ip_addresses, fromlen);
|
|
||||||
+ if (u && *u->ut_line == ':')
|
|
||||||
/* idle unknown for xdm logins */
|
|
||||||
printf(" ?xdm? ");
|
|
||||||
else
|
|
||||||
@@ -635,7 +741,40 @@
|
|
||||||
else
|
|
||||||
printf(_(" IDLE WHAT\n"));
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ if (sd_booted() > 0) {
|
|
||||||
+ char **sessions_list;
|
|
||||||
+ int sessions;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ sessions = sd_get_sessions (&sessions_list);
|
|
||||||
+ if (sessions < 0 && sessions != -ENOENT)
|
|
||||||
+ error(EXIT_FAILURE, -sessions, _("error getting sessions"));
|
|
||||||
+
|
|
||||||
+ if (sessions >= 0) {
|
|
||||||
+ for (int i = 0; i < sessions; i++) {
|
|
||||||
+ char *name;
|
|
||||||
+ int r;
|
|
||||||
+
|
|
||||||
+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0)
|
|
||||||
+ error(EXIT_FAILURE, -r, _("get user name failed"));
|
|
||||||
+
|
|
||||||
+ if (user) {
|
|
||||||
+ if (!strcmp(name, user))
|
|
||||||
+ showinfo(sessions_list[i], name, NULL, longform,
|
|
||||||
+ maxcmd, from, userlen, fromlen,
|
|
||||||
+ ip_addresses);
|
|
||||||
+ } else {
|
|
||||||
+ showinfo(sessions_list[i], name, NULL, longform, maxcmd,
|
|
||||||
+ from, userlen, fromlen, ip_addresses);
|
|
||||||
+ }
|
|
||||||
+ free(name);
|
|
||||||
+ free(sessions_list[i]);
|
|
||||||
+ }
|
|
||||||
+ free(sessions_list);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
#ifdef HAVE_UTMPX_H
|
|
||||||
setutxent();
|
|
||||||
#else
|
|
||||||
@@ -654,7 +793,11 @@
|
|
||||||
if (u->ut_type != USER_PROCESS)
|
|
||||||
continue;
|
|
||||||
if (!strncmp(u->ut_user, user, UT_NAMESIZE))
|
|
||||||
- showinfo(u, longform, maxcmd, from, userlen,
|
|
||||||
+ showinfo(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ NULL, NULL,
|
|
||||||
+#endif
|
|
||||||
+ u, longform, maxcmd, from, userlen,
|
|
||||||
fromlen, ip_addresses);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
@@ -669,7 +812,11 @@
|
|
||||||
if (u->ut_type != USER_PROCESS)
|
|
||||||
continue;
|
|
||||||
if (*u->ut_user)
|
|
||||||
- showinfo(u, longform, maxcmd, from, userlen,
|
|
||||||
+ showinfo(
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ NULL, NULL,
|
|
||||||
+#endif
|
|
||||||
+ u, longform, maxcmd, from, userlen,
|
|
||||||
fromlen, ip_addresses);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -678,6 +825,9 @@
|
|
||||||
#else
|
|
||||||
endutent();
|
|
||||||
#endif
|
|
||||||
+#if (defined(WITH_SYSTEMD) || defined(WITH_ELOGIND)) && defined(HAVE_SD_SESSION_GET_LEADER)
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
BIN
procps-ng-3.3.17.tar.xz
(Stored with Git LFS)
BIN
procps-ng-3.3.17.tar.xz
(Stored with Git LFS)
Binary file not shown.
@ -1,99 +0,0 @@
|
|||||||
---
|
|
||||||
ps/common.h | 1 +
|
|
||||||
ps/global.c | 5 ++++-
|
|
||||||
ps/output.c | 19 ++++++++++---------
|
|
||||||
3 files changed, 15 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
--- ps/common.h
|
|
||||||
+++ ps/common.h 2018-04-04 11:14:33.915688098 +0000
|
|
||||||
@@ -303,6 +303,7 @@ extern int running_only;
|
|
||||||
extern int screen_cols;
|
|
||||||
extern int screen_rows;
|
|
||||||
extern time_t seconds_since_boot;
|
|
||||||
+extern unsigned long long jiffies_since_boot;
|
|
||||||
extern selection_node *selection_list;
|
|
||||||
extern unsigned simple_select;
|
|
||||||
extern sort_node *sort_list;
|
|
||||||
--- ps/global.c
|
|
||||||
+++ ps/global.c 2018-04-04 11:14:33.915688098 +0000
|
|
||||||
@@ -78,6 +78,7 @@ int prefer_bsd_defaults = -1
|
|
||||||
int screen_cols = -1;
|
|
||||||
int screen_rows = -1;
|
|
||||||
time_t seconds_since_boot = -1;
|
|
||||||
+unsigned long long jiffies_since_boot = -1;
|
|
||||||
selection_node *selection_list = (selection_node *)0xdeadbeef;
|
|
||||||
unsigned simple_select = 0xffffffff;
|
|
||||||
sort_node *sort_list = (sort_node *)0xdeadbeef; /* ready-to-use sort list */
|
|
||||||
@@ -361,6 +362,7 @@ static const char *set_personality(void)
|
|
||||||
/************ Call this to reinitialize everything ***************/
|
|
||||||
void reset_global(void){
|
|
||||||
static proc_t p;
|
|
||||||
+ double uptime_secs;
|
|
||||||
reset_selection_list();
|
|
||||||
look_up_our_self(&p);
|
|
||||||
set_screen_size();
|
|
||||||
@@ -383,7 +385,8 @@ void reset_global(void){
|
|
||||||
negate_selection = 0;
|
|
||||||
page_size = getpagesize();
|
|
||||||
running_only = 0;
|
|
||||||
- seconds_since_boot = uptime(0,0);
|
|
||||||
+ seconds_since_boot = uptime(&uptime_secs,0);
|
|
||||||
+ jiffies_since_boot = ((long double)uptime_secs * Hertz);
|
|
||||||
selection_list = NULL;
|
|
||||||
simple_select = 0;
|
|
||||||
sort_list = NULL;
|
|
||||||
--- ps/output.c
|
|
||||||
+++ ps/output.c 2018-04-04 11:14:33.915688098 +0000
|
|
||||||
@@ -134,6 +134,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)) ? ((unsigned long long)jiffies_since_boot - (P->start_time)) : 0)
|
|
||||||
|
|
||||||
#define CMP_COOKED_TIME(NAME) \
|
|
||||||
static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
|
|
||||||
@@ -507,11 +508,11 @@ static int pr_etimes(char *restrict cons
|
|
||||||
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 pcpu = 0; /* scaled %cpu, 99 means 99% */
|
|
||||||
- unsigned long long seconds; /* seconds of process life */
|
|
||||||
+ unsigned long long jiffies; /* jiffies of process life */
|
|
||||||
total_time = pp->utime + pp->stime;
|
|
||||||
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
|
|
||||||
- seconds = cook_etime(pp);
|
|
||||||
- if(seconds) pcpu = (total_time * 100ULL / Hertz) / seconds;
|
|
||||||
+ jiffies = cook_jtime(pp);
|
|
||||||
+ if(jiffies) pcpu = (total_time * 100ULL) / jiffies;
|
|
||||||
if (pcpu > 99U) pcpu = 99U;
|
|
||||||
return snprintf(outbuf, COLWID, "%2u", pcpu);
|
|
||||||
}
|
|
||||||
@@ -519,11 +520,11 @@ static int pr_c(char *restrict const out
|
|
||||||
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 pcpu = 0; /* scaled %cpu, 999 means 99.9% */
|
|
||||||
- unsigned long long seconds; /* seconds of process life */
|
|
||||||
+ unsigned long long jiffies; /* jiffies of process life */
|
|
||||||
total_time = pp->utime + pp->stime;
|
|
||||||
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
|
|
||||||
- seconds = cook_etime(pp);
|
|
||||||
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
|
|
||||||
+ jiffies = cook_jtime(pp);
|
|
||||||
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
|
|
||||||
if (pcpu > 999U)
|
|
||||||
return snprintf(outbuf, COLWID, "%u", pcpu/10U);
|
|
||||||
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
|
|
||||||
@@ -532,11 +533,11 @@ static int pr_pcpu(char *restrict const
|
|
||||||
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 pcpu = 0; /* scaled %cpu, 999 means 99.9% */
|
|
||||||
- unsigned long long seconds; /* seconds of process life */
|
|
||||||
+ unsigned long long jiffies; /* jiffies of process life */
|
|
||||||
total_time = pp->utime + pp->stime;
|
|
||||||
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
|
|
||||||
- seconds = cook_etime(pp);
|
|
||||||
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
|
|
||||||
+ jiffies = cook_jtime(pp);
|
|
||||||
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
|
|
||||||
if (pcpu > 999U) pcpu = 999U;
|
|
||||||
return snprintf(outbuf, COLWID, "%3u", pcpu);
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
Do not setup SIGHUP signal handler if we are in the batch mode
|
|
||||||
|
|
||||||
Top enables a signal handler for the SIGHUP signal (loss of terminal). While
|
|
||||||
this makes sense for top's default interactive mode, it doesn't make any sense
|
|
||||||
for batch mode. If you run top in nohup just to collect data over time and
|
|
||||||
disconnect top finishes which is not what one would expect.
|
|
||||||
Index: procps-3.2.8/top.c
|
|
||||||
|
|
||||||
---
|
|
||||||
top/top.c | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- top/top.c
|
|
||||||
+++ top/top.c 2018-04-04 11:33:59.278280201 +0000
|
|
||||||
@@ -3691,7 +3691,13 @@ static void before (char *me) {
|
|
||||||
sa.sa_flags = 0;
|
|
||||||
for (i = SIGRTMAX; i; i--) {
|
|
||||||
switch (i) {
|
|
||||||
- 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 SIGUSR1: case SIGUSR2:
|
|
||||||
sa.sa_handler = sig_endpgm;
|
|
@ -8,12 +8,12 @@ Ignore it for avoiding the kernel warning message.
|
|||||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
|
||||||
---
|
---
|
||||||
sysctl.c | 1 +
|
src/sysctl.c | 1 +
|
||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
--- a/sysctl.c
|
--- a/src/sysctl.c
|
||||||
+++ b/sysctl.c
|
+++ b/src/sysctl.c
|
||||||
@@ -59,6 +59,7 @@ static const char DEFAULT_PRELOAD[] = "/
|
@@ -63,6 +58,7 @@ static const char DEFAULT_PRELOAD[] = "/
|
||||||
static const char *DEPRECATED[] = {
|
static const char *DEPRECATED[] = {
|
||||||
"base_reachable_time",
|
"base_reachable_time",
|
||||||
"retrans_time",
|
"retrans_time",
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
top/top.c | 6 +++---
|
src/top/top.c | 6 +++---
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- top/top.c
|
--- src/top/top.c
|
||||||
+++ top/top.c 2018-04-04 11:49:56.472660056 +0000
|
+++ src/top/top.c 2022-03-29 10:24:43.327490984 +0000
|
||||||
@@ -1626,9 +1626,9 @@ static inline const char *make_str_utf8
|
@@ -1684,9 +1684,9 @@ static inline const char *make_str_utf8
|
||||||
static const char *scale_mem (int target, unsigned long num, int width, int justr) {
|
static const char *scale_mem (int target, float num, int width, int justr) {
|
||||||
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
|
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
|
||||||
#ifdef BOOST_MEMORY
|
#ifdef BOOST_MEMORY
|
||||||
- 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", NULL };
|
||||||
@ -15,13 +15,13 @@
|
|||||||
+ static const char *fmttab[] = { "%.0f", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", NULL };
|
+ static const char *fmttab[] = { "%.0f", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", "%.1f%c", NULL };
|
||||||
#endif
|
#endif
|
||||||
static char buf[SMLBUFSIZ];
|
static char buf[SMLBUFSIZ];
|
||||||
float scaled_num;
|
char *psfx;
|
||||||
@@ -1640,7 +1640,7 @@ static const char *scale_mem (int target
|
@@ -1696,7 +1696,7 @@ static const char *scale_mem (int target
|
||||||
|
if (Rc.zero_suppress && 0 >= num)
|
||||||
goto end_justifies;
|
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++) {
|
||||||
+ 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
|
if (i >= target
|
||||||
&& (width >= snprintf(buf, sizeof(buf), fmttab[i], scaled_num, *psfx)))
|
&& (width >= snprintf(buf, sizeof(buf), fmttab[i], num, *psfx)))
|
||||||
goto end_justifies;
|
goto end_justifies;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
proc/readproc.c | 20 ++++++++++----------
|
library/readproc.c | 20 ++++++++++----------
|
||||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
--- proc/readproc.c
|
--- library/readproc.c
|
||||||
+++ proc/readproc.c 2018-06-05 08:54:06.408030693 +0000
|
+++ library/readproc.c 2022-03-28 11:51:04.751862744 +0000
|
||||||
@@ -675,7 +675,7 @@ static int file2str(const char *director
|
@@ -735,7 +735,7 @@ static int file2str(const char *director
|
||||||
else ub->buf = xcalloc((ub->siz = buffGRW));
|
}
|
||||||
len = snprintf(path, sizeof path, "%s/%s", directory, what);
|
len = snprintf(path, sizeof path, "%s/%s", directory, what);
|
||||||
if (len <= 0 || (size_t)len >= sizeof path) return -1;
|
if (len <= 0 || (size_t)len >= sizeof path) return -1;
|
||||||
- if (-1 == (fd = open(path, O_RDONLY, 0))) return -1;
|
- if (-1 == (fd = open(path, O_RDONLY, 0))) return -1;
|
||||||
@ -13,9 +13,9 @@
|
|||||||
while (0 < (num = read(fd, ub->buf + tot_read, ub->siz - tot_read))) {
|
while (0 < (num = read(fd, ub->buf + tot_read, ub->siz - tot_read))) {
|
||||||
tot_read += num;
|
tot_read += num;
|
||||||
if (tot_read < ub->siz) break;
|
if (tot_read < ub->siz) break;
|
||||||
@@ -695,25 +695,25 @@ static int file2str(const char *director
|
@@ -759,25 +759,25 @@ 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 */
|
||||||
char *p, *rbuf = 0, *endbuf, **q, **ret, *strp;
|
char *p, *rbuf = 0, *endbuf, **q, **ret, *strp;
|
||||||
- int fd, tot = 0, n, c, end_of_file = 0;
|
- int fd, tot = 0, n, c, end_of_file = 0;
|
||||||
- int align;
|
- int align;
|
||||||
@ -30,37 +30,37 @@
|
|||||||
|
|
||||||
/* read whole file into a memory buffer, allocating as we go */
|
/* read whole file into a memory buffer, allocating as we go */
|
||||||
while ((n = read(fd, buf, sizeof buf - 1)) >= 0) {
|
while ((n = read(fd, buf, sizeof buf - 1)) >= 0) {
|
||||||
- if (n < (int)(sizeof buf - 1))
|
- if (n < (int)(sizeof buf - 1))
|
||||||
+ if (n < sizeof buf - 1)
|
+ if (n < (sizeof(buf) - 1))
|
||||||
end_of_file = 1;
|
end_of_file = 1;
|
||||||
- if (n <= 0 && tot <= 0) { /* nothing read now, nothing read before */
|
- if (n <= 0 && tot <= 0) { /* nothing read now, nothing read before */
|
||||||
+ if (n <= 0 && tot <= 0) /* nothing read now, nothing read before */
|
+ if (n <= 0 && tot <= 0) /* nothing read now, nothing read before */
|
||||||
break; /* process died between our open and read */
|
break; /* process died between our open and read */
|
||||||
- }
|
- }
|
||||||
+
|
+
|
||||||
/* ARG_LEN is our guesstimated median length of a command-line argument
|
/* ARG_LEN is our guesstimated median length of a command-line argument
|
||||||
or environment variable (the minimum is 1, the maximum is 131072) */
|
or environment variable (the minimum is 1, the maximum is 131072) */
|
||||||
#define ARG_LEN 64
|
#define ARG_LEN 64
|
||||||
- if (tot >= INT_MAX / (ARG_LEN + (int)sizeof(char*)) * ARG_LEN - n) {
|
- if (tot >= INT_MAX / (ARG_LEN + (int)sizeof(char*)) * ARG_LEN - n) {
|
||||||
+ if (tot >= INT_MAX / (ARG_LEN + sizeof(char*)) * ARG_LEN - n) {
|
+ if (tot >= INT_MAX / (ARG_LEN + sizeof(char*)) * ARG_LEN - n) {
|
||||||
end_of_file = 1; /* integer overflow: null-terminate and break */
|
end_of_file = 1; /* integer overflow: null-terminate and break */
|
||||||
n = 0; /* but tot > 0 */
|
n = 0; /* but tot > 0 */
|
||||||
}
|
}
|
||||||
@@ -741,7 +741,7 @@ static char** file2strvec(const char* di
|
@@ -811,7 +811,7 @@ static char **file2strvec(const char *di
|
||||||
c = sizeof(char*); /* one extra for NULL term */
|
c = sizeof(char*); /* one extra for NULL term */
|
||||||
for (p = rbuf; p < endbuf; p++) {
|
for (p = rbuf; p < endbuf; p++) {
|
||||||
if (!*p || *p == '\n') {
|
if (!*p || *p == '\n') {
|
||||||
- if (c >= INT_MAX - (tot + (int)sizeof(char*) + align)) break;
|
- if (c >= INT_MAX - (tot + (int)sizeof(char*) + align)) break;
|
||||||
+ if (c >= INT_MAX - (tot + sizeof(char*) + align)) break;
|
+ if (c >= INT_MAX - (tot + sizeof(char*) + align)) break;
|
||||||
c += sizeof(char*);
|
c += sizeof(char*);
|
||||||
}
|
}
|
||||||
if (*p == '\n')
|
if (*p == '\n')
|
||||||
@@ -753,7 +753,7 @@ static char** file2strvec(const char* di
|
@@ -824,7 +824,7 @@ static char **file2strvec(const char *di
|
||||||
q = ret = (char**) (endbuf+align); /* ==> free(*ret) to dealloc */
|
q = ret = (char**) (endbuf+align); /* ==> free(*ret) to dealloc */
|
||||||
for (strp = p = rbuf; p < endbuf; p++) {
|
for (strp = p = rbuf; p < endbuf; p++) {
|
||||||
if (!*p) { /* NUL char implies that */
|
if (!*p) { /* NUL char implies that */
|
||||||
- if (c < 2 * (int)sizeof(char*)) break;
|
- if (c < 2 * (int)sizeof(char*)) break;
|
||||||
+ if (c < 2 * sizeof(char*)) break;
|
+ if (c < 2 * sizeof(char*)) break;
|
||||||
c -= sizeof(char*);
|
c -= sizeof(char*);
|
||||||
*q++ = strp; /* point ptrs to the strings */
|
*q++ = strp; /* point ptrs to the strings */
|
||||||
strp = p+1; /* next string -> next char */
|
strp = p+1; /* next string -> next char */
|
||||||
|
@ -4,32 +4,30 @@
|
|||||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
--- Makefile.am
|
--- Makefile.am
|
||||||
+++ Makefile.am 2018-04-04 12:28:14.937957527 +0000
|
+++ Makefile.am 2022-10-20 13:21:37.505517043 +0000
|
||||||
@@ -171,7 +171,7 @@ else
|
@@ -191,7 +191,7 @@ src_top_top_SOURCES += local/strverscmp.
|
||||||
slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
|
src_top_top_CFLAGS = @NCURSES_CFLAGS@
|
||||||
+top_top_LDADD = $(LDADD) @TOP_NCURSES_LIBS@ $(DL_LIB)
|
-src_top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
|
||||||
|
+src_top_top_LDADD = $(LDADD) @TOP_NCURSES_LIBS@ $(DL_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_SKILL
|
if BUILD_SKILL
|
||||||
--- configure.ac
|
--- configure.ac
|
||||||
+++ configure.ac 2018-04-04 12:29:23.364676155 +0000
|
+++ configure.ac 2022-10-20 13:23:50.707138810 +0000
|
||||||
@@ -194,8 +194,16 @@ else
|
@@ -281,6 +281,14 @@ fi
|
||||||
else
|
# else
|
||||||
WATCH_NCURSES_LIBS="$NCURSES_LIBS"
|
# WATCH_NCURSES_LIBS="$NCURSES_LIBS"
|
||||||
fi
|
# fi
|
||||||
+ cf_tinfo=""
|
+cf_tinfo=""
|
||||||
+ AC_CHECK_LIB(tinfo, setupterm, [cf_tinfo="tinfo"])
|
+AC_CHECK_LIB(tinfo, setupterm, [cf_tinfo="tinfo"])
|
||||||
+ if test x$cf_tinfo = xtinfo ; then
|
+if test x$cf_tinfo = xtinfo ; then
|
||||||
+ TOP_NCURSES_LIBS="-ltinfo"
|
+ TOP_NCURSES_LIBS="-ltinfo"
|
||||||
+ else
|
+else
|
||||||
+ TOP_NCURSES_LIBS="$NCURSES_LIBS"
|
+ TOP_NCURSES_LIBS="$NCURSES_LIBS"
|
||||||
+ fi
|
+fi
|
||||||
fi
|
|
||||||
AC_SUBST([NCURSES_LIBS])
|
|
||||||
+AC_SUBST([TOP_NCURSES_LIBS])
|
+AC_SUBST([TOP_NCURSES_LIBS])
|
||||||
AC_SUBST([WATCH_NCURSES_LIBS])
|
|
||||||
AC_SUBST([WATCH_NCURSES_CFLAGS])
|
|
||||||
|
|
||||||
|
AC_ARG_WITH([systemd],
|
||||||
|
[AS_HELP_STRING([--with-systemd], [enable systemd support])],
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
vmstat.c | 4 ++--
|
src/vmstat.c | 4 ++--
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
--- vmstat.c
|
--- src/vmstat.c
|
||||||
+++ vmstat.c 2016-07-11 13:18:04.993371059 +0000
|
+++ src/vmstat.c 2023-02-08 08:59:05.175343180 +0000
|
||||||
@@ -273,8 +273,8 @@ static void new_header(void)
|
@@ -333,8 +333,8 @@ static void new_header(void)
|
||||||
|
|
||||||
static unsigned long unitConvert(unsigned long size)
|
static unsigned long unitConvert(unsigned long size)
|
||||||
{
|
{
|
||||||
- float cvSize;
|
- double cvSize;
|
||||||
- cvSize = (float)size / dataUnit * ((statMode == SLABSTAT) ? 1 : 1024);
|
- cvSize = (double)size / dataUnit * ((statMode == SLABSTAT) ? 1 : 1024);
|
||||||
+ long double cvSize;
|
+ long double cvSize;
|
||||||
+ cvSize = (long double)size / dataUnit * ((statMode == SLABSTAT) ? 1 : 1024);
|
+ cvSize = (long double)size / dataUnit * ((statMode == SLABSTAT) ? 1 : 1024);
|
||||||
return ((unsigned long)cvSize);
|
return ((unsigned long)cvSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
w.1 | 3 +++
|
procps-ng-4.0.4/man/w.1 | 3 +++
|
||||||
w.c | 19 ++++++++++++++++---
|
procps-ng-4.0.4/src/w.c | 27 +++++++++++++++++++++++----
|
||||||
2 files changed, 19 insertions(+), 3 deletions(-)
|
2 files changed, 26 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- w.1
|
--- procps-ng-4.0.4/man/w.1
|
||||||
+++ w.1 2023-08-18 08:21:51.764340794 +0000
|
+++ procps-ng-4.0.4/man/w.1 2023-11-13 12:22:54.245834105 +0000
|
||||||
@@ -40,6 +40,9 @@ and a
|
@@ -51,6 +51,9 @@ and a
|
||||||
\fB\-s\fR, \fB\-\-short\fR
|
\fB\-s\fR, \fB\-\-short\fR
|
||||||
Use the short format. Don't print the login time, JCPU or PCPU times.
|
Use the short format. Don't print the login time, JCPU or PCPU times.
|
||||||
.TP
|
.TP
|
||||||
@ -15,34 +15,56 @@
|
|||||||
\fB\-f\fR, \fB\-\-from\fR
|
\fB\-f\fR, \fB\-\-from\fR
|
||||||
Toggle printing the
|
Toggle printing the
|
||||||
.B from
|
.B from
|
||||||
--- w.c
|
--- procps-ng-4.0.4/src/w.c
|
||||||
+++ w.c 2023-08-18 08:37:32.143482035 +0000
|
+++ procps-ng-4.0.4/src/w.c 2023-11-13 12:47:16.843483082 +0000
|
||||||
@@ -394,7 +394,7 @@ static const proc_t *getproc(const utmp_
|
@@ -218,7 +218,8 @@ static void print_from(
|
||||||
}
|
if (r < 0 || host == NULL)
|
||||||
|
print_host("", 0, fromlen);
|
||||||
static void showinfo(utmp_t * u, int formtype, int maxcmd, int from,
|
else {
|
||||||
- const int userlen, const int fromlen, const int ip_addresses)
|
- print_host(host, strlen(host), fromlen);
|
||||||
+ int userlen, int fromlen, const int ip_addresses)
|
+ print_host(host, strlen(host),
|
||||||
|
+ fromlen == 0?strlen(host):fromlen);
|
||||||
|
free(host);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
@@ -510,7 +511,7 @@ static int find_best_proc(
|
||||||
|
static void showinfo(
|
||||||
|
const char *session, const char *name,
|
||||||
|
utmp_t * u, const int longform, int maxcmd, int from,
|
||||||
|
- const int userlen, const int fromlen, const int ip_addresses,
|
||||||
|
+ int userlen, int fromlen, const int ip_addresses,
|
||||||
|
const int pids)
|
||||||
{
|
{
|
||||||
unsigned long long jcpu;
|
unsigned long long jcpu, pcpu;
|
||||||
int ut_pid_found;
|
@@ -520,6 +521,7 @@ static void showinfo(
|
||||||
@@ -424,7 +424,14 @@ static void showinfo(utmp_t * u, int for
|
char cmdline[MAX_CMD_WIDTH + 1];
|
||||||
strncpy(uname, u->ut_user, UT_NAMESIZE);
|
pid_t best_pid = -1;
|
||||||
|
int pids_length = 0;
|
||||||
|
+ int utlnlen = 8;
|
||||||
|
|
||||||
if (formtype) {
|
strcpy(cmdline, "-");
|
||||||
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, u->ut_line);
|
|
||||||
+ int utlnlen = 8;
|
@@ -572,7 +574,18 @@ static void showinfo(
|
||||||
+ if (formtype > 1) {
|
/* force NUL term for printf */
|
||||||
+ userlen = strnlen(uname, UT_NAMESIZE);
|
uname[UT_NAMESIZE] = '\0';
|
||||||
+ fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
|
|
||||||
+ utlnlen = strnlen(u->ut_line, UT_LINESIZE);
|
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, tty + 5);
|
||||||
+ maxcmd = MAX_CMD_WIDTH;
|
+ if (longform > 1) {
|
||||||
+ }
|
+ userlen = strlen(uname);
|
||||||
+ printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, u->ut_line);
|
+ if (u) {
|
||||||
if (from)
|
+ fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
|
||||||
print_from(u, ip_addresses, fromlen);
|
+ utlnlen = strnlen(u->ut_line, UT_LINESIZE);
|
||||||
#ifdef HAVE_UTMPX_H
|
+ } else {
|
||||||
@@ -478,6 +485,7 @@ static void __attribute__ ((__noreturn__
|
+ fromlen = 0;
|
||||||
|
+ utlnlen = strlen (tty+5);
|
||||||
|
+ }
|
||||||
|
+ maxcmd = MAX_CMD_WIDTH;
|
||||||
|
+ }
|
||||||
|
+ printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, tty+5);
|
||||||
|
if (from)
|
||||||
|
print_from(session, NULL, ip_addresses, fromlen);
|
||||||
|
|
||||||
|
@@ -643,6 +656,7 @@ static void __attribute__ ((__noreturn__
|
||||||
fputs(_(" -h, --no-header do not print header\n"),out);
|
fputs(_(" -h, --no-header do not print header\n"),out);
|
||||||
fputs(_(" -u, --no-current ignore current process username\n"),out);
|
fputs(_(" -u, --no-current ignore current process username\n"),out);
|
||||||
fputs(_(" -s, --short short format\n"),out);
|
fputs(_(" -s, --short short format\n"),out);
|
||||||
@ -50,7 +72,7 @@
|
|||||||
fputs(_(" -f, --from show remote hostname field\n"),out);
|
fputs(_(" -f, --from show remote hostname field\n"),out);
|
||||||
fputs(_(" -o, --old-style old style output\n"),out);
|
fputs(_(" -o, --old-style old style output\n"),out);
|
||||||
fputs(_(" -i, --ip-addr display IP address instead of hostname (if possible)\n"), out);
|
fputs(_(" -i, --ip-addr display IP address instead of hostname (if possible)\n"), out);
|
||||||
@@ -514,6 +522,7 @@ int main(int argc, char **argv)
|
@@ -681,6 +695,7 @@ int main(int argc, char **argv)
|
||||||
{"no-header", no_argument, NULL, 'h'},
|
{"no-header", no_argument, NULL, 'h'},
|
||||||
{"no-current", no_argument, NULL, 'u'},
|
{"no-current", no_argument, NULL, 'u'},
|
||||||
{"short", no_argument, NULL, 's'},
|
{"short", no_argument, NULL, 's'},
|
||||||
@ -58,16 +80,16 @@
|
|||||||
{"from", no_argument, NULL, 'f'},
|
{"from", no_argument, NULL, 'f'},
|
||||||
{"old-style", no_argument, NULL, 'o'},
|
{"old-style", no_argument, NULL, 'o'},
|
||||||
{"ip-addr", no_argument, NULL, 'i'},
|
{"ip-addr", no_argument, NULL, 'i'},
|
||||||
@@ -535,7 +544,7 @@ int main(int argc, char **argv)
|
@@ -703,7 +718,7 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((ch =
|
while ((ch =
|
||||||
- getopt_long(argc, argv, "husfoVi", longopts, NULL)) != -1)
|
- getopt_long(argc, argv, "husfoVip", longopts, NULL)) != -1)
|
||||||
+ getopt_long(argc, argv, "husnfoVi", longopts, NULL)) != -1)
|
+ getopt_long(argc, argv, "husnfoVip", longopts, NULL)) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'h':
|
case 'h':
|
||||||
header = 0;
|
header = 0;
|
||||||
@@ -546,6 +555,10 @@ int main(int argc, char **argv)
|
@@ -711,6 +726,10 @@ int main(int argc, char **argv)
|
||||||
case 's':
|
case 's':
|
||||||
longform = 0;
|
longform = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
proc/libprocps.sym | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
--- proc/libprocps.sym
|
|
||||||
+++ proc/libprocps.sym 2016-07-11 12:45:32.463107052 +0000
|
|
||||||
@@ -13,6 +13,7 @@ global:
|
|
||||||
get_ns_id;
|
|
||||||
get_ns_name;
|
|
||||||
get_pid_digits;
|
|
||||||
+ get_proc_stats;
|
|
||||||
get_slabinfo;
|
|
||||||
getbtime;
|
|
||||||
getdiskstat;
|
|
65
procps-ng-4.0.0-floats.dif
Normal file
65
procps-ng-4.0.0-floats.dif
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
local/strutils.c | 22 ++++++++++++----------
|
||||||
|
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
--- local/strutils.c
|
||||||
|
+++ local/strutils.c 2021-02-09 10:11:25.000000000 +0000
|
||||||
|
@@ -20,6 +20,8 @@
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <float.h>
|
||||||
|
+#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@@ -71,9 +73,9 @@ double strtod_or_err(const char *str, co
|
||||||
|
*/
|
||||||
|
double strtod_nol_or_err(char *str, const char *errmesg)
|
||||||
|
{
|
||||||
|
- double num;
|
||||||
|
+ long double num;
|
||||||
|
const char *cp, *radix;
|
||||||
|
- double mult;
|
||||||
|
+ long double mult;
|
||||||
|
int negative = 0;
|
||||||
|
|
||||||
|
if (str != NULL && *str != '\0') {
|
||||||
|
@@ -95,29 +97,29 @@ double strtod_nol_or_err(char *str, cons
|
||||||
|
mult=0.1;
|
||||||
|
while(isdigit(*radix)) {
|
||||||
|
radix++;
|
||||||
|
- mult *= 10;
|
||||||
|
+ mult *= 10.0;
|
||||||
|
}
|
||||||
|
while(isdigit(*cp)) {
|
||||||
|
- num += (*cp - '0') * mult;
|
||||||
|
- mult /= 10;
|
||||||
|
+ num += (long double)(*cp - '0') * mult;
|
||||||
|
+ mult /= 10.0;
|
||||||
|
cp++;
|
||||||
|
}
|
||||||
|
/* got the integers */
|
||||||
|
if (*cp == '\0')
|
||||||
|
- return (negative?-num:num);
|
||||||
|
+ return (double)(negative?-num:num);
|
||||||
|
if (*cp != '.' && *cp != ',')
|
||||||
|
error(EXIT_FAILURE, EINVAL, "%s: '%s'", errmesg, str);
|
||||||
|
|
||||||
|
cp++;
|
||||||
|
mult = 0.1;
|
||||||
|
while(isdigit(*cp)) {
|
||||||
|
- num += (*cp - '0') * mult;
|
||||||
|
- mult /= 10;
|
||||||
|
+ num += (long double)(*cp - '0') * mult;
|
||||||
|
+ mult /= 10.0;
|
||||||
|
cp++;
|
||||||
|
}
|
||||||
|
if (*cp == '\0')
|
||||||
|
- return (negative?-num:num);
|
||||||
|
+ return (double)(negative?-num:num);
|
||||||
|
}
|
||||||
|
error(EXIT_FAILURE, errno, "%s: '%s'", errmesg, str);
|
||||||
|
- return 0;
|
||||||
|
+ return (double)0;
|
||||||
|
}
|
26
procps-ng-4.0.0-integer-overflow.patch
Normal file
26
procps-ng-4.0.0-integer-overflow.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
library/meminfo.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- library/meminfo.c
|
||||||
|
+++ library/meminfo.c 2022-03-29 09:50:45.076823155 +0000
|
||||||
|
@@ -710,7 +710,9 @@ static int meminfo_read_failed (
|
||||||
|
mHr(derived_mem_used) = (unsigned long)mem_used;
|
||||||
|
|
||||||
|
if (mHr(HighFree) < mHr(HighTotal))
|
||||||
|
- mHr(derived_mem_hi_used) = mHr(HighTotal) - mHr(HighFree);
|
||||||
|
+ mHr(derived_mem_hi_used) = mHr(HighTotal) - mHr(HighFree);
|
||||||
|
+ else
|
||||||
|
+ mHr(derived_mem_hi_used) = 0;
|
||||||
|
|
||||||
|
if (0 == mHr(LowTotal)) {
|
||||||
|
mHr(LowTotal) = mHr(MemTotal);
|
||||||
|
@@ -718,6 +720,8 @@ static int meminfo_read_failed (
|
||||||
|
}
|
||||||
|
if (mHr(LowFree) < mHr(LowTotal))
|
||||||
|
mHr(derived_mem_lo_used) = mHr(LowTotal) - mHr(LowFree);
|
||||||
|
+ else
|
||||||
|
+ mHr(derived_mem_lo_used) = 0;
|
||||||
|
|
||||||
|
if (mHr(SwapFree) < mHr(SwapTotal))
|
||||||
|
mHr(derived_swap_used) = mHr(SwapTotal) - mHr(SwapFree);
|
15
procps-ng-4.0.4-ignore-sysctl_conf.patch
Normal file
15
procps-ng-4.0.4-ignore-sysctl_conf.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
src/sysctl.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
--- src/sysctl.c
|
||||||
|
+++ src/sysctl.c 2023-12-14 13:46:09.181625220 +0000
|
||||||
|
@@ -772,6 +772,8 @@ static int Preload(SettingList *setlist,
|
||||||
|
fp = (globbuf.gl_pathv[j][0] == '-' && !globbuf.gl_pathv[j][1])
|
||||||
|
? stdin : fopen(globbuf.gl_pathv[j], "r");
|
||||||
|
if (!fp) {
|
||||||
|
+ if (strcmp ("/usr/lib/sysctl.d/99-sysctl.conf", globbuf.gl_pathv[j]) == 0)
|
||||||
|
+ continue;
|
||||||
|
xwarn(_("cannot open \"%s\""), globbuf.gl_pathv[j]);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
38
procps-ng-4.0.4-pmapX-not-twice-anymore.patch
Normal file
38
procps-ng-4.0.4-pmapX-not-twice-anymore.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
testsuite/pmap.test/pmap.exp | 25 -------------------------
|
||||||
|
1 file changed, 25 deletions(-)
|
||||||
|
|
||||||
|
--- testsuite/pmap.test/pmap.exp
|
||||||
|
+++ testsuite/pmap.test/pmap.exp 2023-11-15 15:34:02.613151770 +0000
|
||||||
|
@@ -69,31 +69,6 @@ if { [ file readable "/proc/self/smaps"
|
||||||
|
expect_pass $test "$pmap_initname\$"
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
-proc expect_twice_total { test } {
|
||||||
|
- set totkb 0
|
||||||
|
- expect {
|
||||||
|
- -re "\r\n\\s+(\\d+)\[0-9 \]*KB" {
|
||||||
|
- set totkb $expect_out(1,string)
|
||||||
|
- expect {
|
||||||
|
- -re "\r\n\\s+$totkb\[0-9 \]*KB" { pass "$test" }
|
||||||
|
- eof { fail "$test" }
|
||||||
|
- timeout { fail "$test" }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- eof { fail "$test" }
|
||||||
|
- timeout { fail "$test" }
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-set test "pmap X pid pid has same total"
|
||||||
|
-spawn $pmap -X $mypid $mypid
|
||||||
|
-expect_twice_total "$test"
|
||||||
|
-
|
||||||
|
-set test "pmap XX pid pid has same total"
|
||||||
|
-spawn $pmap -XX $mypid $mypid
|
||||||
|
-expect_twice_total "$test"
|
||||||
|
-
|
||||||
|
set test "pmap finding shm"
|
||||||
|
make_testshm_proc
|
||||||
|
if { $shmid == "" } {
|
BIN
procps-ng-4.0.4.tar.xz
(Stored with Git LFS)
Normal file
BIN
procps-ng-4.0.4.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
16
procps-ng-4.0.4.tar.xz.asc
Normal file
16
procps-ng-4.0.4.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAABCgAdFiEEXT3w9TizJ8CqeneiAiFmwP88hOMFAmTwbLAACgkQAiFmwP88
|
||||||
|
hONNRg//a6SXHpenZGCpz6bu6qL6UVGGbanjXOCVzEo0eMwX7/b/Pk3r/wLmtP+a
|
||||||
|
zpfjYVxyLHakeN4gThphLp01SnkuOmFoqXZBe8XZUQTbRm1BMBmmAi7E8GamDJbw
|
||||||
|
TgpAIW1qKZPgYRMKB1nSxA5a0OCoM1t8ntXrZdau72LoEnGwuEJEeV4F8GmjZnd/
|
||||||
|
2XIocwuz3xlm7/ByziZ7GuRqibCs+crhBO3vk120LSCRBCNfoS1uSMrdodO95vpX
|
||||||
|
EMYCYYMomxOYxq2p1gHDQ+KtEy61zDJ9LbMvzs+9TpHy5Ihw+wXNYu8CQmJIIlnT
|
||||||
|
7gLoAxhl4Ix0QoyUSgvAu7ANYyndFrz7KBPkOCC/2Ig6BJJzf+YEzWSs1QTh2Lld
|
||||||
|
vKEDjwqc9UiGW/2yKc0rAmeO1EiQf9dyOe+Sray5OiyLUTtoTUxVLSlXiMwsBWiK
|
||||||
|
E6dtebUIfxm5uxN5z6Ysmcx+hlxbSVPZkjdWG1W8LQdECsNR8/pPO14VpBYZjvSC
|
||||||
|
MAvzmONM3FSryxw3y5AeuQLS4lrNw+XuG4y8q7zisBtW7RzS9HkM0yFPco5DlnYm
|
||||||
|
DlMpnY4PIAltZTO2secnV12CdDljVZ6GjoJqnmLKhM6H4M3H/p3oFiZEIvgd2bKK
|
||||||
|
D/PV9XZJF1/wnNMxBUgJ9cQuqlh013UOuwUzxJ11q9uDj63n9do=
|
||||||
|
=XLqg
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1 +1,2 @@
|
|||||||
addFilter(".*W:.*shared-lib-calls-exit.*libprocps\.so.*")
|
addFilter(".*W:.*shared-lib-calls-exit.*libproc2\.so.*")
|
||||||
|
addFilter(".*W:.*macro-in-comment.*%{version}.*")
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
ps/global.c | 13 ++++++++++---
|
ps/global.c | 13 ++++++++++---
|
||||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- ps/global.c
|
--- src/ps/global.c
|
||||||
+++ ps/global.c 2016-07-11 13:04:59.600533764 +0000
|
+++ src/ps/global.c 2022-03-29 09:31:24.242140877 +0000
|
||||||
@@ -147,8 +147,11 @@ static void set_screen_size(void){
|
@@ -264,8 +264,11 @@ static void set_screen_size(void){
|
||||||
screen_cols = ws.ws_col; // hmmm, NetBSD subtracts 1
|
screen_cols = ws.ws_col; // hmmm, NetBSD subtracts 1
|
||||||
screen_rows = ws.ws_row;
|
screen_rows = ws.ws_row;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
columns = getenv("COLUMNS");
|
columns = getenv("COLUMNS");
|
||||||
if(columns && *columns){
|
if(columns && *columns){
|
||||||
@@ -290,6 +293,7 @@ static const char *set_personality(void)
|
@@ -407,6 +410,7 @@ static const char *set_personality(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case_aix:
|
case_aix:
|
||||||
@ -26,7 +26,7 @@
|
|||||||
bsd_j_format = "FB_j";
|
bsd_j_format = "FB_j";
|
||||||
bsd_l_format = "FB_l";
|
bsd_l_format = "FB_l";
|
||||||
/* bsd_s_format not used */
|
/* bsd_s_format not used */
|
||||||
@@ -317,6 +321,7 @@ static const char *set_personality(void)
|
@@ -434,6 +438,7 @@ static const char *set_personality(void)
|
||||||
|
|
||||||
case_sunos4:
|
case_sunos4:
|
||||||
personality = PER_NO_DEFAULT_g;
|
personality = PER_NO_DEFAULT_g;
|
||||||
@ -34,7 +34,7 @@
|
|||||||
prefer_bsd_defaults = 1;
|
prefer_bsd_defaults = 1;
|
||||||
bsd_j_format = "FB_j";
|
bsd_j_format = "FB_j";
|
||||||
bsd_l_format = "FB_l";
|
bsd_l_format = "FB_l";
|
||||||
@@ -342,12 +347,14 @@ static const char *set_personality(void)
|
@@ -459,12 +464,14 @@ static const char *set_personality(void)
|
||||||
case_hp:
|
case_hp:
|
||||||
case_hpux:
|
case_hpux:
|
||||||
personality = PER_HPUX_x;
|
personality = PER_HPUX_x;
|
||||||
@ -49,10 +49,10 @@
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case_posix:
|
case_posix:
|
||||||
@@ -365,8 +372,8 @@ void reset_global(void){
|
@@ -505,8 +512,8 @@ void reset_global(void){
|
||||||
double uptime_secs;
|
}
|
||||||
reset_selection_list();
|
// --- <pids> interface --------------------------------------------------
|
||||||
look_up_our_self(&p);
|
|
||||||
- set_screen_size();
|
- set_screen_size();
|
||||||
set_personality();
|
set_personality();
|
||||||
+ set_screen_size();
|
+ set_screen_size();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- proc/devname.c
|
--- library/devname.c
|
||||||
+++ proc/devname.c 2012-06-01 13:35:43.452010553 +0000
|
+++ library/devname.c 2012-06-01 13:35:43.452010553 +0000
|
||||||
@@ -53,6 +53,10 @@
|
@@ -50,6 +50,10 @@
|
||||||
#define minor <-- do not use -->
|
#define minor(d) ( ((unsigned)(d)&0xffu) | (((unsigned)(d)&0xfff00000u)>>12u) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+#ifndef PAGE_SIZE
|
+#ifndef PAGE_SIZE
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
pwdx.c | 1 +
|
src/pwdx.c | 1 +
|
||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
--- pwdx.c
|
--- src/pwdx.c
|
||||||
+++ pwdx.c 2016-07-11 13:17:16.154313659 +0000
|
+++ src/pwdx.c 2016-07-11 13:17:16.154313659 +0000
|
||||||
@@ -109,6 +109,7 @@ int main(int argc, char *argv[])
|
@@ -113,6 +113,7 @@ int main(int argc, char *argv[])
|
||||||
buflen = 10 + strlen(argv[i]) + 1;
|
buflen = 10 + strlen(argv[i]) + 1;
|
||||||
buf = xmalloc(buflen);
|
buf = xmalloc(buflen);
|
||||||
|
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
---
|
---
|
||||||
sysctl.8 | 2 ++
|
man/sysctl.8 | 2 ++
|
||||||
sysctl.c | 12 ++++++++++++
|
src/sysctl.c | 12 ++++++++++++
|
||||||
2 files changed, 14 insertions(+)
|
2 files changed, 14 insertions(+)
|
||||||
|
|
||||||
--- sysctl.8
|
--- man/sysctl.8
|
||||||
+++ sysctl.8 2021-02-10 10:05:27.781748090 +0000
|
+++ man/sysctl.8 2022-03-29 10:21:47.926686046 +0000
|
||||||
@@ -81,6 +81,8 @@ directories in the following list in giv
|
@@ -123,6 +123,8 @@ will read files from directories in the
|
||||||
Once a file of a given filename is loaded, any file of the same name
|
order from top to bottom. Once a file of a given filename is loaded, any
|
||||||
in subsequent directories is ignored.
|
file of the same name in subsequent directories is ignored.
|
||||||
.br
|
|
||||||
+/boot/sysctl.conf-<kernelversion>
|
+/boot/sysctl.conf-<kernelversion>
|
||||||
+.br
|
+.br
|
||||||
/etc/sysctl.d/*.conf
|
/etc/sysctl.d/*.conf
|
||||||
.br
|
.br
|
||||||
/run/sysctl.d/*.conf
|
/run/sysctl.d/*.conf
|
||||||
--- sysctl.c
|
--- src/sysctl.c
|
||||||
+++ sysctl.c 2021-02-10 10:04:25.290952318 +0000
|
+++ src/sysctl.c 2022-03-29 10:20:51.795708321 +0000
|
||||||
@@ -39,6 +39,7 @@
|
@@ -45,6 +45,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
+#include <sys/utsname.h>
|
+#include <sys/utsname.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "c.h"
|
@@ -808,6 +809,7 @@ static int sortpairs(const void *A, cons
|
||||||
@@ -621,6 +622,7 @@ static int sortpairs(const void *A, cons
|
static int PreloadSystem(SettingList *setlist)
|
||||||
static int PreloadSystem(void)
|
|
||||||
{
|
{
|
||||||
unsigned di, i;
|
unsigned di, i;
|
||||||
+ struct utsname uts;
|
+ struct utsname uts;
|
||||||
const char *dirs[] = {
|
const char *dirs[] = {
|
||||||
"/etc/sysctl.d",
|
"/etc/sysctl.d",
|
||||||
"/run/sysctl.d",
|
"/run/sysctl.d",
|
||||||
@@ -685,6 +687,16 @@ static int PreloadSystem(void)
|
@@ -872,6 +874,16 @@ static int PreloadSystem(SettingList *se
|
||||||
}
|
}
|
||||||
qsort(cfgs, ncfgs, sizeof(struct cfg *), sortpairs);
|
qsort(cfgs, ncfgs, sizeof(struct cfg *), sortpairs);
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
+ if (access(buf, R_OK) == 0) {
|
+ if (access(buf, R_OK) == 0) {
|
||||||
+ if (!Quiet)
|
+ if (!Quiet)
|
||||||
+ printf("* Applying %s ...\n", buf);
|
+ printf("* Applying %s ...\n", buf);
|
||||||
+ Preload(buf);
|
+ Preload(setlist, buf);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -1,3 +1,43 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 30 07:14:45 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Switch to procps 4 branch, absorbing the former procps4 package:
|
||||||
|
+ Add provides/obsoletes procps4: make zypper replace procps4
|
||||||
|
with the main package for users that manually switched.
|
||||||
|
- Aligning to the existing procps4 package, drop/add/modify
|
||||||
|
patches:
|
||||||
|
A 79042e07.patch
|
||||||
|
A procps-ng-4.0.0-integer-overflow.patch
|
||||||
|
A procps-ng-4.0.4-ignore-sysctl_conf.patch
|
||||||
|
A procps-ng-4.0.4-pmapX-not-twice-anymore.patch
|
||||||
|
A procps-ng-4.0.0-floats.dif
|
||||||
|
D CVE-2023-4016.patch
|
||||||
|
D bsc1195468-23da4f40.patch
|
||||||
|
D procps-3.3.17-bsc1181976.patch
|
||||||
|
D procps-3.3.17-ignore-sysctl_conf.patch
|
||||||
|
D procps-3.3.17-library-bsc1181475.patch
|
||||||
|
D procps-3.3.17-top-bsc1181475.patch
|
||||||
|
D procps-ng-3.3.10-integer-overflow.patch
|
||||||
|
D procps-ng-3.3.10-large_pcpu.patch
|
||||||
|
D procps-ng-3.3.17-logind.patch
|
||||||
|
D procps-ng-3.3.8-bnc634840.patch
|
||||||
|
D procps-ng-3.3.9-watch.patch
|
||||||
|
D procps-ng-3.3.8-accuracy.dif
|
||||||
|
D procps-ng-3.3.10-bnc634071_procstat2.diff
|
||||||
|
D procps-ng-3.3.10-fdleak.dif
|
||||||
|
M procps-ng-3.3.10-errno.patch
|
||||||
|
M procps-ng-3.3.10-slab.patch
|
||||||
|
M procps-ng-3.3.11-pmap4suse.patch
|
||||||
|
M procps-ng-3.3.8-ignore-scan_unevictable_pages.patch
|
||||||
|
M procps-ng-3.3.8-petabytes.patch
|
||||||
|
M procps-ng-3.3.8-readeof.patch
|
||||||
|
M procps-v3.3.3-pwdx.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 29 14:34:38 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Use %patch -P N instead of deprecated %patchN.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 14 13:26:05 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
|
Thu Dec 14 13:26:05 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
170
procps.keyring
Normal file
170
procps.keyring
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQINBE3Mr20BEACryQO8IVg0LeiorBOH5eDORRvthyCslwv5OCqui0r1vg8jXuy4
|
||||||
|
dRA68UIkVnoLO83i3CcjAyqyn20FO7lg55HySDJWcVD7ltVbrBIv7aDxJqOx2jrt
|
||||||
|
p66Lk8Ct5ZltBV1nGjNCx3VquMugoGUBtB1ym8zY5NH92LtveSY+bgjPyo9P3Rhl
|
||||||
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TCSyhFeYYauUgvJxwzBUXJCn
|
||||||
|
e3PdmiRcrw66AUzV7XjJSZWP/7SFUjf7u+ca56eyyMk3mP6ErDhF1mJC2ZldjGHp
|
||||||
|
Nf8Hmmfe0suEJt9jOF0b577DdAuZ5MIDSfYjlq7YIdVdp8stHmiivMw=
|
||||||
|
=enAj
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
176
procps.spec
176
procps.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package procps
|
# spec file for package procps
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,8 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define somajor 8
|
%define somajor 0
|
||||||
%define libname libprocps%{somajor}
|
%define libname libproc2-%{somajor}
|
||||||
%if 0%{?suse_version} < 1550
|
%if 0%{?suse_version} < 1550
|
||||||
%bcond_with bin2usr
|
%bcond_with bin2usr
|
||||||
%else
|
%else
|
||||||
@ -26,30 +26,28 @@
|
|||||||
%bcond_without pidof
|
%bcond_without pidof
|
||||||
%bcond_without nls
|
%bcond_without nls
|
||||||
Name: procps
|
Name: procps
|
||||||
Version: 3.3.17
|
Version: 4.0.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: The ps utilities for /proc
|
Summary: The ps utilities for /proc
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
URL: https://sf.net/projects/procps-ng/
|
URL: https://sf.net/projects/procps-ng/
|
||||||
Source: https://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-%{version}.tar.xz
|
Source: https://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-%{version}.tar.xz
|
||||||
|
Source1: https://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-%{version}.tar.xz.asc
|
||||||
#Alternate: https://gitlab.com/procps-ng/procps/-/archive/v%{version}/procps-v%{version}.tar.gz
|
#Alternate: https://gitlab.com/procps-ng/procps/-/archive/v%{version}/procps-v%{version}.tar.gz
|
||||||
Source1: procps-rpmlintrc
|
Source2: procps-rpmlintrc
|
||||||
Patch0: procps-ng-3.3.9-watch.patch
|
Source3: procps.keyring
|
||||||
|
# PATCH-FIX-USTREAM -- w: Don't crash when using short option
|
||||||
|
Patch0: 79042e07.patch
|
||||||
Patch1: procps-v3.3.3-ia64.diff
|
Patch1: procps-v3.3.3-ia64.diff
|
||||||
Patch3: procps-ng-3.3.9-w-notruncate.diff
|
Patch3: procps-ng-3.3.9-w-notruncate.diff
|
||||||
Patch7: procps-ng-3.3.8-readeof.patch
|
Patch7: procps-ng-3.3.8-readeof.patch
|
||||||
Patch8: procps-ng-3.3.10-slab.patch
|
Patch8: procps-ng-3.3.10-slab.patch
|
||||||
Patch10: procps-ng-3.3.8-accuracy.dif
|
|
||||||
Patch11: procps-ng-3.3.10-xen.dif
|
Patch11: procps-ng-3.3.10-xen.dif
|
||||||
Patch12: procps-ng-3.3.10-fdleak.dif
|
|
||||||
Patch13: procps-v3.3.3-columns.dif
|
Patch13: procps-v3.3.3-columns.dif
|
||||||
Patch14: procps-ng-3.3.10-integer-overflow.patch
|
Patch14: procps-ng-4.0.0-integer-overflow.patch
|
||||||
Patch15: procps-ng-3.3.10-bnc634071_procstat2.diff
|
|
||||||
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-ng-3.3.8-petabytes.patch
|
Patch18: procps-ng-3.3.8-petabytes.patch
|
||||||
Patch19: procps-ng-3.3.10-large_pcpu.patch
|
|
||||||
Patch20: procps-ng-3.3.8-tinfo.dif
|
Patch20: procps-ng-3.3.8-tinfo.dif
|
||||||
Patch21: procps-v3.3.3-pwdx.patch
|
Patch21: procps-v3.3.3-pwdx.patch
|
||||||
# PATCH-FIX-OPENSUSE -- trifle rest of the old terabyte patch
|
# PATCH-FIX-OPENSUSE -- trifle rest of the old terabyte patch
|
||||||
@ -60,20 +58,16 @@ Patch31: procps-ng-3.3.8-ignore-scan_unevictable_pages.patch
|
|||||||
Patch32: procps-ng-3.3.10-errno.patch
|
Patch32: procps-ng-3.3.10-errno.patch
|
||||||
# PATCH-FEATURE-SUSE -- Let upstream pmap behave similar to old suse pmap
|
# PATCH-FEATURE-SUSE -- Let upstream pmap behave similar to old suse pmap
|
||||||
Patch33: procps-ng-3.3.11-pmap4suse.patch
|
Patch33: procps-ng-3.3.11-pmap4suse.patch
|
||||||
# PATCH-FIX-UPSTREAM -- bsc#1181976
|
# PATCH-FIX-SUSE -- Avoid float errors on 32bit architectures
|
||||||
Patch34: procps-3.3.17-bsc1181976.patch
|
Patch37: procps-ng-4.0.0-floats.dif
|
||||||
# PATCH-FIX-UPSTREAM -- bsc#1195468
|
# PATCH-FIX-SUSE -- with 4.0.4 the totals on -X option are always reset for each pid
|
||||||
Patch35: bsc1195468-23da4f40.patch
|
Patch38: procps-ng-4.0.4-pmapX-not-twice-anymore.patch
|
||||||
# PATCH-FIX-UPSTREAM -- bsc#1214290
|
# PATCH-FIX-SUSE -- ignore dangling symlink to missing /etc/sysctl.conf file
|
||||||
Patch36: CVE-2023-4016.patch
|
Patch39: procps-ng-4.0.4-ignore-sysctl_conf.patch
|
||||||
# PATCH-BACKPORT-FROM-UPSTREAM -- bsc#1181475: 'free' command reports misleading "used" value
|
|
||||||
Patch42: procps-3.3.17-library-bsc1181475.patch
|
|
||||||
Patch43: procps-3.3.17-top-bsc1181475.patch
|
|
||||||
Patch44: procps-ng-3.3.17-logind.patch
|
|
||||||
Patch45: procps-3.3.17-ignore-sysctl_conf.patch
|
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
BuildRequires: diffutils
|
BuildRequires: diffutils
|
||||||
|
BuildRequires: libnuma-devel
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -81,13 +75,10 @@ BuildRequires: pkgconfig
|
|||||||
BuildRequires: screen
|
BuildRequires: screen
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
|
Provides: procps4 = %{version}
|
||||||
|
Obsoletes: procps4 <= 4.0.4
|
||||||
Provides: ps = %{version}-%{release}
|
Provides: ps = %{version}-%{release}
|
||||||
Obsoletes: ps < %{version}-%{release}
|
Obsoletes: ps < %{version}-%{release}
|
||||||
Requires: %{libname} = %{version}-%{release}
|
|
||||||
%ifarch ia64 x86_64 ppc64 ppc %{sparc}
|
|
||||||
BuildRequires: libnuma-devel
|
|
||||||
%endif
|
|
||||||
%lang_package
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The procps package contains a set of system utilities that provide
|
The procps package contains a set of system utilities that provide
|
||||||
@ -107,11 +98,23 @@ logged on and what they are running. The watch program watches a
|
|||||||
running program. The vmstat command displays virtual memory statistics
|
running program. The vmstat command displays virtual memory statistics
|
||||||
about processes, memory, paging, block I/O, traps, and CPU activity.
|
about processes, memory, paging, block I/O, traps, and CPU activity.
|
||||||
|
|
||||||
|
%package lang
|
||||||
|
Summary: Translations for package %{name}
|
||||||
|
Group: System/Localization
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Provides: %{name}-lang-all = %{version}
|
||||||
|
Obsoletes: procps4-lang <= 4.0.4
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description lang
|
||||||
|
Provides translations for the "%{name}" package.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for procps
|
Summary: Development files for procps
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{libname} = %{version}
|
Requires: %{libname} = %{version}
|
||||||
|
Obsoletes: procps4-devel <= 4.0.4
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The procps library can be used to read informations out from /proc
|
The procps library can be used to read informations out from /proc
|
||||||
@ -129,40 +132,35 @@ The procps 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
|
%setup -q -n procps-ng-%{version}
|
||||||
%patch0
|
%patch -P0 -p1
|
||||||
%patch1
|
%patch -P1
|
||||||
%patch3 -b .trcate
|
%patch -P3 -p1 -b .trcate
|
||||||
%patch7 -b .rof
|
%patch -P7 -b .rof
|
||||||
%patch8 -b .cache
|
%patch -P8 -b .cache
|
||||||
%patch10 -b .acc
|
%patch -P11
|
||||||
%patch11
|
%patch -P13 -b .column
|
||||||
%patch12
|
%patch -P14 -b .ovrflw
|
||||||
%patch13 -b .column
|
%patch -P17 -b .sysctl
|
||||||
%patch14 -b .ovrflw
|
%patch -P18
|
||||||
%patch15
|
%patch -P20 -b .p20
|
||||||
%patch16
|
%patch -P21
|
||||||
%patch17 -b .sysctl
|
%patch -P28
|
||||||
%patch18
|
%patch -P31 -p1
|
||||||
%patch19
|
%patch -P32 -b .p32
|
||||||
%patch20
|
%patch -P33 -b .pmap4us
|
||||||
%patch21
|
%patch -P37
|
||||||
%patch28
|
%patch -P38
|
||||||
%patch31 -p1
|
%patch -P39
|
||||||
%patch32
|
|
||||||
%patch33 -b .pmap4us
|
|
||||||
%patch34
|
|
||||||
%patch35 -p1
|
|
||||||
%patch36 -p0
|
|
||||||
%patch42
|
|
||||||
%patch43
|
|
||||||
%patch44 -p1
|
|
||||||
%patch45 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
test -s .tarball-version || echo %{version} > .tarball-version
|
test -s .tarball-version || echo %{version} > .tarball-version
|
||||||
#./autogen.sh
|
if test -f po/Makefile.in.in
|
||||||
autoreconf -fiv
|
then
|
||||||
|
autoreconf -fiv
|
||||||
|
else
|
||||||
|
sh ./autogen.sh
|
||||||
|
fi
|
||||||
major=$(sed -rn 's/^#define\s+NCURSES_VERSION_MAJOR\s+([0-9]+)/\1/p' %{_includedir}/ncurses.h)
|
major=$(sed -rn 's/^#define\s+NCURSES_VERSION_MAJOR\s+([0-9]+)/\1/p' %{_includedir}/ncurses.h)
|
||||||
export NCURSESW_CFLAGS="$(ncursesw${major}-config --cflags)"
|
export NCURSESW_CFLAGS="$(ncursesw${major}-config --cflags)"
|
||||||
export NCURSESW_LIBS="$(ncursesw${major}-config --libs)"
|
export NCURSESW_LIBS="$(ncursesw${major}-config --libs)"
|
||||||
@ -194,7 +192,7 @@ export LFS_CFLAGS="$(getconf LFS_CFLAGS)"
|
|||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
LD_LIBRARY_PATH=$PWD/proc/.libs \
|
LD_LIBRARY_PATH=$PWD/proc/.libs \
|
||||||
./pmap $$ || {
|
./src/pmap $$ || {
|
||||||
uname -a
|
uname -a
|
||||||
echo /proc/$$/maps
|
echo /proc/$$/maps
|
||||||
cat /proc/$$/maps
|
cat /proc/$$/maps
|
||||||
@ -218,11 +216,11 @@ rm -f %{buildroot}%{_mandir}/*/man1/uptime.1
|
|||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
rm -rf %{buildroot}%{_datadir}/doc/procps-ng
|
rm -rf %{buildroot}%{_datadir}/doc/procps-ng
|
||||||
|
|
||||||
if cmp -s %{buildroot}%{_mandir}/man1/procps.1 %{buildroot}%{_mandir}/man1/ps.1
|
if cmp -s %{buildroot}%{_mandir}/man1/pidwait.1 %{buildroot}%{_mandir}/man1/pkill.1
|
||||||
then
|
then
|
||||||
rm -vf %{buildroot}%{_mandir}/man1/procps.1
|
rm -vf %{buildroot}%{_mandir}/man1/pidwait.1
|
||||||
(cat > %{buildroot}%{_mandir}/man1/procps.1)<<-'EOF'
|
(cat > %{buildroot}%{_mandir}/man1/pidwait.1)<<-'EOF'
|
||||||
.so man1/ps.1
|
.so man1/pkill.1
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -284,6 +282,10 @@ ln -s /sbin/sysctl %{buildroot}%{_sbindir}/sysctl
|
|||||||
%postun -n %{libname} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
set +x
|
||||||
|
ls -ld /proc/[a-z]*
|
||||||
|
cat /proc/stat
|
||||||
|
set -x
|
||||||
#
|
#
|
||||||
# Skip w test as there is no valid utmp
|
# Skip w test as there is no valid utmp
|
||||||
#
|
#
|
||||||
@ -294,11 +296,13 @@ rm -rvf testsuite/w.test
|
|||||||
LANG=POSIX
|
LANG=POSIX
|
||||||
LC_ALL=$LANG
|
LC_ALL=$LANG
|
||||||
unset LC_CTYPE
|
unset LC_CTYPE
|
||||||
|
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
|
||||||
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
|
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
|
||||||
SCREENRC=${SCREENDIR}/bash
|
SCREENRC=${SCREENDIR}/bash
|
||||||
export SCREENRC SCREENDIR
|
export SCREENRC SCREENDIR
|
||||||
exec 0< /dev/null
|
exec 0< /dev/null
|
||||||
SCREENLOG=${SCREENDIR}/log
|
SCREENLOG=${SCREENDIR}/log
|
||||||
|
> $SCREENLOG
|
||||||
cat > $SCREENRC<<-EOF
|
cat > $SCREENRC<<-EOF
|
||||||
deflogin off
|
deflogin off
|
||||||
deflog on
|
deflog on
|
||||||
@ -311,17 +315,17 @@ cat > $SCREENRC<<-EOF
|
|||||||
silence on
|
silence on
|
||||||
utf8 on
|
utf8 on
|
||||||
EOF
|
EOF
|
||||||
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
|
|
||||||
> $SCREENLOG
|
|
||||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||||
env HOME=$PWD TERM=$TERM TMPDIR=$TMPDIR SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
|
env HOME=$PWD TERM=$TERM TMPDIR=$TMPDIR SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
|
||||||
screen -D -m make check
|
screen -D -m make check
|
||||||
|
sleep 1
|
||||||
kill -TERM $pid
|
kill -TERM $pid
|
||||||
error=no
|
error=no
|
||||||
for log in test-suite.log testsuite/*.log
|
for log in testsuite/*.log test-suite.log
|
||||||
do
|
do
|
||||||
if grep -E '^(XFAIL|FAIL|ERROR):' $log
|
if grep -E '^(XFAIL|FAIL|ERROR):' $log
|
||||||
then
|
then
|
||||||
|
echo Check $log
|
||||||
cat $log
|
cat $log
|
||||||
error=yes
|
error=yes
|
||||||
fi
|
fi
|
||||||
@ -338,7 +342,7 @@ test $error = no || exit 1
|
|||||||
%files
|
%files
|
||||||
%defattr (-,root,root,755)
|
%defattr (-,root,root,755)
|
||||||
%license COPYING COPYING.LIB
|
%license COPYING COPYING.LIB
|
||||||
%doc NEWS Documentation/bugs.md Documentation/FAQ
|
%doc NEWS doc/bugs.md doc/FAQ
|
||||||
%if %{with bin2usr}
|
%if %{with bin2usr}
|
||||||
%if 0%{?suse_version} < 1550
|
%if 0%{?suse_version} < 1550
|
||||||
%verify(link) /bin/ps
|
%verify(link) /bin/ps
|
||||||
@ -365,7 +369,7 @@ test $error = no || exit 1
|
|||||||
%{_bindir}/pidof
|
%{_bindir}/pidof
|
||||||
%endif
|
%endif
|
||||||
%{_bindir}/pmap
|
%{_bindir}/pmap
|
||||||
%{_bindir}/pwait
|
%{_bindir}/pidwait
|
||||||
%{_bindir}/pwdx
|
%{_bindir}/pwdx
|
||||||
%{_bindir}/skill
|
%{_bindir}/skill
|
||||||
%{_bindir}/slabtop
|
%{_bindir}/slabtop
|
||||||
@ -382,9 +386,8 @@ test $error = no || exit 1
|
|||||||
%endif
|
%endif
|
||||||
%{_mandir}/man1/pkill.1%{?ext_man}
|
%{_mandir}/man1/pkill.1%{?ext_man}
|
||||||
%{_mandir}/man1/pmap.1%{?ext_man}
|
%{_mandir}/man1/pmap.1%{?ext_man}
|
||||||
%{_mandir}/man1/procps.1%{?ext_man}
|
|
||||||
%{_mandir}/man1/ps.1%{?ext_man}
|
%{_mandir}/man1/ps.1%{?ext_man}
|
||||||
%{_mandir}/man1/pwait.1%{?ext_man}
|
%{_mandir}/man1/pidwait.1%{?ext_man}
|
||||||
%{_mandir}/man1/pwdx.1%{?ext_man}
|
%{_mandir}/man1/pwdx.1%{?ext_man}
|
||||||
%{_mandir}/man1/skill.1%{?ext_man}
|
%{_mandir}/man1/skill.1%{?ext_man}
|
||||||
%{_mandir}/man1/slabtop.1%{?ext_man}
|
%{_mandir}/man1/slabtop.1%{?ext_man}
|
||||||
@ -399,33 +402,18 @@ test $error = no || exit 1
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr (-,root,root,755)
|
%defattr (-,root,root,755)
|
||||||
%dir %{_includedir}/proc
|
%dir %{_includedir}/libproc2/
|
||||||
%{_includedir}/proc/alloc.h
|
%{_includedir}/libproc2/*.h
|
||||||
%{_includedir}/proc/devname.h
|
%{_libdir}/libproc2.so
|
||||||
%{_includedir}/proc/escape.h
|
%{_libdir}/pkgconfig/libproc2.pc
|
||||||
%{_includedir}/proc/numa.h
|
%{_mandir}/man3/procps.3%{?ext_man}
|
||||||
%{_includedir}/proc/procps.h
|
%{_mandir}/man3/procps_misc.3%{?ext_man}
|
||||||
%{_includedir}/proc/pwcache.h
|
%{_mandir}/man3/procps_pids.3%{?ext_man}
|
||||||
%{_includedir}/proc/readproc.h
|
|
||||||
%{_includedir}/proc/sig.h
|
|
||||||
%{_includedir}/proc/slab.h
|
|
||||||
%{_includedir}/proc/sysinfo.h
|
|
||||||
%{_includedir}/proc/version.h
|
|
||||||
%{_includedir}/proc/wchan.h
|
|
||||||
%{_includedir}/proc/whattime.h
|
|
||||||
%{_libdir}/libprocps.so
|
|
||||||
%{_libdir}/pkgconfig/libprocps.pc
|
|
||||||
%{_mandir}/man3/openproc.3%{?ext_man}
|
|
||||||
%{_mandir}/man3/readproc.3%{?ext_man}
|
|
||||||
%{_mandir}/man3/readproctab.3%{?ext_man}
|
|
||||||
|
|
||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%defattr (-,root,root,755)
|
%defattr (-,root,root,755)
|
||||||
%{_libdir}/libprocps.so.%{somajor}*
|
%{_libdir}/libproc2.so.%{somajor}*
|
||||||
|
|
||||||
%files lang -f procps-ng.lang
|
%files lang -f procps-ng.lang
|
||||||
%if 0%{?suse_version} < 1550
|
|
||||||
%dir %{_mandir}/uk/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user