Hello community, here is the log from the commit of package forkstat for openSUSE:Factory checked in at 2018-06-13 15:38:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/forkstat (Old) and /work/SRC/openSUSE:Factory/.forkstat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "forkstat" Wed Jun 13 15:38:47 2018 rev:7 rq:615437 version:0.02.03 Changes: -------- --- /work/SRC/openSUSE:Factory/forkstat/forkstat.changes 2018-02-06 16:51:28.601544461 +0100 +++ /work/SRC/openSUSE:Factory/.forkstat.new/forkstat.changes 2018-06-13 15:39:31.744254232 +0200 @@ -1,0 +2,14 @@ +Sat Jun 9 07:37:14 UTC 2018 - mar...@gmx.de + +- Update to version 0.02.03 + * Makefile: bump version + * debian/control: update debhelper to >= 11 + * debian/compat: update to 11 + * debian/copyright: replace http with https for secure URL + * debian/control: remove trailing line + * Add -g option to mini-help + * Add -g glyph annotations + * Add faster container check for systemd based systems + * Add snapcraft plugins + +------------------------------------------------------------------- Old: ---- forkstat-0.02.02.tar.gz New: ---- forkstat-0.02.03.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ forkstat.spec ++++++ --- /var/tmp/diff_new_pack.WZE2NR/_old 2018-06-13 15:39:32.432228916 +0200 +++ /var/tmp/diff_new_pack.WZE2NR/_new 2018-06-13 15:39:32.436228769 +0200 @@ -18,14 +18,13 @@ Name: forkstat -Version: 0.02.02 +Version: 0.02.03 Release: 0 Summary: Process fork/exec/exit monitoring tool -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring -Url: http://kernel.ubuntu.com/~cking/forkstat/ +URL: http://kernel.ubuntu.com/~cking/forkstat/ Source: http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Forkstat monitors process fork(), exec() and exit() activity. It is useful for @@ -43,9 +42,8 @@ %make_install %files -%defattr(-,root,root) -%doc COPYING +%license COPYING %{_bindir}/forkstat -%{_mandir}/man8/forkstat.8%{ext_man} +%{_mandir}/man8/forkstat.8%{?ext_man} %changelog ++++++ forkstat-0.02.02.tar.gz -> forkstat-0.02.03.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/forkstat-0.02.02/Makefile new/forkstat-0.02.03/Makefile --- old/forkstat-0.02.02/Makefile 2018-01-31 11:36:35.000000000 +0100 +++ new/forkstat-0.02.03/Makefile 2018-06-08 17:23:10.000000000 +0200 @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.02.02 +VERSION=0.02.03 # # Version "Perspicacious Process Peeker" # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/forkstat-0.02.02/forkstat.8 new/forkstat-0.02.03/forkstat.8 --- old/forkstat-0.02.02/forkstat.8 2018-01-31 11:36:35.000000000 +0100 +++ new/forkstat-0.02.03/forkstat.8 2018-06-08 17:23:10.000000000 +0200 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH FORKSTAT 8 "24 June, 2017" +.TH FORKSTAT 8 "8 June, 2018" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -24,6 +24,7 @@ .RI [ \-d ] .RI [ \-D ] .RI [ \-e ] +.RI [ \-g ] .RI [ \-h ] .RI [ \-l ] .RI [ \-r ] @@ -83,6 +84,10 @@ all all the events above .TE .TP +.B \-g +show glyph annotations of events, useful for easier identification of +different events. +.TP .B \-h show brief help summary. .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/forkstat-0.02.02/forkstat.c new/forkstat-0.02.03/forkstat.c --- old/forkstat-0.02.02/forkstat.c 2018-01-31 11:36:35.000000000 +0100 +++ new/forkstat-0.02.03/forkstat.c 2018-06-08 17:23:10.000000000 +0200 @@ -68,6 +68,7 @@ #define OPT_QUIET (0x00000010) /* Run quietly */ #define OPT_REALTIME (0x00000020) /* Run with Real Time scheduling */ #define OPT_EXTRA (0x00000040) /* Show extra stats */ +#define OPT_GLYPH (0x00000080) /* Show glyphs */ #define OPT_EV_FORK (0x00000100) /* Fork event */ #define OPT_EV_EXEC (0x00000200) /* Exec event */ @@ -175,6 +176,9 @@ */ static const int signals[] = { /* POSIX.1-1990 */ +#ifdef SIGALRM + SIGALRM, +#endif #ifdef SIGHUP SIGHUP, #endif @@ -421,6 +425,11 @@ bool ret = true; const char *ptr = pattern; + /* Fast check */ + if (access("/run/systemd/container", R_OK) == 0) + return true; + + /* Privileged slower check */ fp = fopen("/proc/1/environ", "r"); if (!fp) return false; @@ -539,9 +548,10 @@ pid_size = pid_max_digits(); - printf("Time Event %*.*s %sInfo Duration Process\n", + printf("Time Event %*.*s %s%sInfo Duration Process\n", pid_size, pid_size, "PID", - (opt_flags & OPT_EXTRA) ? " UID TTY " : ""); + (opt_flags & OPT_EXTRA) ? " UID TTY " : "", + (opt_flags & OPT_GLYPH) ? " " : ""); } /* @@ -1185,24 +1195,29 @@ (((opt_flags & OPT_EV_FORK) && !is_thread) || ((opt_flags & OPT_EV_CLNE) && is_thread))) { if (info1 != NULL && info2 != NULL) { + static signed char sqrstr[] = { 0xe2, 0x95, 0xb0, 00 }; + static signed char teestr[] = { 0xe2, 0x94, 0xac, 00 }; char *type = is_thread ? "clone" : "fork"; + row_increment(); - printf("%s %-5.5s %*d %sparent %8s %s%s%s\n", + printf("%s %-5.5s %*d %s%sparent %8s %s%s%s\n", when, type, pid_size, ppid, extra_info(ppid), + (opt_flags & OPT_GLYPH) ? (char *)teestr : "", "", info1->kernel_thread ? "[" : "", info1->cmdline, info1->kernel_thread ? "]" : ""); row_increment(); - printf("%s %-5.5s %*d %s%6.6s %8s %s%s%s\n", + printf("%s %-5.5s %*d %s%s%6.6s %8s %s%s%s\n", when, type, pid_size, pid, extra_info(pid), - is_thread ? "thread" : "child", + (opt_flags & OPT_GLYPH) ? (char *)sqrstr : "", + is_thread ? "thread" : "child ", "", info1->kernel_thread ? "[" : "", info2->cmdline, @@ -1215,11 +1230,13 @@ pid = proc_ev->event_data.exec.process_pid; info1 = proc_info_update(pid); if (!(opt_flags & OPT_QUIET) && (opt_flags & OPT_EV_EXEC)) { + static signed char exestr[] = { 0xe2, 0x86, 0x92, 00 }; row_increment(); - printf("%s exec %*d %s %8s %s%s%s\n", + printf("%s exec %*d %s%s %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? (char *)exestr : "", "", info1->kernel_thread ? "[" : "", info1->cmdline, @@ -1229,6 +1246,8 @@ case PROC_EVENT_EXIT: proc_stats_account(proc_ev->event_data.exit.process_pid, STAT_EXIT); if (!(opt_flags & OPT_QUIET) && (opt_flags & OPT_EV_EXIT)) { + static unsigned char extstr[] = { 0xe2, 0x87, 0xa5, 00 }; + pid = proc_ev->event_data.exit.process_pid; info1 = proc_info_get(pid); if (info1->start.tv_sec) { @@ -1244,10 +1263,11 @@ snprintf(duration, sizeof(duration), "unknown"); } row_increment(); - printf("%s exit %*d %s%6d %8s %s%s%s\n", + printf("%s exit %*d %s%s%6d %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? (char *)extstr : "", proc_ev->event_data.exit.exit_code, duration, info1->kernel_thread ? "[" : "", @@ -1263,10 +1283,11 @@ row_increment(); pid = proc_ev->event_data.exec.process_pid; if (proc_ev->what == PROC_EVENT_UID) { - printf("%s uid %*d %s%6s %8s %s%s%s\n", + printf("%s uid %*d %s%s%6s %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? " " : "", get_username(proc_ev->event_data.id.e.euid), "", info1->kernel_thread ? "[" : "", @@ -1291,10 +1312,11 @@ if (!(opt_flags & OPT_QUIET) && (opt_flags & OPT_EV_UID)) { row_increment(); pid = proc_ev->event_data.exec.process_pid; - printf("%s sid %*d %s%6d %8s %s%s%s\n", + printf("%s sid %*d %s%s%6d %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? " " : "", proc_ev->event_data.sid.process_pid, "", info1->kernel_thread ? "[" : "", @@ -1307,13 +1329,16 @@ case PROC_EVENT_COREDUMP: proc_stats_account(proc_ev->event_data.coredump.process_pid, STAT_CORE); if (!(opt_flags & OPT_QUIET) && (opt_flags & OPT_EV_CORE)) { + static unsigned char diestr[] = { 0xe2, 0x98, 0xa0, 00 }; + pid = proc_ev->event_data.coredump.process_pid; info1 = proc_info_get(pid); row_increment(); - printf("%s core %*d %s %8s %s%s%s\n", + printf("%s core %*d %s%s %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? (char *)diestr : "", "", info1->kernel_thread ? "[" : "", info1->cmdline, @@ -1335,10 +1360,11 @@ #endif info1 = proc_info_get(pid); row_increment(); - printf("%s ptrce %*d %s%6s %8s %s%s%s\n", + printf("%s ptrce %*d %s%s%6s %8s %s%s%s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? " " : "", attach ? "attach" : "detach", "", info1->kernel_thread ? "[" : "", @@ -1351,6 +1377,8 @@ case PROC_EVENT_COMM: proc_stats_account(proc_ev->event_data.comm.process_pid, STAT_COMM); if (!(opt_flags & OPT_QUIET) && (opt_flags & OPT_EV_COMM)) { + static unsigned char comstr[] = { 0xe2, 0x86, 0xbb, 00 }; + pid = proc_ev->event_data.comm.process_pid; info1 = proc_info_get(pid); comm = proc_comm(pid); @@ -1358,10 +1386,12 @@ break; row_increment(); - printf("%s comm %*d %s %8s %s%s%s -> %s\n", + printf("%s comm %*d %s%s%s %8s %s%s%s -> %s\n", when, pid_size, pid, extra_info(pid), + (opt_flags & OPT_GLYPH) ? (char *)comstr : "", + "", "", info1->kernel_thread ? "[" : "", info1->cmdline, @@ -1390,6 +1420,7 @@ printf("-d\tstrip off directory path from process name.\n" "-D\tspecify run duration in seconds.\n" "-e\tselect which events to monitor.\n" + "-g\tshow glyphs for event types.\n" "-h\tshow this help.\n" "-l\tforce stdout line buffering.\n" "-r\trun with real time FIFO scheduler.\n" @@ -1435,7 +1466,7 @@ struct sigaction new_action; for (;;) { - const int c = getopt(argc, argv, "dD:e:hlrsSqx"); + const int c = getopt(argc, argv, "dD:e:ghlrsSqx"); if (c == -1) break; switch (c) { @@ -1453,6 +1484,9 @@ if (parse_ev(optarg) < 0) exit(EXIT_FAILURE); break; + case 'g': + opt_flags |= OPT_GLYPH; + break; case 'h': show_help(argv); exit(EXIT_SUCCESS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/forkstat-0.02.02/snapcraft/snapcraft.yaml new/forkstat-0.02.03/snapcraft/snapcraft.yaml --- old/forkstat-0.02.02/snapcraft/snapcraft.yaml 2018-01-31 11:36:35.000000000 +0100 +++ new/forkstat-0.02.03/snapcraft/snapcraft.yaml 2018-06-08 17:23:10.000000000 +0200 @@ -2,7 +2,7 @@ version: 0 summary: process fork/exec/exit monitoring tool description: Forkstat monitors process fork(), exec() and exit() activity. It is useful for monitoring system behaviour and to track down rogue processes that are spawning off processes and potentially abusing the system. -confinement: devmode +confinement: strict type: app grade: stable @@ -17,4 +17,4 @@ apps: forkstat: command: usr/bin/forkstat - + plugs: [hardware-observe,netlink-connector,system-observe]