mark as BROKEN. while the current version builds, it doesn't report a
thing mildly useful outside of the core dumps. while upstream took all the local patches and eventually released 3.7.0, it remains completely unreliable - at least update to 3.7.0 to aid in tracking down the machine.c bits that need to be addressed. ok sthen on marking this BROKEN
This commit is contained in:
parent
67685dc7e1
commit
806ad960d4
@ -1,14 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2013/03/11 02:52:07 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2014/04/20 19:40:55 okan Exp $
|
||||
|
||||
BROKEN = constant core dumps
|
||||
|
||||
COMMENT = top for monitoring PostgreSQL processes
|
||||
|
||||
DISTNAME = pg_top-3.6.2
|
||||
DISTNAME = pg_top-3.7.0
|
||||
CATEGORIES = databases sysutils
|
||||
REVISION = 2
|
||||
|
||||
HOMEPAGE = http://ptop.projects.postgresql.org/
|
||||
MASTER_SITES = http://pgfoundry.org/frs/download.php/1781/
|
||||
|
||||
MASTER_SITES = http://pgfoundry.org/frs/download.php/3503/
|
||||
|
||||
MAINTAINER= Okan Demirmen <okan@openbsd.org>
|
||||
|
||||
@ -23,6 +23,5 @@ WANTLIB += pq>=5
|
||||
SEPARATE_BUILD = Yes
|
||||
CONFIGURE_STYLE = gnu
|
||||
CONFIGURE_ARGS = --with-postgresql=${LOCALBASE}
|
||||
USE_GROFF = Yes
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,2 @@
|
||||
MD5 (pg_top-3.6.2.tar.gz) = Et21DPg+MCfRgqE4HTiPHQ==
|
||||
RMD160 (pg_top-3.6.2.tar.gz) = tmUi+Z9aU9dJo4U5M3fMUiSZ5uo=
|
||||
SHA1 (pg_top-3.6.2.tar.gz) = wWWlsJq5Yb+YiS25SzB+MawM+DI=
|
||||
SHA256 (pg_top-3.6.2.tar.gz) = Ah7oNqzTx2DVGYFu0zsIaJv3AP9SzWeAVWNnVCjYuZ8=
|
||||
SIZE (pg_top-3.6.2.tar.gz) = 271581
|
||||
SHA256 (pg_top-3.7.0.tar.gz) = VlhUk1iQfwDErfk8hZZN1Dd+BwZUET3izQ65ZYa5Pxo=
|
||||
SIZE (pg_top-3.7.0.tar.gz) = 289788
|
||||
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-loadavg_h,v 1.1 2010/06/14 07:07:49 jasper Exp $
|
||||
|
||||
Having 'mips' defined doesn't mean we run Irix.
|
||||
|
||||
--- loadavg.h.orig Mon Jun 14 01:05:15 2010
|
||||
+++ loadavg.h Mon Jun 14 01:05:30 2010
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
* Defined types: load_avg for load averages, pctcpu for cpu percentages.
|
||||
*/
|
||||
-#if defined(mips) && !defined(NetBSD)
|
||||
+#if defined(mips) && !defined(NetBSD) && !defined(OpenBSD)
|
||||
#include <sys/fixpoint.h>
|
||||
#if defined(FBITS) && !defined(FSCALE)
|
||||
#define FSCALE (1 << FBITS) /* mips */
|
@ -1,224 +1,20 @@
|
||||
$OpenBSD: patch-machine_m_openbsd_c,v 1.3 2012/12/18 21:38:12 sthen Exp $
|
||||
--- machine/m_openbsd.c.orig Sat Apr 5 11:09:06 2008
|
||||
+++ machine/m_openbsd.c Thu Dec 6 15:30:59 2012
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <sys/swap.h>
|
||||
@@ -51,13 +52,13 @@
|
||||
#include "loadavg.h"
|
||||
$OpenBSD: patch-machine_m_openbsd_c,v 1.4 2014/04/20 19:40:55 okan Exp $
|
||||
--- machine/m_openbsd.c.orig Fri Apr 18 18:20:57 2014
|
||||
+++ machine/m_openbsd.c Fri Apr 18 18:21:14 2014
|
||||
@@ -236,7 +236,7 @@ get_system_info(struct system_info *si)
|
||||
* that there's nothing worth getting from the process table unless there
|
||||
* is more than 1 process.
|
||||
*/
|
||||
- if (nproc > 1)
|
||||
+ if (nproc > 1) {
|
||||
if (ncpu > 1) {
|
||||
int cp_time_mib[] = {CTL_KERN, KERN_CPTIME2, 0};
|
||||
|
||||
static long swapmode(long *, long *);
|
||||
-static char *state_abbr(struct kinfo_proc2 *);
|
||||
-static char *format_comm(struct kinfo_proc2 *);
|
||||
+static char *state_abbr(struct kinfo_proc *);
|
||||
+static char *format_comm(struct kinfo_proc *);
|
||||
|
||||
/* get_process_info passes back a handle. This is what it looks like: */
|
||||
|
||||
struct handle {
|
||||
- struct kinfo_proc2 **next_proc; /* points to next valid proc pointer */
|
||||
+ struct kinfo_proc **next_proc; /* points to next valid proc pointer */
|
||||
int remaining; /* number of pointers remaining */
|
||||
};
|
||||
|
||||
@@ -138,8 +139,8 @@ int (*proc_compares[]) () =
|
||||
static int nproc;
|
||||
static int onproc = -1;
|
||||
static int pref_len;
|
||||
-static struct kinfo_proc2 *pbase;
|
||||
-static struct kinfo_proc2 **pref;
|
||||
+static struct kinfo_proc *pbase;
|
||||
+static struct kinfo_proc **pref;
|
||||
|
||||
/* these are for getting the memory statistics */
|
||||
static int pageshift; /* log base 2 of the pagesize */
|
||||
@@ -312,7 +313,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
{
|
||||
int show_idle, show_system, show_threads, show_uid, show_cmd;
|
||||
int total_procs, active_procs;
|
||||
- struct kinfo_proc2 **prefp, *pp;
|
||||
+ struct kinfo_proc **prefp, *pp;
|
||||
int mib[6];
|
||||
size_t size;
|
||||
|
||||
@@ -320,11 +321,11 @@ get_process_info(struct system_info *si, struct proces
|
||||
PGconn *pgconn;
|
||||
PGresult *pgresult = NULL;
|
||||
|
||||
- size = (size_t) sizeof(struct kinfo_proc2);
|
||||
+ size = (size_t) sizeof(struct kinfo_proc);
|
||||
mib[0] = CTL_KERN;
|
||||
- mib[1] = KERN_PROC2;
|
||||
+ mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PID;
|
||||
- mib[4] = sizeof(struct kinfo_proc2);
|
||||
+ mib[4] = sizeof(struct kinfo_proc);
|
||||
mib[5] = 1;
|
||||
|
||||
nproc = 0;
|
||||
@@ -333,14 +334,14 @@ get_process_info(struct system_info *si, struct proces
|
||||
{
|
||||
pgresult = PQexec(pgconn, QUERY_PROCESSES);
|
||||
nproc = PQntuples(pgresult);
|
||||
- pbase = (struct kinfo_proc2 *) realloc(pbase,
|
||||
- sizeof(struct kinfo_proc2 *) * nproc);
|
||||
+ pbase = (struct kinfo_proc *) realloc(pbase,
|
||||
+ sizeof(struct kinfo_proc *) * nproc);
|
||||
}
|
||||
PQfinish(pgconn);
|
||||
|
||||
if (nproc > onproc)
|
||||
- pref = (struct kinfo_proc2 **)realloc(pref,
|
||||
- sizeof(struct kinfo_proc2 *) * (onproc = nproc));
|
||||
+ pref = (struct kinfo_proc **)realloc(pref,
|
||||
+ sizeof(struct kinfo_proc *) * (onproc = nproc));
|
||||
if (pref == NULL) {
|
||||
warnx("Out of memory.");
|
||||
quit(23);
|
||||
@@ -392,9 +393,9 @@ get_process_info(struct system_info *si, struct proces
|
||||
}
|
||||
|
||||
/* if requested, sort the "interesting" processes */
|
||||
- if (compare_index != NULL)
|
||||
+ if (compare_index != 0)
|
||||
qsort((char *) pref, active_procs,
|
||||
- sizeof(struct kinfo_proc2 *), proc_compares[compare_index]);
|
||||
+ sizeof(struct kinfo_proc *), proc_compares[compare_index]);
|
||||
/* remember active and total counts */
|
||||
si->p_total = total_procs;
|
||||
si->p_active = pref_len = active_procs;
|
||||
@@ -408,7 +409,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
char fmt[MAX_COLS]; /* static area where result is built */
|
||||
|
||||
static char *
|
||||
-state_abbr(struct kinfo_proc2 *pp)
|
||||
+state_abbr(struct kinfo_proc *pp)
|
||||
{
|
||||
static char buf[10];
|
||||
|
||||
@@ -422,7 +423,7 @@ state_abbr(struct kinfo_proc2 *pp)
|
||||
}
|
||||
|
||||
static char *
|
||||
-format_comm(struct kinfo_proc2 *kp)
|
||||
+format_comm(struct kinfo_proc *kp)
|
||||
{
|
||||
#define ARG_SIZE 60
|
||||
static char **s, buf[ARG_SIZE];
|
||||
@@ -457,7 +458,7 @@ char *
|
||||
format_next_process(caddr_t handle, char *(*get_userid)(uid_t))
|
||||
{
|
||||
char *p_wait, waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */
|
||||
- struct kinfo_proc2 *pp;
|
||||
+ struct kinfo_proc *pp;
|
||||
struct handle *hp;
|
||||
int cputime;
|
||||
double pct;
|
||||
@@ -477,7 +478,7 @@ format_next_process(caddr_t handle, char *(*get_userid
|
||||
p_wait = pp->p_wmesg;
|
||||
else {
|
||||
snprintf(waddr, sizeof(waddr), "%llx",
|
||||
- (unsigned long long)(pp->p_wchan & ~KERNBASE));
|
||||
+ (unsigned long long)pp->p_wchan);
|
||||
p_wait = waddr;
|
||||
@@ -267,6 +267,7 @@ get_system_info(struct system_info *si)
|
||||
cp_old[0], cp_diff[0]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
@@ -541,13 +542,13 @@ compare_cpu(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
- struct kinfo_proc2 *p1, *p2;
|
||||
+ struct kinfo_proc *p1, *p2;
|
||||
pctcpu lresult;
|
||||
int result;
|
||||
+ }
|
||||
|
||||
/* remove one level of indirection */
|
||||
- p1 = *(struct kinfo_proc2 **) pp1;
|
||||
- p2 = *(struct kinfo_proc2 **) pp2;
|
||||
+ p1 = *(struct kinfo_proc **) pp1;
|
||||
+ p2 = *(struct kinfo_proc **) pp2;
|
||||
|
||||
ORDERKEY_PCTCPU
|
||||
ORDERKEY_CPUTIME
|
||||
@@ -565,13 +566,13 @@ compare_size(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
- struct kinfo_proc2 *p1, *p2;
|
||||
+ struct kinfo_proc *p1, *p2;
|
||||
pctcpu lresult;
|
||||
int result;
|
||||
|
||||
/* remove one level of indirection */
|
||||
- p1 = *(struct kinfo_proc2 **) pp1;
|
||||
- p2 = *(struct kinfo_proc2 **) pp2;
|
||||
+ p1 = *(struct kinfo_proc **) pp1;
|
||||
+ p2 = *(struct kinfo_proc **) pp2;
|
||||
|
||||
ORDERKEY_MEM
|
||||
ORDERKEY_RSSIZE
|
||||
@@ -589,13 +590,13 @@ compare_res(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
- struct kinfo_proc2 *p1, *p2;
|
||||
+ struct kinfo_proc *p1, *p2;
|
||||
pctcpu lresult;
|
||||
int result;
|
||||
|
||||
/* remove one level of indirection */
|
||||
- p1 = *(struct kinfo_proc2 **) pp1;
|
||||
- p2 = *(struct kinfo_proc2 **) pp2;
|
||||
+ p1 = *(struct kinfo_proc **) pp1;
|
||||
+ p2 = *(struct kinfo_proc **) pp2;
|
||||
|
||||
ORDERKEY_RSSIZE
|
||||
ORDERKEY_MEM
|
||||
@@ -613,13 +614,13 @@ compare_time(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
- struct kinfo_proc2 *p1, *p2;
|
||||
+ struct kinfo_proc *p1, *p2;
|
||||
pctcpu lresult;
|
||||
int result;
|
||||
|
||||
/* remove one level of indirection */
|
||||
- p1 = *(struct kinfo_proc2 **) pp1;
|
||||
- p2 = *(struct kinfo_proc2 **) pp2;
|
||||
+ p1 = *(struct kinfo_proc **) pp1;
|
||||
+ p2 = *(struct kinfo_proc **) pp2;
|
||||
|
||||
ORDERKEY_CPUTIME
|
||||
ORDERKEY_PCTCPU
|
||||
@@ -637,13 +638,13 @@ compare_prio(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
- struct kinfo_proc2 *p1, *p2;
|
||||
+ struct kinfo_proc *p1, *p2;
|
||||
pctcpu lresult;
|
||||
int result;
|
||||
|
||||
/* remove one level of indirection */
|
||||
- p1 = *(struct kinfo_proc2 **) pp1;
|
||||
- p2 = *(struct kinfo_proc2 **) pp2;
|
||||
+ p1 = *(struct kinfo_proc **) pp1;
|
||||
+ p2 = *(struct kinfo_proc **) pp2;
|
||||
|
||||
ORDERKEY_PRIO
|
||||
ORDERKEY_PCTCPU
|
||||
@@ -667,7 +668,7 @@ compare_prio(const void *v1, const void *v2)
|
||||
uid_t
|
||||
proc_owner(pid_t pid)
|
||||
{
|
||||
- struct kinfo_proc2 **prefp, *pp;
|
||||
+ struct kinfo_proc **prefp, *pp;
|
||||
int cnt;
|
||||
|
||||
prefp = pref;
|
||||
size = sizeof(sysload);
|
||||
if (sysctl(sysload_mib, 2, &sysload, &size, NULL, 0) < 0)
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-pg_top_1_in,v 1.1.1.1 2008/06/10 20:48:10 okan Exp $
|
||||
--- pg_top.1.in.orig Tue Jun 10 13:36:03 2008
|
||||
+++ pg_top.1.in Tue Jun 10 13:39:20 2008
|
||||
@@ -437,6 +437,12 @@ things can change while
|
||||
$OpenBSD: patch-pg_top_1_in,v 1.2 2014/04/20 19:40:55 okan Exp $
|
||||
--- pg_top.1.in.orig Fri Mar 14 12:59:11 2014
|
||||
+++ pg_top.1.in Fri Mar 14 12:58:38 2014
|
||||
@@ -441,6 +441,12 @@ things can change while
|
||||
.I pg_top
|
||||
is collecting information for an update. The picture it gives is only a
|
||||
close approximation to reality.
|
||||
|
Loading…
x
Reference in New Issue
Block a user