summaryrefslogtreecommitdiff
path: root/app-admin/procinfo
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/procinfo
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/procinfo')
-rw-r--r--app-admin/procinfo/Manifest9
-rw-r--r--app-admin/procinfo/files/cpu-usage-fix.patch31
-rw-r--r--app-admin/procinfo/files/kernel-2.6.patch296
-rw-r--r--app-admin/procinfo/files/procinfo-18-stat.patch21
-rw-r--r--app-admin/procinfo/files/procinfo-flags.patch16
-rw-r--r--app-admin/procinfo/metadata.xml5
-rw-r--r--app-admin/procinfo/procinfo-18-r2.ebuild38
7 files changed, 416 insertions, 0 deletions
diff --git a/app-admin/procinfo/Manifest b/app-admin/procinfo/Manifest
new file mode 100644
index 000000000000..1e791eaeef10
--- /dev/null
+++ b/app-admin/procinfo/Manifest
@@ -0,0 +1,9 @@
+AUX cpu-usage-fix.patch 791 SHA256 6f1be6a86a4e38008660cb7f5039c5c267a3ec1c0d6819b298473e0aa2797bba SHA512 48b8bae8a8f117edd60dbb43172768bdbf8c8c0f718739ab1957afbecab323255de48504298ae2c03e3c52fac86dc47cd6bd44cd5c48d1f450404268833fd090 WHIRLPOOL f1922fb81c80b140f8518c3d186fe13620df3efa8644903993deaa44b3a6e0d8c6190e4331550a090d873149c27cd9d8fb869f7e4a1f302a5c6e20c89f8ac615
+AUX kernel-2.6.patch 9954 SHA256 db154ead361395186e9fe3a120eb71ce1b3cd8df04560459ec44398db7a0b9a1 SHA512 4c5ee12f199bb24459c1a41a927343bf4c1503229f8522c36ed07df7ec953331346e1271e5ac9bd1ad2d0a5efa5dfdc0276da40d68185655e1a5a96f4b8c0cff WHIRLPOOL def7e81259848bf6e5d8b32307f5cc85647f48354fb238f3f0c9c5309f208c37deeff15478ecd78d5919545b6bdf443141b1ba495cfcf3247749a36b2dfcc232
+AUX procinfo-18-stat.patch 778 SHA256 b0312e05e8f77faf73e9dd18e1c8a0133c26159d0fd3032821f883a99444f96f SHA512 d9672780ca78976e84cddd80469553b1d5dcbb8c361ec4e2c6229e608a6a309293ced9ac41ee55b609ce7c8b4019571e406bda5228c2277e0e1ff7553ba700da WHIRLPOOL 7be4cc18a97b81a351800ff56209e001bdc4b61f21a312ce5acd7b6b4a159f235df71ce0741a437911b3b890c564cd3c80bae87b40fc4e3999a64376742091b2
+AUX procinfo-flags.patch 373 SHA256 80b65c4444ce0367876e6e083de99402a5abafc5065bee15e5951d5c274e75be SHA512 00ee615dc6156a5c162237abcfaec7596dd358e534c68208b39d1f2487d73e10cde77bf3ead8650d18cce640f2a5381eb13078c87e6525ce8d2448beba1454c1 WHIRLPOOL f705a03521fbef410b7d1df0510a67aa6ca216a2a643de3ce71f5ca445521e33f0f08b0c0c6a7566b3d4ae13e1d73322edfef738b821d32c7bbd92bf10b651fd
+DIST procinfo-18.tar.gz 24365 SHA256 c114e625b87fb06585484eb9f3ff868de165b3e61926fee55479d1bd3de09b99 SHA512 12c4d7983f5d6531be6d4df39f5f1e1ee2ea2394a6eb8fb8df0573f0085499e4b7d43355bfa549a24ddf1ecb09bbfa7b038cef9c483620c74ad5cedc219e35fa WHIRLPOOL b906ab0c015a199cad894eff1c1c104abe5c8c599a18bc6310904c45b26347b8c8c906cd6839ab4b01e0a917557d52f4c465fcb884193c79c54d93136c9f4777
+EBUILD procinfo-18-r2.ebuild 836 SHA256 54bbe38387d864a4479845562ab75be988835c596a89a251945aaee68c3617b1 SHA512 f91367e56f4b3191eff3050a3e4b388eca8bc65d070c5592821b22ca7fea6fdb53dbbeb912a5ebf7b3091d1ea66950b62f3c5777318c4f8df7ee37f50a843d91 WHIRLPOOL 11ab91df681435814429a7d8b86fad23dab5fbccf7d4da1b1c7bc37db13cd92fbf6bb8c608042875b106843adb28ae6b88de7ab530bedd0b1d15c8f3075600f4
+MISC ChangeLog 2643 SHA256 3d9f833f4502e66163891b2e0ce65b7da1af3dda0da105b37c3c0cbefac19101 SHA512 f7455f466b0ae097667c815b39ed2a3a47ae708505d4cb4433f76b174b2f0f92c3a84f78c9fdb5aed24395fd5e5a8d6ee972967bf26dab117e13ca79298475fd WHIRLPOOL c01e4f807b1259f00f2cf4a53f27012a3c18fcf43e7d013e5b26a27140e2826a785ed98a3cf653937ec112ef71f0b7068908aa965da29530832541546eeacd04
+MISC ChangeLog-2015 3714 SHA256 88bc4a58fa28d8c4386bbe2ac220904459dbca76113b5d5e00cac1b6988912c1 SHA512 311676e7548ddd8d480649a8d8d31d06644ef5d9ffd86f82e91bd13f6f4478f2793cb6f176355f4c107d6158ad239581206d1a2a4f8eccca6283f44ac2b055a8 WHIRLPOOL 8ec0dde2695479d364d81de5d56ca07dc42e8a8378be3f6fc68251b9219430e5d5a2f8c52f0d905871bd5a7004b2354908e41a17199fc9826c339a5c69bc4d64
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/app-admin/procinfo/files/cpu-usage-fix.patch b/app-admin/procinfo/files/cpu-usage-fix.patch
new file mode 100644
index 000000000000..f2bace1bd2cc
--- /dev/null
+++ b/app-admin/procinfo/files/cpu-usage-fix.patch
@@ -0,0 +1,31 @@
+--- procinfo.c~ 2005-01-31 20:52:29.250918264 +0200
++++ procinfo-18/procinfo.c 2005-01-31 20:48:55.907351416 +0200
+@@ -402,26 +402,8 @@
+ }
+
+ elapsed = new.uptime;
+-
+-/* XXX Is this stuff still relevant/true? */
+-
+-#ifdef __i386__ /* IRQ 0 is timer tick on i386's... */
+- if (nr_irqs) {
+- if (fs && old.uptime)
+- elapsed = DIFF (intr[0]);
+- } else
+-#endif
+-#ifdef __sparc__ /* IRQ 10 is timer tick on sparc's... */
+- if (nr_irqs) {
+- if (fs && old.uptime)
+- elapsed = DIFF (intr[10]);
+- } else
+-#endif
+- {
+- /* This won't be exact... */
+- if (fs && old.uptime)
+- elapsed = DIFF (uptime);
+- }
++ if (fs && old.uptime)
++ elapsed = DIFF (uptime);
+
+ printf ("user : %s %s",
+ hms (bDIFF (cpu_user)), perc (bDIFF (cpu_user), elapsed, nr_cpus));
diff --git a/app-admin/procinfo/files/kernel-2.6.patch b/app-admin/procinfo/files/kernel-2.6.patch
new file mode 100644
index 000000000000..b1eef39e3088
--- /dev/null
+++ b/app-admin/procinfo/files/kernel-2.6.patch
@@ -0,0 +1,296 @@
+diff -ruN procinfo-18/procinfo.c procinfo-19/procinfo.c
+--- procinfo-18/procinfo.c 2001-02-25 11:29:16.000000000 +0000
++++ procinfo-19/procinfo.c 2004-06-17 10:28:33.767925439 +0100
+@@ -5,9 +5,10 @@
+ Displays general info from /proc.
+
+ Date: 1995-07-08 05:30:34
+- Last Change: 2001-02-25 00:27:21
++ Last Change: 2004-06-17 11:28:13
+
+ Copyright (c) 1994-2001 svm@kozmix.cistron.nl
++ Copyright (c) 2004 procinfo@meisel.cc (upgrades for 2.6 kernel)
+
+ This software is released under the GNU Public Licence. See the file
+ `COPYING' for details. Since you're probably running Linux I'm sure
+@@ -26,6 +27,7 @@
+ #include <string.h>
+ #include <termios.h>
+ #include <termcap.h>
++#include <ctype.h>
+ #include <time.h>
+ #include <unistd.h>
+ #include <sys/param.h> /* for HZ -- should be in <time.h> ? */
+@@ -72,9 +74,9 @@
+ int nr_irqs = 0;
+ int nr_cpus = 0;
+
+-FILE *loadavgfp, *meminfofp, *modulesfp, *statfp, *uptimefp,
++FILE *loadavgfp, *meminfofp, *modulesfp, *statfp, *uptimefp, *diskstatsfp,
+ *devicesfp, *filesystemsfp, *interruptsfp, *dmafp, *cmdlinefp,
+- *versionfp, *cpuinfofp;
++ *versionfp, *cpuinfofp, *vmstatfp;
+
+ char line[1024], cmdline[1024], booted[40], *version = NULL, *message = NULL;
+
+@@ -89,9 +91,13 @@
+ {
+ unsigned long elapsed;
+ char loadavg[32];
+- int i;
++ int i, havetwosix = 0, lastdisk;
+ static int have_m_c = -1; /* Do we have cache info? */
+ static int have_m_l = -1; /* Do we have new-style-one-datum-per-line? */
++ char devicename[10];
++ char *last;
++ unsigned int q,w,a,s,d,f,g,h,j,k,l,y,x;
++ int disk_counter = 0, ret;
+
+
+ /**** /proc/uptime ****/
+@@ -237,6 +243,50 @@
+
+ printf ("Bootup: %s Load average: %s\n\n", booted, loadavg);
+
++/**** /proc/vmstat ... 2.6.x kernel only ****/
++ if (vmstatfp) {
++ havetwosix = 1;
++ fseek (vmstatfp, 0L, SEEK_SET);
++ while (fgets (line, sizeof (line), vmstatfp)) {
++ char *type = strtok (line, " ");
++ if (ISSTR ("pgpgin")) {
++ new.pgin = VAL;
++ } else if (ISSTR ("pgpgout")) {
++ new.pgout = VAL;
++ } else if (ISSTR ("pgactivate")) {
++ new.pgac = VAL;
++ } else if (ISSTR ("pgdeactivate")) {
++ new.pgdeac = VAL;
++ } else if (ISSTR ("pgfault")) {
++ new.pgfault = VAL;
++ } else if (ISSTR ("pswpin")) {
++ new.swin = VAL;
++ } else if (ISSTR ("pswpout")) {
++ new.swout = VAL;
++ }
++ }
++ }
++
++/**** /proc/diskstats ... 2.6.x kernel only ****/
++ if (diskstatsfp) {
++ havetwosix = 1;
++ fseek (diskstatsfp, 0L, SEEK_SET);
++ while (fgets (line, sizeof (line), diskstatsfp)) {
++ char *type = strtok (line, "\n");
++ ret = sscanf (type, "%d%d%s%d%d%d%d%d%d%d%d%d%d%d", &q, &w, devicename, &a, &s, &d, &f, &g, &h, &j, &k, &l, &y, &x);
++ if (ret != 14) /* Everything with less than 14 elements is not a disk device */
++ continue;
++ last = devicename+strlen(devicename)-1;
++ if (isalpha(*last)) {/* Is the last char is a number ignore it .. like fd0 */
++ if (++disk_counter > 7) /* 7 disks is all we have room for */
++ continue;
++ else {
++ new.disk_r[disk_counter-1] = a;
++ new.disk_w[disk_counter-1] = g;
++ }
++ }
++ }
++ }
+
+ /**** /proc/stat ****/
+
+@@ -249,6 +299,9 @@
+ new.cpu_nice = VAL;
+ new.cpu_sys = VAL;
+ new.cpu_idle = VAL;
++ new.cpu_iowait = VAL;
++ new.cpu_hirq = VAL;
++ new.cpu_sirq = VAL;
+ /*
+ * according to bug #1959, sometimes the cpu_idle
+ * seems to go backwards(!) on SMP boxes. This may
+@@ -262,34 +315,54 @@
+ new.disk[1] = VAL;
+ new.disk[2] = VAL;
+ new.disk[3] = VAL;
++ new.disk[4] = VAL;
++ new.disk[5] = VAL;
++ new.disk[6] = VAL;
+ } else if (ISSTR ("disk_rio") && io_or_blk == 0) {
+ new.disk_r[0] = VAL;
+ new.disk_r[1] = VAL;
+ new.disk_r[2] = VAL;
+ new.disk_r[3] = VAL;
++ new.disk_r[4] = VAL;
++ new.disk_r[5] = VAL;
++ new.disk_r[6] = VAL;
++ } else if (ISSTR ("disk_wio") && io_or_blk == 0) {
++ new.disk_w[0] = VAL;
++ } else if (ISSTR ("disk_wio") && io_or_blk == 0) {
++ new.disk_w[0] = VAL;
++ } else if (ISSTR ("disk_wio") && io_or_blk == 0) {
++ new.disk_w[0] = VAL;
+ } else if (ISSTR ("disk_wio") && io_or_blk == 0) {
+ new.disk_w[0] = VAL;
+ new.disk_w[1] = VAL;
+ new.disk_w[2] = VAL;
+ new.disk_w[3] = VAL;
++ new.disk_w[4] = VAL;
++ new.disk_w[5] = VAL;
++ new.disk_w[6] = VAL;
+ } else if (ISSTR ("disk_rblk") && io_or_blk == 1) {
+ new.disk_r[0] = VAL;
+ new.disk_r[1] = VAL;
+ new.disk_r[2] = VAL;
+ new.disk_r[3] = VAL;
++ new.disk_r[4] = VAL;
++ new.disk_r[5] = VAL;
++ new.disk_r[6] = VAL;
+ } else if (ISSTR ("disk_wblk") && io_or_blk == 1) {
+ new.disk_w[0] = VAL;
+ new.disk_w[1] = VAL;
+ new.disk_w[2] = VAL;
+ new.disk_w[3] = VAL;
++ new.disk_w[4] = VAL;
++ new.disk_w[5] = VAL;
++ new.disk_w[6] = VAL;
+ } else if (ISSTR ("disk_io:")) {
+- int disk_counter = 0, ret;
+ unsigned int q, w, e, r, t, y, u; /* I'm NOT in the mood today. */
+ char *barf;
+
+ while ((barf = strtok (NULL, " "))) {
+
+- if (++disk_counter > 4) /* 4 is all we have room for */
++ if (++disk_counter > 7) /* 7 is all we have room for */
+ continue;
+
+ ret = sscanf (barf, "(%d,%d):(%d,%d,%d,%d,%d)",
+@@ -374,7 +447,10 @@
+
+ printf ("system: %s %s",
+ hms (bDIFF (cpu_sys)), perc (bDIFF (cpu_sys), elapsed, nr_cpus));
+- printf (" swap in :%9lu", bDIFF (swin));
++ if (havetwosix)
++ printf (" page act:%9lu", bDIFF (pgac));
++ else
++ printf (" swap in :%9lu", bDIFF (swin));
+ if (new.disk_r[2])
+ printf (" disk 3: %8lur%8luw\n", bDIFF (disk_r[2]),
+ bDIFF (disk_w[2]));
+@@ -383,14 +459,53 @@
+ else
+ putchar ('\n');
+
++ if (havetwosix) {
++ printf ("IOwait: %s %s",
++ hms (bDIFF (cpu_iowait)), perc (bDIFF (cpu_iowait), elapsed, nr_cpus));
++ printf (" page dea:%9lu", bDIFF (pgdeac));
++ if (new.disk_r[3])
++ printf (" disk 4: %8lur%8luw\n", bDIFF (disk_r[3]),
++ bDIFF (disk_w[3]));
++ else if (new.disk[3])
++ printf (" disk 4: %8lu\n", bDIFF (disk[3]));
++ else
++ putchar ('\n');
++
++ printf ("hw irq: %s %s",
++ hms (bDIFF (cpu_hirq)), perc (bDIFF (cpu_hirq), elapsed, nr_cpus));
++ printf (" page flt:%9lu", bDIFF (pgfault));
++ if (new.disk_r[4])
++ printf (" disk 5: %8lur%8luw\n", bDIFF (disk_r[4]),
++ bDIFF (disk_w[4]));
++ else if (new.disk[4])
++ printf (" disk 5: %8lu\n", bDIFF (disk[4]));
++ else
++ putchar ('\n');
++
++ printf ("sw irq: %s %s",
++ hms (bDIFF (cpu_sirq)), perc (bDIFF (cpu_sirq), elapsed, nr_cpus));
++ printf (" swap in :%9lu", bDIFF (swin));
++ if (new.disk_r[5])
++ printf (" disk 6: %8lur%8luw\n", bDIFF (disk_r[5]),
++ bDIFF (disk_w[5]));
++ else if (new.disk[5])
++ printf (" disk 6: %8lu\n", bDIFF (disk[5]));
++ else
++ putchar ('\n');
++ }
++
+ printf ("idle : %s %s",
+ hms (bDIFF (cpu_idle)), perc (bDIFF (cpu_idle), elapsed, nr_cpus));
+ printf (" swap out:%9lu", bDIFF (swout));
+- if (new.disk_r[3])
+- printf (" disk 4: %8lur%8luw\n", bDIFF (disk_r[3]),
+- bDIFF (disk_w[3]));
+- else if (new.disk[3])
+- printf (" disk 4: %8lu\n", bDIFF (disk[3]));
++ if (havetwosix)
++ lastdisk = 3;
++ else
++ lastdisk = 6;
++ if (new.disk_r[lastdisk])
++ printf (" disk %d: %8lur%8luw\n", lastdisk+1, bDIFF (disk_r[lastdisk]),
++ bDIFF (disk_w[lastdisk]));
++ else if (new.disk[lastdisk])
++ printf (" disk %d: %8lu\n", lastdisk+1, bDIFF (disk[lastdisk]));
+ else
+ putchar ('\n');
+
+@@ -786,6 +901,8 @@
+ meminfofp = myfopen (PROC_DIR "meminfo");
+ statfp = myfopen (PROC_DIR "stat");
+ /* These may be missing, so check for NULL later. */
++ diskstatsfp = fopen (PROC_DIR "diskstats", "r");
++ vmstatfp = fopen (PROC_DIR "vmstat", "r");
+ modulesfp = fopen (PROC_DIR "modules", "r");
+ devicesfp = fopen (PROC_DIR "devices", "r");
+ filesystemsfp = fopen (PROC_DIR "filesystems", "r");
+@@ -990,6 +1107,9 @@
+ new.disk_r[1] = new.disk_w[1] =
+ new.disk_r[2] = new.disk_w[2] =
+ new.disk_r[3] = new.disk_w[3] = 0;
++ new.disk_r[4] = new.disk_w[4] = 0;
++ new.disk_r[5] = new.disk_w[5] = 0;
++ new.disk_r[6] = new.disk_w[6] = 0;
+ redrawn = 1;
+ message = io_or_blk ? "showing I/O in blocks" :
+ "showing I/O per requests";
+diff -ruN procinfo-18/procinfo.h procinfo-19/procinfo.h
+--- procinfo-18/procinfo.h 2001-02-24 23:30:45.000000000 +0000
++++ procinfo-19/procinfo.h 2004-06-17 09:24:16.511726412 +0100
+@@ -81,11 +81,11 @@
+ unsigned long uptime;
+ long m_to, m_us, m_fr, m_sh, m_bu, m_ca;
+ long s_to, s_us, s_fr;
+- unsigned long cpu_user, cpu_nice, cpu_sys, cpu_idle;
+- unsigned long disk[5];
+- unsigned long disk_r[5];
+- unsigned long disk_w[5];
+- unsigned long pgin, pgout, swin, swout;
++ unsigned long cpu_user, cpu_nice, cpu_sys, cpu_idle, cpu_iowait, cpu_hirq, cpu_sirq;
++ unsigned long disk[8];
++ unsigned long disk_r[8];
++ unsigned long disk_w[8];
++ unsigned long pgin, pgout, pgac, pgdeac, pgfault, swin, swout;
+ unsigned long *intr; /* Phew. That's better. */
+ unsigned long old_intr;
+ unsigned long ctxt;
+diff -ruN procinfo-18/routines.c procinfo-19/routines.c
+--- procinfo-18/routines.c 2001-02-24 23:30:45.000000000 +0000
++++ procinfo-19/routines.c 2004-06-16 16:36:51.000000000 +0100
+@@ -388,9 +388,13 @@
+ hms (unsigned long t)
+ {
+ unsigned int d, h, m, s;
++ unsigned long q;
+ static char buf[22];
+
+- t = t * 100 / HZ;
++ q = 100 / HZ; /* We need this because the libc does something funny here */
++ /* if we try to use: t = t * 100 / HZ; here! */
++ /* procinfo@meisel.cc 11. Feb. 2004 */
++ t = t * q;
+ d = (int) (t / 8640000);
+ t = t - (long) (d * 8640000);
+ h = (int) (t / 360000);
diff --git a/app-admin/procinfo/files/procinfo-18-stat.patch b/app-admin/procinfo/files/procinfo-18-stat.patch
new file mode 100644
index 000000000000..d7dc4a458b28
--- /dev/null
+++ b/app-admin/procinfo/files/procinfo-18-stat.patch
@@ -0,0 +1,21 @@
+diff -ur procinfo-18/procinfo.c procinfo-18-mod/procinfo.c
+--- procinfo-18/procinfo.c 2001-02-25 11:29:16.000000000 +0000
++++ procinfo-18-mod/procinfo.c 2008-04-16 10:16:29.000000000 +0100
+@@ -76,7 +76,7 @@
+ *devicesfp, *filesystemsfp, *interruptsfp, *dmafp, *cmdlinefp,
+ *versionfp, *cpuinfofp;
+
+-char line[1024], cmdline[1024], booted[40], *version = NULL, *message = NULL;
++char line[4096], cmdline[1024], booted[40], *version = NULL, *message = NULL;
+
+ float rate = 1.0; /* per interval or per sec */
+
+@@ -446,7 +446,7 @@
+ */
+ char *q;
+
+- if ((q = strstr (p, "PIC"))) {
++ if ((q = strstr (p, "PIC")) || (q = strstr (p, "MSI"))) {
+ while (*q != ' ') /* eat up "PIC" or "PIC-foo" */
+ q++;
+ while (*q == ' ') /* eat up spaces */
diff --git a/app-admin/procinfo/files/procinfo-flags.patch b/app-admin/procinfo/files/procinfo-flags.patch
new file mode 100644
index 000000000000..e254c254e1a9
--- /dev/null
+++ b/app-admin/procinfo/files/procinfo-flags.patch
@@ -0,0 +1,16 @@
+--- procinfo-18/Makefile.orig 2001-02-25 00:29:53.000000000 +0100
++++ procinfo-18/Makefile 2006-10-21 13:57:47.000000000 +0200
+@@ -2,10 +2,10 @@
+
+ prefix=/usr
+
+-CC = gcc -Wall -Wstrict-prototypes
++CC +=
+
+-CFLAGS = -O2
+-LDFLAGS = -s
++CFLAGS += -Wall -Wstrict-prototypes
++LDFLAGS +=
+
+ # If you get lots of `undefined references', you probably need -lncurses
+ # instead:
diff --git a/app-admin/procinfo/metadata.xml b/app-admin/procinfo/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/app-admin/procinfo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/app-admin/procinfo/procinfo-18-r2.ebuild b/app-admin/procinfo/procinfo-18-r2.ebuild
new file mode 100644
index 000000000000..33a1d8dc6daa
--- /dev/null
+++ b/app-admin/procinfo/procinfo-18-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Displays some kernel stats and info on a running Linux system"
+HOMEPAGE="http://www.kozmix.org/src/"
+SRC_URI="http://www.kozmix.org/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 ~s390 ~sh sparc x86"
+IUSE=""
+
+DEPEND="virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/kernel-2.6.patch
+ epatch "${FILESDIR}"/cpu-usage-fix.patch
+ epatch "${FILESDIR}"/${PN}-flags.patch
+ epatch "${FILESDIR}"/${P}-stat.patch
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ LDLIBS="$( $(tc-getPKG_CONFIG) --libs ncurses )"
+}
+
+src_install() {
+ dobin procinfo
+ newbin lsdev.pl lsdev
+ newbin socklist.pl socklist
+
+ doman *.8
+ dodoc README CHANGES
+}