mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 01:09:24 -04:00
Remove expired ports:
2007-04-27 security/op: no longer available from any mastersite 2007-05-15 shells/bash2: Old, unmaintained version, use shells/bash instead 2007-05-19 sysutils/xperfmon: irrelevant for supported FreeBSD releases
This commit is contained in:
parent
ab1e846e49
commit
a5a79ff2eb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=192717
38 changed files with 3 additions and 3570 deletions
3
MOVED
3
MOVED
|
@ -3055,3 +3055,6 @@ net/tspc2||2007-06-04|Has expired: development is discontinued
|
||||||
net-p2p/freenet||2007-06-04|Has expired: Does not work with existing Freenet network
|
net-p2p/freenet||2007-06-04|Has expired: Does not work with existing Freenet network
|
||||||
net-p2p/libfreenet||2007-06-04|Has expired: Does not work with existing Freenet network
|
net-p2p/libfreenet||2007-06-04|Has expired: Does not work with existing Freenet network
|
||||||
net-p2p/microdc||2007-06-04|Has expired: microdc is no longer in development. Consider using net-p2p/microdc2 instead
|
net-p2p/microdc||2007-06-04|Has expired: microdc is no longer in development. Consider using net-p2p/microdc2 instead
|
||||||
|
security/op||2007-06-04|Has expired: no longer available from any mastersite
|
||||||
|
shells/bash2||2007-06-04|Has expired: Old, unmaintained version, use shells/bash instead
|
||||||
|
sysutils/xperfmon||2007-06-04|Has expired: irrelevant for supported FreeBSD releases
|
||||||
|
|
|
@ -292,7 +292,6 @@
|
||||||
SUBDIR += ocaml-ssl
|
SUBDIR += ocaml-ssl
|
||||||
SUBDIR += oidentd
|
SUBDIR += oidentd
|
||||||
SUBDIR += oinkmaster
|
SUBDIR += oinkmaster
|
||||||
SUBDIR += op
|
|
||||||
SUBDIR += openbsm
|
SUBDIR += openbsm
|
||||||
SUBDIR += opencdk
|
SUBDIR += opencdk
|
||||||
SUBDIR += openct
|
SUBDIR += openct
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
# New ports collection makefile for: op
|
|
||||||
# Date created: Monday 29 January 2001
|
|
||||||
# Whom: Cyrille Lefevre <clefevre@citeweb.net>
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= op
|
|
||||||
PORTVERSION= 1.11
|
|
||||||
PORTREVISION= 4
|
|
||||||
CATEGORIES= security
|
|
||||||
MASTER_SITES= # disappeared
|
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
|
||||||
COMMENT= Allow others to run commands as root (like sudo but different)
|
|
||||||
|
|
||||||
DEPRECATED= no longer available from any mastersite
|
|
||||||
EXPIRATION_DATE= 2007-04-27
|
|
||||||
|
|
||||||
# Global variables
|
|
||||||
#
|
|
||||||
|
|
||||||
BINMODE= 4555
|
|
||||||
MAKE_ARGS= BASE="${PREFIX}" \
|
|
||||||
OPTS='-Dbsdi -DOP_ACCESS=\"${CONF_DIR}/${CONF_FILE}\"' \
|
|
||||||
LIBS='-ll -lcrypt' \
|
|
||||||
BINOWN=${BINOWN} BINGRP=${BINGRP} BINMODE=${BINMODE} \
|
|
||||||
MANOWN=${MANOWN} MANGRP=${MANGRP} MANMODE=${MANMODE}
|
|
||||||
ALL_TARGET= ${PORTNAME}
|
|
||||||
|
|
||||||
PLIST_SUB= CONF_DIR="${CONF_DIR:S,^${PREFIX}/,,}"
|
|
||||||
|
|
||||||
MAN8= op.8
|
|
||||||
|
|
||||||
PKGDEINSTALL= ${PKGINSTALL}
|
|
||||||
|
|
||||||
# Local variables
|
|
||||||
#
|
|
||||||
|
|
||||||
CO?= co
|
|
||||||
|
|
||||||
RCS_SUBDIR= RCS
|
|
||||||
CONF_DIR= ${PREFIX}/etc
|
|
||||||
|
|
||||||
CONF_FILE= op.access
|
|
||||||
SAMP_SUFX= .sample
|
|
||||||
DOC_FILES= README op.paper
|
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
# Post-extract
|
|
||||||
#
|
|
||||||
|
|
||||||
post-extract: checkout-files
|
|
||||||
|
|
||||||
checkout-files:
|
|
||||||
@cd ${WRKSRC} && ${CO} -q ${RCS_SUBDIR}/*
|
|
||||||
|
|
||||||
# Post-patch
|
|
||||||
#
|
|
||||||
|
|
||||||
post-patch: patch-makefile patch-conf-file
|
|
||||||
|
|
||||||
patch-makefile:
|
|
||||||
@${REINPLACE_CMD} \
|
|
||||||
-e '/:/!s|\(install\)|\1 -c|;s|CFLAGS=|CFLAGS+=|' \
|
|
||||||
${WRKSRC}/Makefile
|
|
||||||
|
|
||||||
patch-conf-file:
|
|
||||||
@${REINPLACE_CMD} -E \
|
|
||||||
-e '/^#|DEFAULT|MAGIC/!s|^|#|;s|/usr/ucb:||' \
|
|
||||||
${WRKSRC}/${CONF_FILE}
|
|
||||||
|
|
||||||
# Post-install
|
|
||||||
#
|
|
||||||
|
|
||||||
post-install: install-samp-files install-conf-file install-doc-files
|
|
||||||
|
|
||||||
install-samp-files:
|
|
||||||
@${INSTALL_DATA} ${WRKSRC}/${CONF_FILE} \
|
|
||||||
${CONF_DIR}/${CONF_FILE}${SAMP_SUFX}
|
|
||||||
|
|
||||||
install-conf-file:
|
|
||||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
|
|
||||||
${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
||||||
|
|
||||||
install-doc-files:
|
|
||||||
.if !defined(NOPORTDOCS)
|
|
||||||
@${MKDIR} ${DOCSDIR}
|
|
||||||
.for f in ${DOC_FILES}
|
|
||||||
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
|
||||||
.endfor
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
|
|
@ -1,3 +0,0 @@
|
||||||
MD5 (op-1.11.tar.gz) = 9790452f1adfe08e08ea2fa0d015b1b3
|
|
||||||
SHA256 (op-1.11.tar.gz) = f6478cc1a5e13426802f6553d6ad28d26d232697bbfeace5e7741e7bbea43408
|
|
||||||
SIZE (op-1.11.tar.gz) = 49217
|
|
|
@ -1,9 +0,0 @@
|
||||||
--- defs.h.orig Sun Nov 23 01:11:52 1997
|
|
||||||
+++ defs.h Tue Jan 30 09:45:22 2001
|
|
||||||
@@ -19,4 +19,6 @@
|
|
||||||
extern cmd_t *First, *Build();
|
|
||||||
|
|
||||||
#define MAXSTRLEN 256
|
|
||||||
+#ifndef OP_ACCESS
|
|
||||||
#define OP_ACCESS "/usr/local/etc/op.access"
|
|
||||||
+#endif
|
|
|
@ -1,33 +0,0 @@
|
||||||
--- lex.l.orig Thu Mar 3 20:47:59 2005
|
|
||||||
+++ lex.l Thu Mar 3 20:49:11 2005
|
|
||||||
@@ -10,10 +10,11 @@
|
|
||||||
/* +-------------------------------------------------------------------+ */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <varargs.h>
|
|
||||||
+#include <stdarg.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include "defs.h"
|
|
||||||
|
|
||||||
+static int addarg();
|
|
||||||
static cmd_t *newcmd();
|
|
||||||
char *savestr();
|
|
||||||
|
|
||||||
@@ -47,15 +48,12 @@
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
-msg(va_alist)
|
|
||||||
- va_dcl
|
|
||||||
+msg (char *s, ...)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
va_list ap;
|
|
||||||
- char *s;
|
|
||||||
|
|
||||||
- va_start(ap);
|
|
||||||
- s = va_arg(ap, char *);
|
|
||||||
+ va_start(ap,s);
|
|
||||||
fprintf(stderr,"line %d: ",yyline);
|
|
||||||
vfprintf(stderr, s, ap);
|
|
||||||
fputc('\n', stderr);
|
|
|
@ -1,100 +0,0 @@
|
||||||
--- main.c.orig Mon Dec 22 23:26:47 2003
|
|
||||||
+++ main.c Mon Dec 22 23:27:23 2003
|
|
||||||
@@ -9,7 +9,7 @@
|
|
||||||
/* +-------------------------------------------------------------------+ */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <varargs.h>
|
|
||||||
+#include <stdarg.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <grp.h>
|
|
||||||
@@ -51,6 +51,7 @@
|
|
||||||
extern char *getpass(), *crypt();
|
|
||||||
|
|
||||||
char *Progname;
|
|
||||||
+int fatal(char *s, ...);
|
|
||||||
char *format_cmd();
|
|
||||||
char *GetCode();
|
|
||||||
cmd_t *Find();
|
|
||||||
@@ -170,14 +171,11 @@
|
|
||||||
return Go(new, num, argc, argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
-fatal(va_alist)
|
|
||||||
- va_dcl
|
|
||||||
+fatal(char *s,...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
- char *s;
|
|
||||||
|
|
||||||
- va_start(ap);
|
|
||||||
- s = va_arg(ap, char *);
|
|
||||||
+ va_start(ap,s);
|
|
||||||
vfprintf(stderr, s, ap);
|
|
||||||
fputc('\n', stderr);
|
|
||||||
va_end(ap);
|
|
||||||
@@ -448,35 +446,28 @@
|
|
||||||
char *cp, *np;
|
|
||||||
struct passwd *pw;
|
|
||||||
struct group *gr;
|
|
||||||
- int ngroups, gidset[256];
|
|
||||||
+ int ngroups = 0, gidset[256];
|
|
||||||
int curenv = 0, curarg = 0;
|
|
||||||
char *new_envp[MAXENV];
|
|
||||||
char *new_argv[MAXARG];
|
|
||||||
char str[MAXSTRLEN], buf[4*MAXSTRLEN];
|
|
||||||
|
|
||||||
- if ((cp = FindOpt(cmd, "uid")) == NULL) {
|
|
||||||
- if (setuid(0) < 0)
|
|
||||||
- fatal("Unable to set uid to default", cp);
|
|
||||||
- } else {
|
|
||||||
- if ((pw = getpwnam(cp)) == NULL) {
|
|
||||||
- if (setuid(atoi(cp)) < 0)
|
|
||||||
- fatal("Unable to set uid to %s", cp);
|
|
||||||
- }
|
|
||||||
- if (setuid(pw->pw_uid) < 0)
|
|
||||||
- fatal("Unable to set uid to %s", cp);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
if ((cp = FindOpt(cmd, "gid")) == NULL) {
|
|
||||||
- ; /* don't have a default */
|
|
||||||
+ if (setgid(0) < 0)
|
|
||||||
+ fatal("Unable to set gid to default", cp);
|
|
||||||
} else {
|
|
||||||
for (cp=GetField(cp, str); cp!=NULL; cp=GetField(cp, str)) {
|
|
||||||
- if ((gr = getgrnam(cp)) != NULL)
|
|
||||||
+ if ((gr = getgrnam(str)) != NULL)
|
|
||||||
gidset[ngroups++] = gr->gr_gid;
|
|
||||||
+ else
|
|
||||||
+ gidset[ngroups++] = atoi(str);
|
|
||||||
}
|
|
||||||
if (ngroups == 0)
|
|
||||||
- fatal("Unable to setgid to any group");
|
|
||||||
+ fatal("Unable to set gid to any group");
|
|
||||||
if (setgroups(ngroups, gidset) < 0)
|
|
||||||
- fatal("Set group failed");
|
|
||||||
+ fatal("Unable to set auxiliary groups");
|
|
||||||
+ if (setgid(gidset[0]) < 0)
|
|
||||||
+ fatal("Unable to set gid to %s", gidset[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((cp = FindOpt(cmd, "umask")) == NULL) {
|
|
||||||
@@ -533,6 +524,17 @@
|
|
||||||
new_envp[curenv++] = environ[i];
|
|
||||||
}
|
|
||||||
new_envp[curenv] = NULL;
|
|
||||||
+
|
|
||||||
+ if ((cp = FindOpt(cmd, "uid")) == NULL) {
|
|
||||||
+ if (setuid(0) < 0)
|
|
||||||
+ fatal("Unable to set uid to default", cp);
|
|
||||||
+ } else {
|
|
||||||
+ if ((pw = getpwnam(cp)) == NULL) {
|
|
||||||
+ if (setuid(atoi(cp)) < 0)
|
|
||||||
+ fatal("Unable to set uid to %s", cp);
|
|
||||||
+ } else if (setuid(pw->pw_uid) < 0)
|
|
||||||
+ fatal("Unable to set uid to %s", cp);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (strcmp("MAGIC_SHELL", cmd->args[0]) == 0) {
|
|
||||||
for (i = 0; environ[i] != NULL; i++)
|
|
|
@ -1,5 +0,0 @@
|
||||||
The `op' tool provides a flexible means for system administrators to
|
|
||||||
grant trusted users access to certain root operations without having
|
|
||||||
to give them full superuser privileges. Different sets of users
|
|
||||||
may access different operations, and the security-related aspects
|
|
||||||
of environment of each operation can be carefully controlled
|
|
|
@ -1,50 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# $FreeBSD$
|
|
||||||
|
|
||||||
[ $# != 2 ] && exit 1
|
|
||||||
PKGNAME=$1
|
|
||||||
ACTION=$2
|
|
||||||
|
|
||||||
CONF_DIR=${PKG_PREFIX}/etc
|
|
||||||
|
|
||||||
CONF_FILE=op.access
|
|
||||||
CONF_OWN=root
|
|
||||||
CONF_GRP=wheel
|
|
||||||
CONF_MODE=400
|
|
||||||
|
|
||||||
SAMP_SUFX=.sample
|
|
||||||
|
|
||||||
INSTALL=install
|
|
||||||
CMP=cmp
|
|
||||||
RM=rm
|
|
||||||
|
|
||||||
case "$ACTION" in
|
|
||||||
|
|
||||||
POST-INSTALL)
|
|
||||||
if [ -f ${CONF_DIR}/${CONF_FILE} ]; then
|
|
||||||
echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} file."
|
|
||||||
else
|
|
||||||
${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \
|
|
||||||
${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
|
|
||||||
${CONF_DIR}/${CONF_FILE}
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
DEINSTALL)
|
|
||||||
if ${CMP} -s ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
|
|
||||||
${CONF_DIR}/${CONF_FILE}; then
|
|
||||||
${RM} -f ${CONF_DIR}/${CONF_FILE}
|
|
||||||
else
|
|
||||||
echo "$PKGNAME: Will not remove existing ${CONF_DIR}/${CONF_FILE} file."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
PRE-INSTALL|POST-DEINSTALL)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit
|
|
|
@ -1,6 +0,0 @@
|
||||||
@comment $FreeBSD$
|
|
||||||
bin/op
|
|
||||||
%%CONF_DIR%%/op.access.sample
|
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/op.paper
|
|
||||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
|
|
@ -6,7 +6,6 @@
|
||||||
SUBDIR += 44bsd-csh
|
SUBDIR += 44bsd-csh
|
||||||
SUBDIR += bash
|
SUBDIR += bash
|
||||||
SUBDIR += bash-completion
|
SUBDIR += bash-completion
|
||||||
SUBDIR += bash2
|
|
||||||
SUBDIR += bush
|
SUBDIR += bush
|
||||||
SUBDIR += ch
|
SUBDIR += ch
|
||||||
SUBDIR += es
|
SUBDIR += es
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
# ex:ts=8
|
|
||||||
# New ports collection makefile for: bash
|
|
||||||
# Date created: 21 August 1994
|
|
||||||
# Whom: jkh
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= bash
|
|
||||||
PORTVERSION= 2.05b.007
|
|
||||||
PORTREVISION?= 6
|
|
||||||
CATEGORIES= shells
|
|
||||||
MASTER_SITES= ${MASTER_SITE_GNU} \
|
|
||||||
ftp://ftp.cwru.edu/pub/bash/
|
|
||||||
MASTER_SITE_SUBDIR= bash
|
|
||||||
DISTFILES= bash-${PORTVERSION:C/\....$//}.tar.gz
|
|
||||||
.if !defined(NOPORTDOCS)
|
|
||||||
DISTFILES+= bash-doc-${PORTVERSION:C/\....$//}.tar.gz
|
|
||||||
.endif
|
|
||||||
|
|
||||||
PATCH_SITES= ${MASTER_SITE_GNU:S/$/:gnu/} \
|
|
||||||
ftp://ftp.cwru.edu/pub/bash/bash-2.05b-patches/ \
|
|
||||||
${MASTER_SITE_LOCAL:S/$/:local/}
|
|
||||||
PATCH_SITE_SUBDIR= bash/bash-2.05b-patches/:gnu obrien/:local
|
|
||||||
PATCHFILES= bash205b-001 bash205b-002 bash205b-003 bash205b-004 \
|
|
||||||
bash205b-005 bash205b-006 bash205b-007
|
|
||||||
# msg00029.txt msg00031.txt msg00030.txt
|
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
|
||||||
COMMENT= The GNU Bourne Again Shell
|
|
||||||
|
|
||||||
DEPRECATED= Old, unmaintained version, use shells/bash instead
|
|
||||||
EXPIRATION_DATE=2007-05-15
|
|
||||||
|
|
||||||
CONFLICTS= bash-3*
|
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
LATEST_LINK= ${PORTNAME}2
|
|
||||||
WRKSRC= ${WRKDIR}/bash-${PORTVERSION:C/\....$//}
|
|
||||||
GNU_CONFIGURE= Yes
|
|
||||||
CONFIGURE_ARGS= --with-installed-readline
|
|
||||||
.if defined(WITH_STATIC_BASH) || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" ))
|
|
||||||
CONFIGURE_ARGS+= --enable-static-link
|
|
||||||
.else
|
|
||||||
CONFIGURE_ARGS+= --enable-static-link=no
|
|
||||||
.endif
|
|
||||||
.if defined(DEBUG)
|
|
||||||
CONFIGURE_ARGS+= --debug
|
|
||||||
.endif
|
|
||||||
MAN1= bash.1 bashbug.1
|
|
||||||
INFO= bash
|
|
||||||
|
|
||||||
post-patch:
|
|
||||||
@${REINPLACE_CMD} -e "s,.FN /bin/bash,.FN ${PREFIX}/bin/bash," \
|
|
||||||
${WRKDIR}/${PORTNAME}-${PORTVERSION:R}/doc/bash.1
|
|
||||||
@${RM} -rf ${WRKSRC}/lib/readline/*.[ch] \
|
|
||||||
${WRKSRC}/lib/readline/Makefile
|
|
||||||
@${TOUCH} ${WRKSRC}/lib/readline/Makefile.in
|
|
||||||
@${REINPLACE_CMD} -E "s,^((RL|HIST)_LIBSRC = ).*,\1/usr/include/readline," ${WRKSRC}/Makefile.in
|
|
||||||
|
|
||||||
update-etc-shells:
|
|
||||||
@${ECHO_MSG} "updating /etc/shells"
|
|
||||||
@${CP} /etc/shells /etc/shells.bak
|
|
||||||
@( ${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; \
|
|
||||||
${ECHO_CMD} ${PREFIX}/bin/bash) >/etc/shells
|
|
||||||
@${RM} /etc/shells.bak
|
|
||||||
|
|
||||||
post-install: update-etc-shells
|
|
||||||
${LN} -f ${PREFIX}/bin/bash ${PREFIX}/bin/bash2
|
|
||||||
@${MKDIR} ${EXAMPLESDIR}
|
|
||||||
@cd ${WRKSRC}/examples ; ${PAX} -rw . ${EXAMPLESDIR}
|
|
||||||
@${FIND} ${EXAMPLESDIR} -type d -print | xargs chmod a+rx
|
|
||||||
@${CHMOD} -R a+r ${EXAMPLESDIR}
|
|
||||||
.if !defined(NOPORTDOCS)
|
|
||||||
${MKDIR} ${DOCSDIR}
|
|
||||||
${INSTALL_MAN} \
|
|
||||||
${WRKDIR}/doc/article.ps \
|
|
||||||
${WRKDIR}/doc/bashref.ps \
|
|
||||||
${DOCSDIR}
|
|
||||||
${INSTALL_MAN} \
|
|
||||||
${WRKDIR}/doc/article.txt \
|
|
||||||
${DOCSDIR}
|
|
||||||
${BZIP2_CMD} -f ${DOCSDIR}/*.ps
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
|
||||||
|
|
||||||
CONFIGURE_TARGET:= --build=${CONFIGURE_TARGET}
|
|
|
@ -1,27 +0,0 @@
|
||||||
MD5 (bash-2.05b.tar.gz) = 5238251b4926d778dfe162f6ce729733
|
|
||||||
SHA256 (bash-2.05b.tar.gz) = ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4
|
|
||||||
SIZE (bash-2.05b.tar.gz) = 1956216
|
|
||||||
MD5 (bash-doc-2.05b.tar.gz) = 511b2d07f0f401f686e8edc551a8e47f
|
|
||||||
SHA256 (bash-doc-2.05b.tar.gz) = a1a359688802da68d9a5b14e6d2bf2cfc9457f1afbed7b75a874565bf920355d
|
|
||||||
SIZE (bash-doc-2.05b.tar.gz) = 1733577
|
|
||||||
MD5 (bash205b-001) = 94e520fa0272b06fb03fc46042095b62
|
|
||||||
SHA256 (bash205b-001) = bf7a055e0916b7899e7429e36e35d009db445b942b34520a601ea5a8fa634fdd
|
|
||||||
SIZE (bash205b-001) = 1132
|
|
||||||
MD5 (bash205b-002) = 2957bbe5f6db1830d649d1071baba63c
|
|
||||||
SHA256 (bash205b-002) = affdd1808a6262fbfe291ebffa2133b05e4bb46067a90e3329d5741e10f0587b
|
|
||||||
SIZE (bash205b-002) = 755
|
|
||||||
MD5 (bash205b-003) = 2828e78563927b806246e2b4806ee0f5
|
|
||||||
SHA256 (bash205b-003) = 604972eaafe69f44413d429e0a826b0eae209ca74b14eeeccdf0d502bbabb340
|
|
||||||
SIZE (bash205b-003) = 2356
|
|
||||||
MD5 (bash205b-004) = 6bf89831209ba6d208943d2ebaa7fe3a
|
|
||||||
SHA256 (bash205b-004) = fab91e9742ca4e990666441e91821742e6dff78e8e388ba55205cf7b1cd8e8e1
|
|
||||||
SIZE (bash205b-004) = 1110
|
|
||||||
MD5 (bash205b-005) = 311b7f0e3dabec51767bfabe6afd4ded
|
|
||||||
SHA256 (bash205b-005) = de80bbb3b7686c96c1d99354989c0dacfe4ae2cf082cdf7e9dc3c1c6910cce9a
|
|
||||||
SIZE (bash205b-005) = 2217
|
|
||||||
MD5 (bash205b-006) = f8a86d0a66b51080f3fbc5cc34ef1a06
|
|
||||||
SHA256 (bash205b-006) = 92fd6b3313d90194bb7e8868436554866517901da801b5a0c838efc620ea0396
|
|
||||||
SIZE (bash205b-006) = 3155
|
|
||||||
MD5 (bash205b-007) = 37d2acecc9146883f9b331c03b274f21
|
|
||||||
SHA256 (bash205b-007) = 0843c481bd13f4652e0ba722ea3786570b84440869e0944a3a2e1d0d4430500d
|
|
||||||
SIZE (bash205b-007) = 1072
|
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- configure.orig Tue Jul 16 22:31:47 2002
|
|
||||||
+++ configure Wed Jul 24 23:54:26 2002
|
|
||||||
@@ -1132,7 +1132,7 @@
|
|
||||||
mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
|
|
||||||
m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
|
|
||||||
sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
|
|
||||||
-#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
|
|
||||||
+*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
|
|
||||||
*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
|
|
||||||
*-aix*) opt_bash_malloc=no ;; # AIX machines
|
|
||||||
*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
|
|
||||||
@@ -15218,7 +15218,14 @@
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
if test -d /dev/fd && test -r /dev/fd/0; then
|
|
||||||
- bash_cv_dev_fd=standard
|
|
||||||
+ # FreeBSD's devfs only provides /dev/fd/[0-2]
|
|
||||||
+ exec 3<&0
|
|
||||||
+ if test -r /dev/fd/3; then
|
|
||||||
+ bash_cv_dev_fd=standard
|
|
||||||
+ else
|
|
||||||
+ bash_cv_dev_fd=absent
|
|
||||||
+ fi
|
|
||||||
+ exec 3<&-
|
|
||||||
elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
|
|
||||||
bash_cv_dev_fd=whacky
|
|
||||||
else
|
|
|
@ -1,14 +0,0 @@
|
||||||
--- error.c.old Wed May 24 12:04:50 2000
|
|
||||||
+++ error.c Wed May 24 12:05:21 2000
|
|
||||||
@@ -465,9 +465,9 @@
|
|
||||||
terminal. */
|
|
||||||
void
|
|
||||||
#if defined (PREFER_STDARG)
|
|
||||||
-trace (const char *format, ...)
|
|
||||||
+bash_trace (const char *format, ...)
|
|
||||||
#else
|
|
||||||
-trace (format, va_alist)
|
|
||||||
+bash_trace (format, va_alist)
|
|
||||||
const char *format;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
|
@ -1,118 +0,0 @@
|
||||||
--- bashline.c.deo Tue May 7 12:52:42 2002
|
|
||||||
+++ bashline.c Sun Sep 8 18:17:30 2002
|
|
||||||
@@ -1873,10 +1874,6 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Define NO_FORCE_FIGNORE if you want to match filenames that would
|
|
||||||
- otherwise be ignored if they are the only possible matches. */
|
|
||||||
-/* #define NO_FORCE_FIGNORE */
|
|
||||||
-
|
|
||||||
/* If FIGNORE is set, then don't match files with the given suffixes when
|
|
||||||
completing filenames. If only one of the possibilities has an acceptable
|
|
||||||
suffix, delete the others, else just return and let the completer
|
|
||||||
@@ -1901,10 +1898,15 @@
|
|
||||||
{
|
|
||||||
char **newnames;
|
|
||||||
int idx, nidx;
|
|
||||||
-#ifdef NO_FORCE_FIGNORE
|
|
||||||
char **oldnames;
|
|
||||||
int oidx;
|
|
||||||
-#endif
|
|
||||||
+ char *no_force_fignore;
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/* Set NO_FORCE_FIGNORE if you want to match filenames that would
|
|
||||||
+ otherwise be ignored if they are the only possible matches. */
|
|
||||||
+ no_force_fignore = get_string_value ("NO_FORCE_FIGNORE");
|
|
||||||
+//fprintf(stderr, ">NO_FORCE_FIGNORE< is [%s]\n", no_force_fignore);
|
|
||||||
|
|
||||||
/* If there is only one completion, see if it is acceptable. If it is
|
|
||||||
not, free it up. In any case, short-circuit and return. This is a
|
|
||||||
@@ -1912,13 +1914,12 @@
|
|
||||||
if there is only one completion; it is the completion itself. */
|
|
||||||
if (names[1] == (char *)0)
|
|
||||||
{
|
|
||||||
-#ifndef NO_FORCE_FIGNORE
|
|
||||||
- if ((*name_func) (names[0]) == 0)
|
|
||||||
- {
|
|
||||||
- free (names[0]);
|
|
||||||
- names[0] = (char *)NULL;
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
+ if (!no_force_fignore)
|
|
||||||
+ if ((*name_func) (names[0]) == 0)
|
|
||||||
+ {
|
|
||||||
+ free (names[0]);
|
|
||||||
+ names[0] = (char *)NULL;
|
|
||||||
+ }
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1927,10 +1928,11 @@
|
|
||||||
for (nidx = 1; names[nidx]; nidx++)
|
|
||||||
;
|
|
||||||
newnames = strvec_create (nidx + 1);
|
|
||||||
-#ifdef NO_FORCE_FIGNORE
|
|
||||||
- oldnames = strvec_create (nidx - 1);
|
|
||||||
- oidx = 0;
|
|
||||||
-#endif
|
|
||||||
+ if (no_force_fignore)
|
|
||||||
+ {
|
|
||||||
+ oldnames = strvec_create (nidx - 1);
|
|
||||||
+ oidx = 0;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
newnames[0] = names[0];
|
|
||||||
for (idx = nidx = 1; names[idx]; idx++)
|
|
||||||
@@ -1938,11 +1940,10 @@
|
|
||||||
if ((*name_func) (names[idx]))
|
|
||||||
newnames[nidx++] = names[idx];
|
|
||||||
else
|
|
||||||
-#ifndef NO_FORCE_FIGNORE
|
|
||||||
- free (names[idx]);
|
|
||||||
-#else
|
|
||||||
- oldnames[oidx++] = names[idx];
|
|
||||||
-#endif
|
|
||||||
+ if (no_force_fignore)
|
|
||||||
+ oldnames[oidx++] = names[idx];
|
|
||||||
+ else
|
|
||||||
+ free (names[idx]);
|
|
||||||
}
|
|
||||||
|
|
||||||
newnames[nidx] = (char *)NULL;
|
|
||||||
@@ -1950,21 +1951,23 @@
|
|
||||||
/* If none are acceptable then let the completer handle it. */
|
|
||||||
if (nidx == 1)
|
|
||||||
{
|
|
||||||
-#ifndef NO_FORCE_FIGNORE
|
|
||||||
- free (names[0]);
|
|
||||||
- names[0] = (char *)NULL;
|
|
||||||
-#else
|
|
||||||
- free (oldnames);
|
|
||||||
-#endif
|
|
||||||
+ if (no_force_fignore)
|
|
||||||
+ free (oldnames);
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ free (names[0]);
|
|
||||||
+ names[0] = (char *)NULL;
|
|
||||||
+ }
|
|
||||||
free (newnames);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef NO_FORCE_FIGNORE
|
|
||||||
- while (oidx)
|
|
||||||
- free (oldnames[--oidx]);
|
|
||||||
- free (oldnames);
|
|
||||||
-#endif
|
|
||||||
+ if (no_force_fignore)
|
|
||||||
+ {
|
|
||||||
+ while (oidx)
|
|
||||||
+ free (oldnames[--oidx]);
|
|
||||||
+ free (oldnames);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* If only one is acceptable, copy it to names[0] and return. */
|
|
||||||
if (nidx == 2)
|
|
|
@ -1,22 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- builtins/shopt.def.orig Tue Sep 11 21:55:06 2001
|
|
||||||
+++ builtins/shopt.def Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -56,7 +56,7 @@
|
|
||||||
|
|
||||||
#define OPTFMT "%-15s\t%s\n"
|
|
||||||
|
|
||||||
-extern int allow_null_glob_expansion, glob_dot_filenames;
|
|
||||||
+extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames;
|
|
||||||
extern int cdable_vars, mail_warning, source_uses_path;
|
|
||||||
extern int no_exit_on_failed_exec, print_shift_error;
|
|
||||||
extern int check_hashed_filenames, promptvars, interactive_comments;
|
|
||||||
@@ -140,6 +140,7 @@
|
|
||||||
#endif
|
|
||||||
{ "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL },
|
|
||||||
{ "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL },
|
|
||||||
+ { "failglob", &fail_glob_expansion, (Function *)NULL },
|
|
||||||
#if defined (PROGRAMMABLE_COMPLETION)
|
|
||||||
{ "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL },
|
|
||||||
#endif
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- support/config.guess.orig Wed Apr 3 16:47:14 2002
|
|
||||||
+++ support/config.guess Fri May 16 19:42:58 2003
|
|
||||||
@@ -782,4 +782,7 @@
|
|
||||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
|
||||||
exit 0 ;;
|
|
||||||
+ amd64:FreeBSD:*:*)
|
|
||||||
+ echo x86_64-unknown-freebsd
|
|
||||||
+ exit 0 ;;
|
|
||||||
*:FreeBSD:*:*)
|
|
||||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
|
|
@ -1,15 +0,0 @@
|
||||||
--- support/config.sub.orig Wed Apr 3 16:47:14 2002
|
|
||||||
+++ support/config.sub Fri May 16 19:42:58 2003
|
|
||||||
@@ -268,5 +268,5 @@
|
|
||||||
# because (1) that's what they normally are, and
|
|
||||||
# (2) the word "unknown" tends to confuse beginning users.
|
|
||||||
- i*86 | x86_64)
|
|
||||||
+ i*86 | x86_64 | amd64)
|
|
||||||
basic_machine=$basic_machine-pc
|
|
||||||
;;
|
|
||||||
@@ -282,4 +282,5 @@
|
|
||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
|
||||||
+ | amd64-* \
|
|
||||||
| arm-* | armbe-* | armle-* | armv*-* \
|
|
||||||
| avr-* \
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- doc/bash.1.orig Tue Nov 13 18:55:59 2001
|
|
||||||
+++ doc/bash.1 Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -2473,6 +2473,10 @@
|
|
||||||
.B nullglob
|
|
||||||
option is set, and no matches are found,
|
|
||||||
the word is removed.
|
|
||||||
+If the
|
|
||||||
+.B failglob
|
|
||||||
+option is set, and no matches are found, an error message is printed
|
|
||||||
+and the command is not executed.
|
|
||||||
If the shell option
|
|
||||||
.B nocaseglob
|
|
||||||
is enabled, the match is performed without regard to the case
|
|
|
@ -1,37 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- doc/bashref.texi.orig Tue Nov 13 18:55:03 2001
|
|
||||||
+++ doc/bashref.texi Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -1700,7 +1700,8 @@
|
|
||||||
and replaced with an alphabetically sorted list of
|
|
||||||
file names matching the pattern. If no matching file names are found,
|
|
||||||
and the shell option @code{nullglob} is disabled, the word is left
|
|
||||||
-unchanged.
|
|
||||||
+unchanged. If the @code{failglob} option is set, an error message is
|
|
||||||
+printed and the commandline is not executed.
|
|
||||||
If the @code{nullglob} option is set, and no matches are found, the word
|
|
||||||
is removed.
|
|
||||||
If the shell option @code{nocaseglob} is enabled, the match is performed
|
|
||||||
@@ -1713,8 +1714,8 @@
|
|
||||||
matched explicitly.
|
|
||||||
In other cases, the @samp{.} character is not treated specially.
|
|
||||||
|
|
||||||
-See the description of @code{shopt} in @ref{Bash Builtins},
|
|
||||||
-for a description of the @code{nocaseglob}, @code{nullglob},
|
|
||||||
+See the description of @code{shopt} in @ref{Bash Builtins}, for a
|
|
||||||
+description of the @code{nocaseglob}, @code{nullglob}, @code{failglob}
|
|
||||||
and @code{dotglob} options.
|
|
||||||
|
|
||||||
The @env{GLOBIGNORE}
|
|
||||||
@@ -3372,6 +3373,10 @@
|
|
||||||
@item extglob
|
|
||||||
If set, the extended pattern matching features described above
|
|
||||||
(@pxref{Pattern Matching}) are enabled.
|
|
||||||
+
|
|
||||||
+@item failglob
|
|
||||||
+If set, filenames that have globbing characters in them, but don't match
|
|
||||||
+anything, will cause an error.
|
|
||||||
|
|
||||||
@item histappend
|
|
||||||
If set, the history list is appended to the file named by the value
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- redir.c.orig Tue Mar 12 12:27:38 2002
|
|
||||||
+++ redir.c Thu May 5 07:41:18 2005
|
|
||||||
@@ -263,7 +263,7 @@ write_here_string (fd, redirectee)
|
|
||||||
int herelen, n, e;
|
|
||||||
|
|
||||||
herestr = expand_string_to_string (redirectee->word, 0);
|
|
||||||
- herelen = strlen (herestr);
|
|
||||||
+ herelen = (herestr == NULL) ? 0 : strlen (herestr);
|
|
||||||
|
|
||||||
n = write (fd, herestr, herelen);
|
|
||||||
if (n == herelen)
|
|
|
@ -1,27 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- subst.c.orig Mon Nov 5 20:19:49 2001
|
|
||||||
+++ subst.c Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -121,6 +121,9 @@
|
|
||||||
a null file. */
|
|
||||||
int allow_null_glob_expansion;
|
|
||||||
|
|
||||||
+/* Non-zero means to signal an error when globbing fails to match. */
|
|
||||||
+int fail_glob_expansion;
|
|
||||||
+
|
|
||||||
#if 0
|
|
||||||
/* Variables to keep track of which words in an expanded word list (the
|
|
||||||
output of expand_word_list_internal) are the result of globbing
|
|
||||||
@@ -6132,6 +6135,11 @@
|
|
||||||
{
|
|
||||||
output_list = (WORD_LIST *)list_append (glob_list, output_list);
|
|
||||||
PREPEND_LIST (tlist, disposables);
|
|
||||||
+ }
|
|
||||||
+ else if (fail_glob_expansion != 0)
|
|
||||||
+ {
|
|
||||||
+ report_error ("no match: %s", tlist->word->word);
|
|
||||||
+ jump_to_top_level (DISCARD);
|
|
||||||
}
|
|
||||||
else if (allow_null_glob_expansion == 0)
|
|
||||||
{
|
|
|
@ -1,14 +0,0 @@
|
||||||
--- lib/readline/terminal.c.orig Tue Mar 5 02:23:09 2002
|
|
||||||
+++ lib/readline/terminal.c Wed Jul 24 05:57:59 2002
|
|
||||||
@@ -313,7 +313,11 @@
|
|
||||||
{ "ei", &_rl_term_ei },
|
|
||||||
{ "ic", &_rl_term_ic },
|
|
||||||
{ "im", &_rl_term_im },
|
|
||||||
+#ifdef __FreeBSD__
|
|
||||||
+ { "@7", &_rl_term_kH }, /* home down ?? */
|
|
||||||
+#else
|
|
||||||
{ "kH", &_rl_term_kH }, /* home down ?? */
|
|
||||||
+#endif
|
|
||||||
{ "kI", &_rl_term_kI }, /* insert */
|
|
||||||
{ "kd", &_rl_term_kd },
|
|
||||||
{ "ke", &_rl_term_ke }, /* end keypad mode */
|
|
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- tests/shopt.right.orig Wed May 9 19:40:39 2001
|
|
||||||
+++ tests/shopt.right Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
shopt -u no_empty_cmd_completion
|
|
||||||
shopt -u nocaseglob
|
|
||||||
shopt -u nullglob
|
|
||||||
+shopt -u failglob
|
|
||||||
shopt -s progcomp
|
|
||||||
shopt -s promptvars
|
|
||||||
shopt -u restricted_shell
|
|
||||||
@@ -58,6 +59,7 @@
|
|
||||||
shopt -u no_empty_cmd_completion
|
|
||||||
shopt -u nocaseglob
|
|
||||||
shopt -u nullglob
|
|
||||||
+shopt -u failglob
|
|
||||||
shopt -u restricted_shell
|
|
||||||
shopt -u shift_verbose
|
|
||||||
shopt -u xpg_echo
|
|
||||||
@@ -78,6 +80,7 @@
|
|
||||||
no_empty_cmd_completion off
|
|
||||||
nocaseglob off
|
|
||||||
nullglob off
|
|
||||||
+failglob off
|
|
||||||
restricted_shell off
|
|
||||||
shift_verbose off
|
|
||||||
xpg_echo off
|
|
||||||
@@ -205,3 +208,5 @@
|
|
||||||
--
|
|
||||||
./shopt.tests: shopt: xyz1: unknown shell option name
|
|
||||||
./shopt.tests: shopt: xyz1: unknown option name
|
|
||||||
+tmp/l1 tmp/l2 tmp/*4 tmp/l3
|
|
||||||
+./shopt.tests: no match: tmp/*4
|
|
|
@ -1,25 +0,0 @@
|
||||||
|
|
||||||
$FreeBSD$
|
|
||||||
|
|
||||||
--- tests/shopt.tests.orig Tue Sep 21 17:49:32 1999
|
|
||||||
+++ tests/shopt.tests Tue Nov 20 23:52:45 2001
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
shopt -u mailwarn
|
|
||||||
shopt -u nocaseglob
|
|
||||||
shopt -u nullglob
|
|
||||||
+shopt -u failglob
|
|
||||||
shopt -s promptvars
|
|
||||||
shopt -u shift_verbose
|
|
||||||
shopt -s sourcepath
|
|
||||||
@@ -92,3 +93,11 @@
|
|
||||||
builtin printf -- "--\n"
|
|
||||||
shopt -p xyz1
|
|
||||||
shopt -o -p xyz1
|
|
||||||
+
|
|
||||||
+mkdir tmp
|
|
||||||
+touch tmp/l1 tmp/l2 tmp/l3
|
|
||||||
+builtin echo tmp/l[12] tmp/*4 tmp/*3
|
|
||||||
+shopt -s failglob
|
|
||||||
+builtin echo tmp/l[12] tmp/*4 tmp/*3
|
|
||||||
+rm -r tmp
|
|
||||||
+shopt -u failglob
|
|
|
@ -1,19 +0,0 @@
|
||||||
Bash is the GNU Project's Bourne Again SHell
|
|
||||||
An interactive shell with Bourne shell syntax (/bin/sh);
|
|
||||||
It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and
|
|
||||||
Tools standard. It includes the following features:
|
|
||||||
interactive command line editing, job control on architectures that support it,
|
|
||||||
Korn shell (ksh) features, Csh-like history features and brace expansion,
|
|
||||||
history and command re-entry, job control, shell functions and aliases,
|
|
||||||
arrays, arithmetic, ANSI-C quoting, tilde expansion, brace expansion,
|
|
||||||
substring capabilities, indirect variable expansion, expanded i/o capabilities,
|
|
||||||
control of builtin commands, help, shell optional behavior, prompt
|
|
||||||
customization, security, directory stack, POSIX mode, internationalization,
|
|
||||||
and command timing.
|
|
||||||
|
|
||||||
For more information on the features of Bash that are new to this type
|
|
||||||
of shell, see the file `documentation/features.texi'.
|
|
||||||
There is also a processed DVI file there, as well as a large man page.
|
|
||||||
|
|
||||||
WWW: http://www.gnu.org/software/bash/
|
|
||||||
http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
|
|
|
@ -1,212 +0,0 @@
|
||||||
@comment $FreeBSD$
|
|
||||||
bin/bash
|
|
||||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
|
||||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
|
||||||
bin/bash2
|
|
||||||
bin/bashbug
|
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/article.ps.bz2
|
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/bashref.ps.bz2
|
|
||||||
%%PORTDOCS%%%%DOCSDIR%%/article.txt
|
|
||||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
|
||||||
%%EXAMPLESDIR%%/bashdb/PERMISSION
|
|
||||||
%%EXAMPLESDIR%%/bashdb/bashdb
|
|
||||||
%%EXAMPLESDIR%%/bashdb/bashdb.el
|
|
||||||
%%EXAMPLESDIR%%/complete/complete-examples
|
|
||||||
%%EXAMPLESDIR%%/complete/complete.ianmac
|
|
||||||
%%EXAMPLESDIR%%/complete/complete2.ianmac
|
|
||||||
%%EXAMPLESDIR%%/complete/complete.freebsd
|
|
||||||
%%EXAMPLESDIR%%/complete/complete.gnu-longopt
|
|
||||||
%%EXAMPLESDIR%%/functions/array-stuff
|
|
||||||
%%EXAMPLESDIR%%/functions/array-to-string
|
|
||||||
%%EXAMPLESDIR%%/functions/autoload
|
|
||||||
%%EXAMPLESDIR%%/functions/autoload.v2
|
|
||||||
%%EXAMPLESDIR%%/functions/autoload.v3
|
|
||||||
%%EXAMPLESDIR%%/functions/basename
|
|
||||||
%%EXAMPLESDIR%%/functions/basename2
|
|
||||||
%%EXAMPLESDIR%%/functions/coproc.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/coshell.README
|
|
||||||
%%EXAMPLESDIR%%/functions/coshell.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/csh-compat
|
|
||||||
%%EXAMPLESDIR%%/functions/dirfuncs
|
|
||||||
%%EXAMPLESDIR%%/functions/dirname
|
|
||||||
%%EXAMPLESDIR%%/functions/emptydir
|
|
||||||
%%EXAMPLESDIR%%/functions/exitstat
|
|
||||||
%%EXAMPLESDIR%%/functions/external
|
|
||||||
%%EXAMPLESDIR%%/functions/fact
|
|
||||||
%%EXAMPLESDIR%%/functions/fstty
|
|
||||||
%%EXAMPLESDIR%%/functions/func
|
|
||||||
%%EXAMPLESDIR%%/functions/gethtml
|
|
||||||
%%EXAMPLESDIR%%/functions/getoptx.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/inetaddr
|
|
||||||
%%EXAMPLESDIR%%/functions/inpath
|
|
||||||
%%EXAMPLESDIR%%/functions/isnum.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/isnum2
|
|
||||||
%%EXAMPLESDIR%%/functions/isvalidip
|
|
||||||
%%EXAMPLESDIR%%/functions/jdate.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/jj.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/keep
|
|
||||||
%%EXAMPLESDIR%%/functions/ksh-cd
|
|
||||||
%%EXAMPLESDIR%%/functions/ksh-compat-test
|
|
||||||
%%EXAMPLESDIR%%/functions/kshenv
|
|
||||||
%%EXAMPLESDIR%%/functions/login
|
|
||||||
%%EXAMPLESDIR%%/functions/lowercase
|
|
||||||
%%EXAMPLESDIR%%/functions/manpage
|
|
||||||
%%EXAMPLESDIR%%/functions/mhfold
|
|
||||||
%%EXAMPLESDIR%%/functions/notify.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/pathfuncs
|
|
||||||
%%EXAMPLESDIR%%/functions/recurse
|
|
||||||
%%EXAMPLESDIR%%/functions/repeat2
|
|
||||||
%%EXAMPLESDIR%%/functions/repeat3
|
|
||||||
%%EXAMPLESDIR%%/functions/seq
|
|
||||||
%%EXAMPLESDIR%%/functions/seq2
|
|
||||||
%%EXAMPLESDIR%%/functions/shcat
|
|
||||||
%%EXAMPLESDIR%%/functions/shcat2
|
|
||||||
%%EXAMPLESDIR%%/functions/sort-pos-params
|
|
||||||
%%EXAMPLESDIR%%/functions/substr
|
|
||||||
%%EXAMPLESDIR%%/functions/substr2
|
|
||||||
%%EXAMPLESDIR%%/functions/term
|
|
||||||
%%EXAMPLESDIR%%/functions/whatis
|
|
||||||
%%EXAMPLESDIR%%/functions/whence
|
|
||||||
%%EXAMPLESDIR%%/functions/which
|
|
||||||
%%EXAMPLESDIR%%/functions/xalias.bash
|
|
||||||
%%EXAMPLESDIR%%/functions/xfind.bash
|
|
||||||
%%EXAMPLESDIR%%/loadables/perl/Makefile
|
|
||||||
%%EXAMPLESDIR%%/loadables/perl/Makefile.in
|
|
||||||
%%EXAMPLESDIR%%/loadables/perl/README
|
|
||||||
%%EXAMPLESDIR%%/loadables/perl/bperl.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/perl/iperl.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/README
|
|
||||||
%%EXAMPLESDIR%%/loadables/template.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/Makefile
|
|
||||||
%%EXAMPLESDIR%%/loadables/Makefile.in
|
|
||||||
%%EXAMPLESDIR%%/loadables/necho.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/hello.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/print.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/realpath.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/sleep.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/truefalse.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/getconf.h
|
|
||||||
%%EXAMPLESDIR%%/loadables/getconf.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/finfo.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/cat.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/cut.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/logname.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/basename.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/dirname.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/tty.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/pathchk.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/tee.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/rmdir.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/head.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/printenv.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/push.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/id.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/whoami.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/uname.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/sync.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/mkdir.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/ln.c
|
|
||||||
%%EXAMPLESDIR%%/loadables/unlink.c
|
|
||||||
%%EXAMPLESDIR%%/misc/suncmd.termcap
|
|
||||||
%%EXAMPLESDIR%%/misc/aliasconv.sh
|
|
||||||
%%EXAMPLESDIR%%/misc/aliasconv.bash
|
|
||||||
%%EXAMPLESDIR%%/misc/cshtobash
|
|
||||||
%%EXAMPLESDIR%%/scripts/adventure.sh
|
|
||||||
%%EXAMPLESDIR%%/scripts/bcsh.sh
|
|
||||||
%%EXAMPLESDIR%%/scripts/cat.sh
|
|
||||||
%%EXAMPLESDIR%%/scripts/center
|
|
||||||
%%EXAMPLESDIR%%/scripts/dd-ex.sh
|
|
||||||
%%EXAMPLESDIR%%/scripts/fixfiles.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/hanoi.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/inpath
|
|
||||||
%%EXAMPLESDIR%%/scripts/krand.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/line-input.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/nohup.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/precedence
|
|
||||||
%%EXAMPLESDIR%%/scripts/randomcard.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/scrollbar
|
|
||||||
%%EXAMPLESDIR%%/scripts/scrollbar2
|
|
||||||
%%EXAMPLESDIR%%/scripts/self-repro
|
|
||||||
%%EXAMPLESDIR%%/scripts/showperm.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/shprompt
|
|
||||||
%%EXAMPLESDIR%%/scripts/spin.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts/timeout
|
|
||||||
%%EXAMPLESDIR%%/scripts/vtree2
|
|
||||||
%%EXAMPLESDIR%%/scripts/vtree3
|
|
||||||
%%EXAMPLESDIR%%/scripts/vtree3a
|
|
||||||
%%EXAMPLESDIR%%/scripts/websrv.sh
|
|
||||||
%%EXAMPLESDIR%%/scripts/xterm_title
|
|
||||||
%%EXAMPLESDIR%%/scripts/zprintf
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/PERMISSION
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/README
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/arc2tarz
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/bashrand
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/cal2day.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/cdhist.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/corename
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/fman
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/frcp
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/lowercase
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/ncp
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/newext
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/nmv
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/pages
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/pf
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/ren
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/rename
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/repeat
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/untar
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/uudec
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/uuenc
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/vtree
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/where
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/pmtop
|
|
||||||
%%EXAMPLESDIR%%/scripts.v2/shprof
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/PERMISSION
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/README
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/aref.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/bash.sub.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/bash_version.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/meta.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/mktmp.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/number.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/prompt.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/remap_keys.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/require.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/send_mail.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/shcat.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/source.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/string.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/stty.bash
|
|
||||||
%%EXAMPLESDIR%%/scripts.noah/y_or_n_p.bash
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/README
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/aliases
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/bash.defaults
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/environment
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/login
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/logout
|
|
||||||
%%EXAMPLESDIR%%/startup-files/apple/rc
|
|
||||||
%%EXAMPLESDIR%%/startup-files/README
|
|
||||||
%%EXAMPLESDIR%%/startup-files/Bashrc.bfox
|
|
||||||
%%EXAMPLESDIR%%/startup-files/Bash_aliases
|
|
||||||
%%EXAMPLESDIR%%/startup-files/Bash_profile
|
|
||||||
%%EXAMPLESDIR%%/startup-files/bash-profile
|
|
||||||
%%EXAMPLESDIR%%/startup-files/bashrc
|
|
||||||
%%EXAMPLESDIR%%/obashdb/PERMISSION
|
|
||||||
%%EXAMPLESDIR%%/obashdb/README
|
|
||||||
%%EXAMPLESDIR%%/obashdb/bashdb
|
|
||||||
%%EXAMPLESDIR%%/obashdb/bashdb.fns
|
|
||||||
%%EXAMPLESDIR%%/obashdb/bashdb.pre
|
|
||||||
@dirrm %%EXAMPLESDIR%%/bashdb
|
|
||||||
@dirrm %%EXAMPLESDIR%%/complete
|
|
||||||
@dirrm %%EXAMPLESDIR%%/functions
|
|
||||||
@dirrm %%EXAMPLESDIR%%/loadables/perl
|
|
||||||
@dirrm %%EXAMPLESDIR%%/loadables
|
|
||||||
@dirrm %%EXAMPLESDIR%%/misc
|
|
||||||
@dirrm %%EXAMPLESDIR%%/obashdb
|
|
||||||
@dirrm %%EXAMPLESDIR%%/scripts
|
|
||||||
@dirrm %%EXAMPLESDIR%%/scripts.noah
|
|
||||||
@dirrm %%EXAMPLESDIR%%/scripts.v2
|
|
||||||
@dirrm %%EXAMPLESDIR%%/startup-files/apple
|
|
||||||
@dirrm %%EXAMPLESDIR%%/startup-files
|
|
||||||
@dirrm %%EXAMPLESDIR%%
|
|
|
@ -727,7 +727,6 @@
|
||||||
SUBDIR += xlogmaster
|
SUBDIR += xlogmaster
|
||||||
SUBDIR += xmbmon
|
SUBDIR += xmbmon
|
||||||
SUBDIR += xosview
|
SUBDIR += xosview
|
||||||
SUBDIR += xperfmon
|
|
||||||
SUBDIR += xsi
|
SUBDIR += xsi
|
||||||
SUBDIR += xstow
|
SUBDIR += xstow
|
||||||
SUBDIR += xsu
|
SUBDIR += xsu
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
# New ports collection makefile for: xperfmon++
|
|
||||||
# Date created: 14 March 97
|
|
||||||
# Whom: Lars Koeller <Lars.Koeller@Uni-Bielefeld.DE>
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= xperfmon++
|
|
||||||
PORTVERSION= 2.0
|
|
||||||
PORTREVISION= 1
|
|
||||||
CATEGORIES= sysutils
|
|
||||||
MASTER_SITES= http://wwwhomes.uni-bielefeld.de/lkoeller/
|
|
||||||
|
|
||||||
DISTNAME= xperfmon++v1.1
|
|
||||||
EXTRACT_SUFX= .tar.Z
|
|
||||||
|
|
||||||
MAINTAINER= ports@freebsd.org
|
|
||||||
COMMENT= A graphical X11 system performance monitor
|
|
||||||
|
|
||||||
USE_IMAKE= yes
|
|
||||||
MAN1= xperfmon++.1
|
|
||||||
WRKSRC= ${WRKDIR}/xperfmon++
|
|
||||||
|
|
||||||
DEPRECATED= irrelevant for supported FreeBSD releases
|
|
||||||
EXPIRATION_DATE= 2007-05-19
|
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
|
||||||
|
|
||||||
.if ${OSVERSION} >= 500000
|
|
||||||
IGNORE= 5.X or newer systems should use xperfmon3
|
|
||||||
.endif
|
|
||||||
|
|
||||||
pre-configure:
|
|
||||||
if [ -e /usr/lib/libdevstat.a -o -e /usr/lib/aout/libdevstat.a ]; then \
|
|
||||||
cd ${WRKSRC} ; \
|
|
||||||
${MV} Imakefile Imakefile.in ; \
|
|
||||||
${SED} -e "s:EXTRA_DEFINES=:EXTRA_DEFINES= -DHAVE_DEVSTAT:" Imakefile.in > Imakefile.i1 ; \
|
|
||||||
${SED} -e "s:FreeBSDFLAGS=:FreeBSDFLAGS= -ldevstat:" Imakefile.i1 > Imakefile ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
.include <bsd.port.post.mk>
|
|
|
@ -1,3 +0,0 @@
|
||||||
MD5 (xperfmon++v1.1.tar.Z) = 37ec5dccd61eae0fd9d6ae91119f7e64
|
|
||||||
SHA256 (xperfmon++v1.1.tar.Z) = c18c15c7fdcc79d0d38af8d0b6c26f5c6cdd1cfdb16c5bcb1ab7120e48e9bb0b
|
|
||||||
SIZE (xperfmon++v1.1.tar.Z) = 87251
|
|
|
@ -1,891 +0,0 @@
|
||||||
/*
|
|
||||||
* Perfmon Performance Monitor
|
|
||||||
*
|
|
||||||
* Copyright 1985, Massachusetts Institute of Technology
|
|
||||||
* Copyright 1989, PCS Computer Systeme GmbH, West Germany
|
|
||||||
* Copyright 1994, Sterling Software @ NASA-Ames Research Center
|
|
||||||
* Copyright 1995, Regents of the University of California,
|
|
||||||
* Lars Köller <Lars.Koeller@Uni-Bielefeld.DE>
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of PCS and Sterling Software not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without specific,
|
|
||||||
* written prior permission. PCS and Sterling Software makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*
|
|
||||||
* PCS & STERLING SOFTWARE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS & STERLING SOFTWARE
|
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
||||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* Original Author: Emanuel Jay Berkenbilt, MIT Project Athena
|
|
||||||
* Author: Thomas A. Baghli, PCS Computer Systeme GmbH, West Germany
|
|
||||||
* tom@meepmeep.pcs.com
|
|
||||||
* 1994 Revision
|
|
||||||
* Author: Roger Smith, Sterling Software @ NASA-Ames Research Center
|
|
||||||
* Moffett Field, California, rsmith@proteus.arc.nasa.gov
|
|
||||||
* 1995, ... FreeBSD 2.x, 3.x Version
|
|
||||||
* Author: Lars Köller, Univerity of Bielefeld, Germany
|
|
||||||
* Lars.Koeller@Uni-Bielefeld.DE
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This file contains only system functions - that is the functions that
|
|
||||||
* get the information the performance monitor is monitoring. No calls
|
|
||||||
* to any X routines should be made here. The reason for doing this is
|
|
||||||
* so that as the X toolkit becomes available and the X window system
|
|
||||||
* improves no changes will have to be made to this file, and as this
|
|
||||||
* program is made available for a new type of machine, only this file
|
|
||||||
* will need to be changed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
|
||||||
#include <sys/param.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined(BSD) && (BSD >= 199506))
|
|
||||||
# include <osreldate.h>
|
|
||||||
#else
|
|
||||||
# error You have to use at least a FreeBSD 2.2.X system
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/IntrinsicP.h>
|
|
||||||
|
|
||||||
#include "system.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <strings.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <paths.h>
|
|
||||||
#include <kvm.h>
|
|
||||||
#include <nlist.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <err.h>
|
|
||||||
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#include <sys/dkstat.h>
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
#include <devstat.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/buf.h>
|
|
||||||
#include <sys/vmmeter.h>
|
|
||||||
#include <vm/vm.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <net/if.h>
|
|
||||||
#if __FreeBSD_version >= 300000
|
|
||||||
#include <net/if_var.h>
|
|
||||||
#endif
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/conf.h>
|
|
||||||
#if __FreeBSD_version < 400000
|
|
||||||
#include <sys/rlist.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/mount.h>
|
|
||||||
#include <nfs/rpcv2.h>
|
|
||||||
#include <nfs/nfsv2.h>
|
|
||||||
#include <nfs/nfs.h>
|
|
||||||
|
|
||||||
#ifndef CTL_FS
|
|
||||||
#define CTL_FS CTL_VFS /* compatibility w/ Lite1 */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* It's a mess with all these version numbers:
|
|
||||||
*
|
|
||||||
* 2.0-RELEASE: 199411
|
|
||||||
* 2.1-current's: 199501, 199503
|
|
||||||
* 2.0.5-RELEASE: 199504
|
|
||||||
* 2.2-current before 2.1: 199508
|
|
||||||
* 2.1.0-RELEASE: 199511
|
|
||||||
* 2.2-current before 2.1.5: 199512
|
|
||||||
* 2.1.5-RELEASE: 199607
|
|
||||||
* 2.2-current before 2.1.6: 199608
|
|
||||||
* 2.1.6-RELEASE: 199612
|
|
||||||
* 2.1.7-RELEASE: 199612
|
|
||||||
* 2.2-RELEASE: 220000 (ahhhhh)
|
|
||||||
* 3.0-current as of Feb 1997: 300000 (ohhhhh)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* FreeBSD version 2.2 and greater have NFSv3
|
|
||||||
*/
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
# define HAS_NFS_V3
|
|
||||||
#endif /* FreeBSD_version */
|
|
||||||
|
|
||||||
#include "is.h"
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE 1
|
|
||||||
#define FALSE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WANT_STAT(x) (poss_stats[(x)] != NO_STAT)
|
|
||||||
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
/* the old values */
|
|
||||||
#define DK_NDRIVE 8
|
|
||||||
#define DK_NAMELEN 8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
Function Prototypes
|
|
||||||
*/
|
|
||||||
static int get_namelist(const char *kernel_name, const char *memory_name);
|
|
||||||
static void kread(int nlx, void *addr, size_t size);
|
|
||||||
static void collect_stats(void);
|
|
||||||
static int total_disk_transfers(void);
|
|
||||||
static int get_swapspace(void);
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
void init_devstat(void);
|
|
||||||
int get_devstat(void);
|
|
||||||
#endif /* HAVE_DEVSTAT */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Variables & Structs
|
|
||||||
*/
|
|
||||||
static unsigned long *intrcnt;
|
|
||||||
static int nintr, hz;
|
|
||||||
static kvm_t *kd;
|
|
||||||
static char errbuf[_POSIX2_LINE_MAX];
|
|
||||||
static char dr_name[DK_NDRIVE][DK_NAMELEN];
|
|
||||||
static double etime;
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
long generation;
|
|
||||||
devstat_select_mode select_mode;
|
|
||||||
struct devstat_match *matches;
|
|
||||||
int num_matches;
|
|
||||||
int num_selected, num_selections;
|
|
||||||
long select_generation;
|
|
||||||
static struct statinfo cur, last;
|
|
||||||
int num_devices;
|
|
||||||
struct device_selection *dev_select;
|
|
||||||
char nodisk;
|
|
||||||
#endif /* HAVE_DEVSTAT */
|
|
||||||
|
|
||||||
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
float current_values[NUM_GRAPHS];
|
|
||||||
#else
|
|
||||||
int current_values[NUM_GRAPHS];
|
|
||||||
#endif
|
|
||||||
stat_type stats;
|
|
||||||
|
|
||||||
extern Widget perfmon[NUM_GRAPHS];
|
|
||||||
|
|
||||||
static struct packet {
|
|
||||||
int input, output, collisions;
|
|
||||||
} packets, old_packets;
|
|
||||||
|
|
||||||
static struct nfsstats nfsstats;
|
|
||||||
static struct _nfsStats {
|
|
||||||
int nfsServer, nfsClient;
|
|
||||||
} nfsStats, old_nfsStats;
|
|
||||||
|
|
||||||
/* NB that we'll have to include machine/asname.h when the kernel goes ELF */
|
|
||||||
struct nlist nl[] = {
|
|
||||||
#define X_CPTIME 0
|
|
||||||
{ "_cp_time" },
|
|
||||||
#define X_SUM 1
|
|
||||||
{ "_cnt" },
|
|
||||||
#define X_BOOTTIME 2
|
|
||||||
{ "_boottime" },
|
|
||||||
#define X_DKXFER 3
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
{ "_hz" }, /* just a placeholder */
|
|
||||||
#else
|
|
||||||
{ "_dk_xfer" },
|
|
||||||
#endif
|
|
||||||
#define X_HZ 4
|
|
||||||
{ "_hz" },
|
|
||||||
#define N_IFNET 5
|
|
||||||
{ "_ifnet" },
|
|
||||||
#define X_INTRCNT 6
|
|
||||||
{ "_intrcnt" },
|
|
||||||
#define X_EINTRCNT 7
|
|
||||||
{ "_eintrcnt" },
|
|
||||||
#if __FreeBSD_version < 400000
|
|
||||||
#define VM_NSWAP 8
|
|
||||||
{ "_nswap" }, /* size of largest swap device */
|
|
||||||
#define VM_NSWDEV 9
|
|
||||||
{ "_nswdev" }, /* number of swap devices */
|
|
||||||
#define VM_DMMAX 10
|
|
||||||
{ "_dmmax" }, /* maximum size of a swap block */
|
|
||||||
#define VM_SWAPLIST 11
|
|
||||||
{ "_swaplist" },/* list of free swap areas */
|
|
||||||
#define VM_SWDEVT 12
|
|
||||||
{ "_swdevt" }, /* list of swap devices and sizes */
|
|
||||||
#endif
|
|
||||||
{ "" },
|
|
||||||
};
|
|
||||||
|
|
||||||
struct {
|
|
||||||
long time[CPUSTATES];
|
|
||||||
#ifndef HAVE_DEVSTAT
|
|
||||||
long xfer[DK_NDRIVE];
|
|
||||||
#endif
|
|
||||||
struct vmmeter Sum;
|
|
||||||
struct vmmeter Rate;
|
|
||||||
int interrupts;
|
|
||||||
} s, s1;
|
|
||||||
|
|
||||||
int first_time_getswap;
|
|
||||||
|
|
||||||
#define rate s.Rate
|
|
||||||
#define sum s.Sum
|
|
||||||
|
|
||||||
/*
|
|
||||||
This routine does all necessary setting up of structures
|
|
||||||
that will handle system calls.
|
|
||||||
*/
|
|
||||||
void sys_setup()
|
|
||||||
{
|
|
||||||
get_namelist(getbootfile(), _PATH_KMEM);
|
|
||||||
collect_stats();
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
init_devstat();
|
|
||||||
#endif
|
|
||||||
/* hack to enforce a resize of the 'Free Swap' graph
|
|
||||||
without this the left border always displays the first drawn line
|
|
||||||
cause this field isn't resized very often due to slow change of
|
|
||||||
the free swapspace! */
|
|
||||||
first_time_getswap = 1;
|
|
||||||
etime = 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Update the data structures
|
|
||||||
*/
|
|
||||||
void update_stats()
|
|
||||||
{
|
|
||||||
int state;
|
|
||||||
double pct, tot, loadavg[3];
|
|
||||||
|
|
||||||
collect_stats();
|
|
||||||
|
|
||||||
tot = 0;
|
|
||||||
for (state = 0; state < CPUSTATES; ++state)
|
|
||||||
tot += s.time[state];
|
|
||||||
if (tot)
|
|
||||||
pct = 100 / tot;
|
|
||||||
else
|
|
||||||
pct = 0;
|
|
||||||
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
if (getloadavg(loadavg, sizeof(loadavg) / sizeof(loadavg[0])) == -1 ) {
|
|
||||||
fprintf( stderr, "xperfmon++: getloadavg returned no values\n" );
|
|
||||||
current_values[LOAD] = 0;
|
|
||||||
} else {
|
|
||||||
current_values[LOAD] = loadavg[0]*100;
|
|
||||||
/* fprintf( stderr, "loadavg: %f %f %f\n", loadavg[0], loadavg[1], loadavg[2] ); */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
current_values[USER_CPU_PERCENTAGE] = s.time[CP_USER] * pct;
|
|
||||||
current_values[NICE_CPU_PERCENTAGE] = s.time[CP_NICE] * pct;
|
|
||||||
current_values[SYSTEM_CPU_PERCENTAGE] = s.time[CP_SYS] * pct;
|
|
||||||
current_values[INTER_CPU_PERCENTAGE] = s.time[CP_INTR] * pct;
|
|
||||||
#else
|
|
||||||
current_values[USER_CPU_PERCENTAGE] = (s.time[CP_USER] + s.time[CP_NICE]) * pct;
|
|
||||||
current_values[SYSTEM_CPU_PERCENTAGE] = (s.time[CP_SYS] + s.time[CP_INTR]) * pct;;
|
|
||||||
#endif
|
|
||||||
current_values[IDLE_CPU_PERCENTAGE] = s.time[CP_IDLE] * pct;
|
|
||||||
|
|
||||||
if (perfmon[FREE_MEM]) {
|
|
||||||
if(!first_time_getswap)
|
|
||||||
current_values[FREE_MEM] = get_swapspace();
|
|
||||||
else {
|
|
||||||
current_values[FREE_MEM] = 100;
|
|
||||||
first_time_getswap = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (perfmon[DISK_TRANSFERS])
|
|
||||||
current_values[DISK_TRANSFERS] = total_disk_transfers();
|
|
||||||
if (perfmon[INTERRUPTS])
|
|
||||||
current_values[INTERRUPTS] = (s.interrupts - s1.interrupts)/etime;
|
|
||||||
if (perfmon[INPUT_PACKETS])
|
|
||||||
current_values[INPUT_PACKETS] = (packets.input - old_packets.input)/etime;
|
|
||||||
if (perfmon[OUTPUT_PACKETS])
|
|
||||||
current_values[OUTPUT_PACKETS] = (packets.output - old_packets.output)/etime;
|
|
||||||
if (perfmon[COLLISION_PACKETS])
|
|
||||||
current_values[COLLISION_PACKETS] = (packets.collisions - old_packets.collisions)/etime;
|
|
||||||
if (perfmon[NFS_CLIENT_CALLS])
|
|
||||||
current_values[NFS_CLIENT_CALLS] = (nfsStats.nfsClient - old_nfsStats.nfsClient)/etime;
|
|
||||||
if (perfmon[NFS_SERVER_CALLS])
|
|
||||||
current_values[NFS_SERVER_CALLS] = (nfsStats.nfsServer - old_nfsStats.nfsServer)/etime;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Collect the overall disk transfer rates
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
total_disk_transfers()
|
|
||||||
{
|
|
||||||
register int i, total_xfers = 0;
|
|
||||||
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
total_xfers = get_devstat();
|
|
||||||
#else
|
|
||||||
for(i=0; i < DK_NDRIVE; i++)
|
|
||||||
total_xfers += s.xfer[i];
|
|
||||||
#endif
|
|
||||||
return(total_xfers/etime);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Collect all the data
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
collect_stats()
|
|
||||||
{
|
|
||||||
off_t ifnetaddr;
|
|
||||||
register int i, tmp;
|
|
||||||
int mib[3], size;
|
|
||||||
#if (__FreeBSD_version >= 300004)
|
|
||||||
struct vfsconf vfc;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
kread(X_CPTIME, s.time, sizeof(s.time));
|
|
||||||
#ifndef HAVE_DEVSTAT
|
|
||||||
kread(X_DKXFER, s.xfer, sizeof(s.xfer));
|
|
||||||
#endif
|
|
||||||
kread(X_SUM, &sum, sizeof(sum) );
|
|
||||||
|
|
||||||
nintr = nl[X_EINTRCNT].n_value - nl[X_INTRCNT].n_value;
|
|
||||||
if ((intrcnt = (unsigned long *) malloc((size_t) nintr)) == NULL)
|
|
||||||
err(1, "xperfmon++ malloc in collect_stats");
|
|
||||||
nintr /= sizeof(long);
|
|
||||||
kread(X_INTRCNT, intrcnt, (size_t) nintr*sizeof(long));
|
|
||||||
s1.interrupts = s.interrupts;
|
|
||||||
s.interrupts = 0;
|
|
||||||
for (i = 0; i < nintr; i++)
|
|
||||||
s.interrupts += *(intrcnt + i);
|
|
||||||
|
|
||||||
free(intrcnt);
|
|
||||||
etime = 0;
|
|
||||||
#ifndef HAVE_DEVSTAT
|
|
||||||
for (i=0; i < DK_NDRIVE; i++) {
|
|
||||||
tmp = s.xfer[i];
|
|
||||||
s.xfer[i] -= s1.xfer[i];
|
|
||||||
s1.xfer[i] = tmp;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
for (i=0; i < CPUSTATES; i++) {
|
|
||||||
tmp = s.time[i];
|
|
||||||
s.time[i] -= s1.time[i];
|
|
||||||
s1.time[i] = tmp;
|
|
||||||
etime += s.time[i];
|
|
||||||
}
|
|
||||||
if(etime == 0.)
|
|
||||||
etime = 1.;
|
|
||||||
etime /= hz;
|
|
||||||
|
|
||||||
/*
|
|
||||||
Collect the Network-Traffic
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((ifnetaddr = nl[N_IFNET].n_value) != 0) {
|
|
||||||
#if __FreeBSD_version < 300000
|
|
||||||
struct ifnet ifnet;
|
|
||||||
kread(N_IFNET, &ifnetaddr, sizeof(ifnetaddr));
|
|
||||||
old_packets = packets;
|
|
||||||
packets.input = packets.output = packets.collisions = 0;
|
|
||||||
while (ifnetaddr) {
|
|
||||||
kvm_read(kd, ifnetaddr, &ifnet, sizeof ifnet );
|
|
||||||
packets.input += ifnet.if_ipackets;
|
|
||||||
packets.output += ifnet.if_opackets;
|
|
||||||
packets.collisions += ifnet.if_collisions;
|
|
||||||
ifnetaddr = (u_long) ifnet.if_next;
|
|
||||||
}
|
|
||||||
#else /* 3.0-current, Jan 1997 */
|
|
||||||
/* Stolen from netstat/if.c */
|
|
||||||
struct ifnet ifnet;
|
|
||||||
struct ifnethead ifnethead;
|
|
||||||
u_long ifaddraddr, ifnetfound;
|
|
||||||
struct ifaddr ifa;
|
|
||||||
|
|
||||||
if(kvm_read(kd, ifnetaddr, (char *)&ifnethead, sizeof ifnethead) == -1)
|
|
||||||
return;
|
|
||||||
ifnetaddr = (u_long)ifnethead.tqh_first;
|
|
||||||
if(kvm_read(kd, ifnetaddr, (char *)&ifnet, sizeof ifnet) == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
old_packets = packets;
|
|
||||||
packets.input = packets.output = packets.collisions = 0;
|
|
||||||
ifaddraddr = 0;
|
|
||||||
while (ifnetaddr || ifaddraddr) {
|
|
||||||
if (ifaddraddr == 0) {
|
|
||||||
ifnetfound = ifnetaddr;
|
|
||||||
if(kvm_read(kd, ifnetaddr, (char *)&ifnet, sizeof ifnet) == -1)
|
|
||||||
return;
|
|
||||||
ifnetaddr = (u_long)ifnet.if_link.tqe_next;
|
|
||||||
ifaddraddr = (u_long)ifnet.if_addrhead.tqh_first;
|
|
||||||
}
|
|
||||||
if (kvm_read(kd, ifaddraddr, (char *)&ifa, sizeof ifa) == -1) {
|
|
||||||
ifaddraddr = 0;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ifaddraddr = (u_long)ifa.ifa_link.tqe_next;
|
|
||||||
|
|
||||||
packets.input += ifnet.if_ipackets;
|
|
||||||
packets.output += ifnet.if_opackets;
|
|
||||||
packets.collisions += ifnet.if_collisions;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Collect the NFS and RPC Calls
|
|
||||||
*/
|
|
||||||
|
|
||||||
size = sizeof(nfsstats);
|
|
||||||
mib[0] = CTL_FS;
|
|
||||||
#if (__FreeBSD_version >= 300004)
|
|
||||||
if (getvfsbyname("nfs", &vfc) < 0)
|
|
||||||
/* no NFS in the kernel */
|
|
||||||
return;
|
|
||||||
mib[1] = vfc.vfc_typenum;
|
|
||||||
#else
|
|
||||||
mib[1] = MOUNT_NFS;
|
|
||||||
#endif
|
|
||||||
mib[2] = NFS_NFSSTATS;
|
|
||||||
|
|
||||||
if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0)
|
|
||||||
return;
|
|
||||||
else {
|
|
||||||
old_nfsStats = nfsStats;
|
|
||||||
|
|
||||||
nfsStats.nfsClient = nfsstats.rpccnt[NFSPROC_GETATTR] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_SETATTR] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_LOOKUP] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_READLINK] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_READ] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_WRITE] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_CREATE] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_REMOVE] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_RENAME] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_LINK] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_SYMLINK] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_MKDIR] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_RMDIR] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_READDIR] +
|
|
||||||
#ifndef HAS_NFS_V3
|
|
||||||
nfsstats.rpccnt[NFSPROC_STATFS] +
|
|
||||||
nfsstats.rpccnt[NQNFSPROC_READDIRLOOK] +
|
|
||||||
#else /* HAS_NFS_V3 */
|
|
||||||
nfsstats.rpccnt[NFSPROC_READDIRPLUS] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_FSSTAT] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_FSINFO] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_PATHCONF] +
|
|
||||||
nfsstats.rpccnt[NFSPROC_COMMIT] +
|
|
||||||
#endif /* HAS_NFS_V3 */
|
|
||||||
nfsstats.rpccnt[NQNFSPROC_GETLEASE] +
|
|
||||||
nfsstats.rpccnt[NQNFSPROC_VACATED] +
|
|
||||||
nfsstats.rpccnt[NQNFSPROC_EVICTED];
|
|
||||||
|
|
||||||
nfsStats.nfsServer = nfsstats.srvrpccnt[NFSPROC_GETATTR] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_SETATTR] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_LOOKUP] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_READLINK] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_READ] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_WRITE] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_CREATE] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_REMOVE] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_RENAME] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_LINK] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_SYMLINK] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_MKDIR] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_RMDIR] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_READDIR] +
|
|
||||||
#ifndef HAS_NFS_V3
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_STATFS] +
|
|
||||||
nfsstats.srvrpccnt[NQNFSPROC_READDIRLOOK] +
|
|
||||||
#else /* HAS_NFS_V3 */
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_READDIRPLUS] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_FSSTAT] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_FSINFO] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_PATHCONF] +
|
|
||||||
nfsstats.srvrpccnt[NFSPROC_COMMIT] +
|
|
||||||
#endif /* HAS_NFS_V3 */
|
|
||||||
nfsstats.srvrpccnt[NQNFSPROC_GETLEASE] +
|
|
||||||
nfsstats.srvrpccnt[NQNFSPROC_VACATED] +
|
|
||||||
nfsstats.srvrpccnt[NQNFSPROC_EVICTED];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Reads the nlist from the kernel
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
get_namelist(kernel_name, memory_name)
|
|
||||||
const char *kernel_name, *memory_name;
|
|
||||||
{
|
|
||||||
time_t now;
|
|
||||||
time_t boottime;
|
|
||||||
register int i, c;
|
|
||||||
int nintv;
|
|
||||||
|
|
||||||
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
|
|
||||||
if (kd == 0) {
|
|
||||||
(void)fprintf(stderr, "xperfmon++: kvm_openfiles: %s\n", errbuf);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((c = kvm_nlist(kd, nl)) != 0) {
|
|
||||||
if (c > 0) {
|
|
||||||
(void)fprintf(stderr,"xperfmon++: undefined symbols:");
|
|
||||||
for (c = 0; c < sizeof(nl)/sizeof(nl[0]); c++)
|
|
||||||
if (nl[c].n_type == 0)
|
|
||||||
fprintf(stderr, " %s", nl[c].n_name);
|
|
||||||
(void)fputc('\n', stderr);
|
|
||||||
} else
|
|
||||||
(void)fprintf(stderr, "xperfmon++: kvm_nlist: %s\n", kvm_geterr(kd)); exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
kread(X_BOOTTIME, &boottime, sizeof(boottime));
|
|
||||||
kread(X_HZ, &hz, sizeof(hz));
|
|
||||||
for (i = 0; i < DK_NDRIVE; i++) {
|
|
||||||
strcpy(dr_name[i], "xx");
|
|
||||||
}
|
|
||||||
time(&now);
|
|
||||||
nintv = now - boottime;
|
|
||||||
if (nintv <= 0 || nintv > 60*60*24*365*10) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"Time makes no sense... namelist must be wrong.\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
return(nintv);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Kread reads something from the kernel, given its nlist index.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
kread(nlx, addr, size)
|
|
||||||
int nlx;
|
|
||||||
void *addr;
|
|
||||||
size_t size;
|
|
||||||
{
|
|
||||||
char *sym;
|
|
||||||
|
|
||||||
if (nl[nlx].n_type == 0 || nl[nlx].n_value == 0) {
|
|
||||||
sym = nl[nlx].n_name;
|
|
||||||
if (*sym == '_')
|
|
||||||
++sym;
|
|
||||||
(void)fprintf(stderr,
|
|
||||||
"xpermon++: symbol %s not defined\n", sym);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (kvm_read(kd, nl[nlx].n_value, addr, size) != size) {
|
|
||||||
sym = nl[nlx].n_name;
|
|
||||||
if (*sym == '_')
|
|
||||||
++sym;
|
|
||||||
(void)fprintf(stderr, "xperfmon++: %s: %s\n", sym, kvm_geterr(kd));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* get_swapspace is based on a program called swapinfo written
|
|
||||||
* by Kevin Lahey <kml@rokkaku.atl.ga.us>.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
get_swapspace()
|
|
||||||
{
|
|
||||||
#if __FreeBSD_version >= 400000
|
|
||||||
/* based on swapmode from /usr/src/usr.bin/top/machine.c */
|
|
||||||
int n;
|
|
||||||
int percentfree;
|
|
||||||
struct kvm_swap swapary[1];
|
|
||||||
|
|
||||||
n = kvm_getswapinfo(kd, swapary, 1, 0);
|
|
||||||
if (n < 0)
|
|
||||||
return(0);
|
|
||||||
|
|
||||||
percentfree = (int)((((double)swapary[0].ksw_total -
|
|
||||||
(double)swapary[0].ksw_used) * 100.0) /
|
|
||||||
(double)swapary[0].ksw_total);
|
|
||||||
return(percentfree);
|
|
||||||
#else
|
|
||||||
char *header;
|
|
||||||
int hlen, nswap, nswdev, dmmax;
|
|
||||||
int i, div, avail, nfree, npfree, used;
|
|
||||||
struct swdevt *sw;
|
|
||||||
long blocksize, *perdev;
|
|
||||||
struct rlist head;
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
struct rlisthdr swaplist;
|
|
||||||
struct rlist *swapptr;
|
|
||||||
#else
|
|
||||||
struct rlist *swaplist;
|
|
||||||
#endif
|
|
||||||
u_long ptr;
|
|
||||||
kread(VM_NSWAP, &nswap, sizeof(nswap));
|
|
||||||
kread(VM_NSWDEV, &nswdev, sizeof(nswdev));
|
|
||||||
kread(VM_DMMAX, &dmmax, sizeof(dmmax));
|
|
||||||
kread(VM_SWAPLIST, &swaplist, sizeof(swaplist));
|
|
||||||
if ((sw = malloc(nswdev * sizeof(*sw))) == NULL ||
|
|
||||||
(perdev = malloc(nswdev * sizeof(*perdev))) == NULL)
|
|
||||||
err(1, "xperfmon++ malloc in get_swapspace");
|
|
||||||
kread(VM_SWDEVT, &ptr, sizeof(ptr));
|
|
||||||
kvm_read(kd, ptr, sw, nswdev * sizeof(*sw));
|
|
||||||
/* Count up swap space. */
|
|
||||||
nfree = 0;
|
|
||||||
memset(perdev, 0, nswdev * sizeof(*perdev));
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
swapptr = swaplist.rlh_list;
|
|
||||||
while (swapptr) {
|
|
||||||
#else
|
|
||||||
while (swaplist) {
|
|
||||||
#endif
|
|
||||||
int top, bottom, next_block;
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
kvm_read(kd, (u_long)swapptr, &head, sizeof(struct rlist));
|
|
||||||
#else
|
|
||||||
kvm_read(kd, (u_long)swaplist, &head, sizeof(struct rlist));
|
|
||||||
#endif
|
|
||||||
top = head.rl_end;
|
|
||||||
bottom = head.rl_start;
|
|
||||||
|
|
||||||
nfree += top - bottom + 1;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Swap space is split up among the configured disks.
|
|
||||||
*
|
|
||||||
* For interleaved swap devices, the first dmmax blocks
|
|
||||||
* of swap space some from the first disk, the next dmmax
|
|
||||||
* blocks from the next, and so on up to nswap blocks.
|
|
||||||
*
|
|
||||||
* The list of free space joins adjacent free blocks,
|
|
||||||
* ignoring device boundries. If we want to keep track
|
|
||||||
* of this information per device, we'll just have to
|
|
||||||
* extract it ourselves.
|
|
||||||
*/
|
|
||||||
while (top / dmmax != bottom / dmmax) {
|
|
||||||
next_block = ((bottom + dmmax) / dmmax);
|
|
||||||
perdev[(bottom / dmmax) % nswdev] +=
|
|
||||||
next_block * dmmax - bottom;
|
|
||||||
bottom = next_block * dmmax;
|
|
||||||
}
|
|
||||||
perdev[(bottom / dmmax) % nswdev] +=
|
|
||||||
top - bottom + 1;
|
|
||||||
#if __FreeBSD_version >= 220000
|
|
||||||
swapptr = head.rl_next;
|
|
||||||
#else
|
|
||||||
swaplist = head.rl_next;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
header = getbsize(&hlen, &blocksize);
|
|
||||||
div = blocksize / 512;
|
|
||||||
avail = npfree = 0;
|
|
||||||
for (i = 0; i < nswdev; i++) {
|
|
||||||
int xsize, xfree;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Don't report statistics for partitions which have not
|
|
||||||
* yet been activated via swapon(8).
|
|
||||||
*/
|
|
||||||
if (!(sw[i].sw_flags & SW_FREED))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* The first dmmax is never allocated to avoid trashing of
|
|
||||||
* disklabels
|
|
||||||
*/
|
|
||||||
xsize = sw[i].sw_nblks - dmmax;
|
|
||||||
xfree = perdev[i];
|
|
||||||
used = xsize - xfree;
|
|
||||||
npfree++;
|
|
||||||
avail += xsize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If only one partition has been set up via swapon(8), we don't
|
|
||||||
* need to bother with totals.
|
|
||||||
*/
|
|
||||||
used = avail - nfree;
|
|
||||||
|
|
||||||
free(perdev);
|
|
||||||
free(sw);
|
|
||||||
return((100*nfree)/avail); /* return free swap in percent */
|
|
||||||
#endif /* __FreeBSD_version >= 400000 */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_DEVSTAT
|
|
||||||
/* routines which use libdevstat */
|
|
||||||
/* this is partly taken from FreeBSD - /usr/src/usr.sbin/iostat */
|
|
||||||
void
|
|
||||||
init_devstat(void)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Make sure that the userland devstat version matches the kernel
|
|
||||||
* devstat version.
|
|
||||||
*/
|
|
||||||
if (checkversion() < 0) {
|
|
||||||
nodisk++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* find out how many devices we have */
|
|
||||||
if ((num_devices = getnumdevs()) < 0) {
|
|
||||||
nodisk++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
|
|
||||||
last.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
|
|
||||||
bzero(cur.dinfo, sizeof(struct devinfo));
|
|
||||||
bzero(last.dinfo, sizeof(struct devinfo));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Grab all the devices. We don't look to see if the list has
|
|
||||||
* changed here, since it almost certainly has. We only look for
|
|
||||||
* errors.
|
|
||||||
*/
|
|
||||||
if (getdevs(&cur) == -1) {
|
|
||||||
nodisk++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
num_devices = cur.dinfo->numdevs;
|
|
||||||
generation = cur.dinfo->generation;
|
|
||||||
|
|
||||||
dev_select = NULL;
|
|
||||||
|
|
||||||
/* only interested in disks */
|
|
||||||
matches = NULL;
|
|
||||||
if (buildmatch("da", &matches, &num_matches) != 0) {
|
|
||||||
nodisk++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (num_matches == 0)
|
|
||||||
select_mode = DS_SELECT_ADD;
|
|
||||||
else
|
|
||||||
select_mode = DS_SELECT_ONLY;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* At this point, selectdevs will almost surely indicate that the
|
|
||||||
* device list has changed, so we don't look for return values of 0
|
|
||||||
* or 1. If we get back -1, though, there is an error.
|
|
||||||
*/
|
|
||||||
if (selectdevs(&dev_select, &num_selected,
|
|
||||||
&num_selections, &select_generation,
|
|
||||||
generation, cur.dinfo->devices, num_devices,
|
|
||||||
matches, num_matches,
|
|
||||||
NULL, 0,
|
|
||||||
select_mode, DK_NDRIVE, 0) == -1)
|
|
||||||
nodisk++;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
get_devstat(void)
|
|
||||||
{
|
|
||||||
register int dn;
|
|
||||||
long double busy_seconds;
|
|
||||||
u_int64_t total_transfers;
|
|
||||||
struct devinfo *tmp_dinfo;
|
|
||||||
int total_xfers = 0;
|
|
||||||
|
|
||||||
if (nodisk == 0) {
|
|
||||||
/*
|
|
||||||
* Here what we want to do is refresh our device stats.
|
|
||||||
* getdevs() returns 1 when the device list has changed.
|
|
||||||
* If the device list has changed, we want to go through
|
|
||||||
* the selection process again, in case a device that we
|
|
||||||
* were previously displaying has gone away.
|
|
||||||
*/
|
|
||||||
switch (getdevs(&cur)) {
|
|
||||||
case -1:
|
|
||||||
return (0);
|
|
||||||
case 1: {
|
|
||||||
int retval;
|
|
||||||
|
|
||||||
num_devices = cur.dinfo->numdevs;
|
|
||||||
generation = cur.dinfo->generation;
|
|
||||||
retval = selectdevs(&dev_select, &num_selected,
|
|
||||||
&num_selections, &select_generation,
|
|
||||||
generation, cur.dinfo->devices,
|
|
||||||
num_devices, matches, num_matches,
|
|
||||||
NULL, 0,
|
|
||||||
select_mode, DK_NDRIVE, 0);
|
|
||||||
switch(retval) {
|
|
||||||
case -1:
|
|
||||||
return (0);
|
|
||||||
case 1:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Calculate elapsed time up front, since it's the same for all
|
|
||||||
* devices.
|
|
||||||
*/
|
|
||||||
busy_seconds = compute_etime(cur.busy_time, last.busy_time);
|
|
||||||
|
|
||||||
/* this is the first time thru so just copy cur to last */
|
|
||||||
if (last.dinfo->numdevs == 0) {
|
|
||||||
tmp_dinfo = last.dinfo;
|
|
||||||
last.dinfo = cur.dinfo;
|
|
||||||
cur.dinfo = tmp_dinfo;
|
|
||||||
last.busy_time = cur.busy_time;
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (dn = 0; dn < num_devices; dn++) {
|
|
||||||
int di;
|
|
||||||
|
|
||||||
if ((dev_select[dn].selected == 0)
|
|
||||||
|| (dev_select[dn].selected > DK_NDRIVE))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
di = dev_select[dn].position;
|
|
||||||
|
|
||||||
if (compute_stats(&cur.dinfo->devices[di],
|
|
||||||
&last.dinfo->devices[di], busy_seconds,
|
|
||||||
NULL, &total_transfers,
|
|
||||||
NULL, NULL,
|
|
||||||
NULL, NULL,
|
|
||||||
NULL, NULL)!= 0)
|
|
||||||
break;
|
|
||||||
total_xfers += (int)total_transfers;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp_dinfo = last.dinfo;
|
|
||||||
last.dinfo = cur.dinfo;
|
|
||||||
cur.dinfo = tmp_dinfo;
|
|
||||||
|
|
||||||
last.busy_time = cur.busy_time;
|
|
||||||
|
|
||||||
} else
|
|
||||||
/* no disks found ? */
|
|
||||||
total_xfers = 0;
|
|
||||||
|
|
||||||
return (total_xfers);
|
|
||||||
}
|
|
||||||
#endif /* HAVE_DEVSTAT */
|
|
|
@ -1,950 +0,0 @@
|
||||||
*** ../xperfmon++/StripChart.c Wed Jul 27 22:29:30 1994
|
|
||||||
--- ./StripChart.c Thu Apr 30 15:03:27 1998
|
|
||||||
***************
|
|
||||||
*** 53,58 ****
|
|
||||||
--- 53,70 ----
|
|
||||||
#include <X11/StringDefs.h>
|
|
||||||
#include <X11/Xaw/XawInit.h>
|
|
||||||
#include "StripCharP.h"
|
|
||||||
+
|
|
||||||
+ #ifdef HAVE_SYS_PARAM_H
|
|
||||||
+ #include <sys/param.h>
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ #if (defined(BSD) && (BSD >= 199506))
|
|
||||||
+ # include <osreldate.h>
|
|
||||||
+ #else
|
|
||||||
+ # error You have to use at least a FreeBSD 2.2.X system
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ # include "system.h"
|
|
||||||
#include <X11/Xfuncs.h>
|
|
||||||
|
|
||||||
#define MS_PER_SEC 100
|
|
||||||
***************
|
|
||||||
*** 108,114 ****
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef offset
|
|
||||||
! #define LABEL_ROOM 100
|
|
||||||
static void Initialize(), Destroy(), Redisplay(), MoveChart(), SetPoints();
|
|
||||||
static Boolean SetValues();
|
|
||||||
static int repaint_window();
|
|
||||||
--- 120,130 ----
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef offset
|
|
||||||
! #if (defined(BSD) && (BSD >= 199306))
|
|
||||||
! # define LABEL_ROOM 80
|
|
||||||
! #else
|
|
||||||
! # define LABEL_ROOM 100
|
|
||||||
! #endif
|
|
||||||
static void Initialize(), Destroy(), Redisplay(), MoveChart(), SetPoints();
|
|
||||||
static Boolean SetValues();
|
|
||||||
static int repaint_window();
|
|
||||||
***************
|
|
||||||
*** 215,222 ****
|
|
||||||
--- 231,253 ----
|
|
||||||
static void Initialize (greq, gnew)
|
|
||||||
Widget greq, gnew;
|
|
||||||
{
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
PerfChartWidget w = (PerfChartWidget)gnew;
|
|
||||||
|
|
||||||
+ /*
|
|
||||||
+ * XXX The missing initializations have been made obvious by FreeBSD 2.2's
|
|
||||||
+ * new (`phk') malloc that doesn't initialize the malloc'ed areas to 0.
|
|
||||||
+ * Perhaps more bogons will lurk around, but the floating arithmetic ones
|
|
||||||
+ * have been the most annoying ones since they most likely cause a trap
|
|
||||||
+ * at startup time.
|
|
||||||
+ *
|
|
||||||
+ * Strange that people in the 90's still rely on malloc()
|
|
||||||
+ * returning an initialized region.
|
|
||||||
+ */
|
|
||||||
+ for ( i = 0; i < NUM_VALUES; i++ )
|
|
||||||
+ w->strip_chart.valuedata[i] = 0.0;
|
|
||||||
+
|
|
||||||
/* if we are working with a mono screen then turn off all warnings and alarms */
|
|
||||||
|
|
||||||
if ( mono_screen ) {
|
|
||||||
***************
|
|
||||||
*** 343,361 ****
|
|
||||||
|
|
||||||
if ( checkValue >= w->strip_chart.highAlarm ) { /* check for high alarm */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) {
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.alarmColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.alarmColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( checkValue >= w->strip_chart.highWarn ) { /* check for high warning */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) {
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.warnColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.warnColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.okColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.okColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- 374,392 ----
|
|
||||||
|
|
||||||
if ( checkValue >= w->strip_chart.highAlarm ) { /* check for high alarm */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) {
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.alarmColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.alarmColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( checkValue >= w->strip_chart.highWarn ) { /* check for high warning */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) {
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.warnColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.warnColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.okColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.okColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 373,391 ****
|
|
||||||
|
|
||||||
if ( checkValue <= w->strip_chart.lowAlarm ) { /* check for low alarm */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) {
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.alarmColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.alarmColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( checkValue <= w->strip_chart.lowWarn ) { /* check for low warning */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) {
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.warnColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.warnColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */
|
|
||||||
! XtVaSetValues(w, XtNbackground, w->strip_chart.okColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.okColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- 404,422 ----
|
|
||||||
|
|
||||||
if ( checkValue <= w->strip_chart.lowAlarm ) { /* check for low alarm */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) {
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.alarmColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.alarmColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( checkValue <= w->strip_chart.lowWarn ) { /* check for low warning */
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) {
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.warnColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.warnColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */
|
|
||||||
! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.okColor, NULL );
|
|
||||||
w->strip_chart.currentBG = w->strip_chart.okColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 448,455 ****
|
|
||||||
|
|
||||||
/* Compute the minimum scale required to graph the data, but don't go
|
|
||||||
lower than min_scale. */
|
|
||||||
! if (w->strip_chart.interval != 0 || scale <= (int)w->strip_chart.max_value)
|
|
||||||
scale = ((int) (w->strip_chart.max_value)) + 1;
|
|
||||||
if (scale < w->strip_chart.min_scale)
|
|
||||||
scale = w->strip_chart.min_scale;
|
|
||||||
|
|
||||||
--- 479,493 ----
|
|
||||||
|
|
||||||
/* Compute the minimum scale required to graph the data, but don't go
|
|
||||||
lower than min_scale. */
|
|
||||||
!
|
|
||||||
! if (w->strip_chart.interval != 0 || scale <= (int)w->strip_chart.max_value) {
|
|
||||||
! #if (defined(BSD) && (BSD >= 199306))
|
|
||||||
! if (strcmp(w->strip_chart.botLabel, botNames[FREE_MEM]) != 0 || w->strip_chart.max_value == 100)
|
|
||||||
scale = ((int) (w->strip_chart.max_value)) + 1;
|
|
||||||
+ #else
|
|
||||||
+ scale = ((int) (w->strip_chart.max_value)) + 1;
|
|
||||||
+ #endif
|
|
||||||
+ }
|
|
||||||
if (scale < w->strip_chart.min_scale)
|
|
||||||
scale = w->strip_chart.min_scale;
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 479,490 ****
|
|
||||||
/* draw titles */
|
|
||||||
|
|
||||||
if ( w->strip_chart.topLabel ) {
|
|
||||||
! y = w->core.height/2;
|
|
||||||
x = 4;
|
|
||||||
XDS(w->strip_chart.topLabel);
|
|
||||||
}
|
|
||||||
if ( w->strip_chart.botLabel ) {
|
|
||||||
! y = (w->core.height/2) + w->strip_chart.font_height;
|
|
||||||
x = 4;
|
|
||||||
XDS(w->strip_chart.botLabel);
|
|
||||||
}
|
|
||||||
--- 517,528 ----
|
|
||||||
/* draw titles */
|
|
||||||
|
|
||||||
if ( w->strip_chart.topLabel ) {
|
|
||||||
! y = w->core.height/2 - 2;
|
|
||||||
x = 4;
|
|
||||||
XDS(w->strip_chart.topLabel);
|
|
||||||
}
|
|
||||||
if ( w->strip_chart.botLabel ) {
|
|
||||||
! y = (w->core.height/2 - 2) + w->strip_chart.font_height;
|
|
||||||
x = 4;
|
|
||||||
XDS(w->strip_chart.botLabel);
|
|
||||||
}
|
|
||||||
*** ../xperfmon++/TimeChart.c Wed Jul 27 22:29:31 1994
|
|
||||||
--- ./TimeChart.c Thu Apr 30 15:03:27 1998
|
|
||||||
***************
|
|
||||||
*** 47,52 ****
|
|
||||||
--- 47,62 ----
|
|
||||||
* Moffett Field, California, rsmith@proteus.arc.nasa.gov
|
|
||||||
******************************************************************/
|
|
||||||
|
|
||||||
+ #ifdef HAVE_SYS_PARAM_H
|
|
||||||
+ #include <sys/param.h>
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ #if (defined(BSD) && (BSD >= 199506))
|
|
||||||
+ # include <osreldate.h>
|
|
||||||
+ #else
|
|
||||||
+ # error You have to use at least a FreeBSD 2.2.X system
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <X11/IntrinsicP.h>
|
|
||||||
#include <X11/StringDefs.h>
|
|
||||||
*** ../xperfmon++/misc.c Wed Jul 27 22:29:33 1994
|
|
||||||
--- ./misc.c Thu Apr 30 15:03:27 1998
|
|
||||||
***************
|
|
||||||
*** 22,27 ****
|
|
||||||
--- 22,38 ----
|
|
||||||
* Author: Roger Smith, Sterling Software @ NASA-Ames Research Center
|
|
||||||
* Moffett Field, California, rsmith@proteus.arc.nasa.gov
|
|
||||||
*/
|
|
||||||
+
|
|
||||||
+ #ifdef HAVE_SYS_PARAM_H
|
|
||||||
+ #include <sys/param.h>
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ #if (defined(BSD) && (BSD >= 199506))
|
|
||||||
+ # include <osreldate.h>
|
|
||||||
+ #else
|
|
||||||
+ # error You have to use at least a FreeBSD 2.2.X system
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <X11/IntrinsicP.h>
|
|
||||||
***************
|
|
||||||
*** 58,64 ****
|
|
||||||
int i, keycode, length = 0;
|
|
||||||
/* PerfmonWidget pw = (PerfmonWidget) w;*/
|
|
||||||
|
|
||||||
! length = XLookupString(event, strbuf, STRBUFSIZE, &keycode, NULL);
|
|
||||||
switch (keycode) {
|
|
||||||
case 'Q':
|
|
||||||
case 'q':
|
|
||||||
--- 69,75 ----
|
|
||||||
int i, keycode, length = 0;
|
|
||||||
/* PerfmonWidget pw = (PerfmonWidget) w;*/
|
|
||||||
|
|
||||||
! length = XLookupString((XKeyEvent *)event, strbuf, STRBUFSIZE, (KeySym *)&keycode, NULL);
|
|
||||||
switch (keycode) {
|
|
||||||
case 'Q':
|
|
||||||
case 'q':
|
|
||||||
*** ../xperfmon++/xperfmon.c Wed Jul 27 22:29:39 1994
|
|
||||||
--- ./xperfmon.c Thu Aug 13 18:59:02 1998
|
|
||||||
***************
|
|
||||||
*** 58,63 ****
|
|
||||||
--- 58,73 ----
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
+ #ifdef HAVE_SYS_PARAM_H
|
|
||||||
+ #include <sys/param.h>
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+ #if (defined(BSD) && (BSD >= 199506))
|
|
||||||
+ # include <osreldate.h>
|
|
||||||
+ #else
|
|
||||||
+ # error You have to use at least a FreeBSD 2.2.X system
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <X11/IntrinsicP.h>
|
|
||||||
#include <X11/StringDefs.h>
|
|
||||||
***************
|
|
||||||
*** 76,82 ****
|
|
||||||
--- 86,97 ----
|
|
||||||
extern void start_graphs();
|
|
||||||
extern time_t timeStamp;
|
|
||||||
extern Dimension oldHeight, oldWidth;
|
|
||||||
+
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ extern float current_values[NUM_GRAPHS];
|
|
||||||
+ #else
|
|
||||||
extern int current_values[NUM_GRAPHS];
|
|
||||||
+ #endif
|
|
||||||
|
|
||||||
char *gprogname;
|
|
||||||
double testValue;
|
|
||||||
***************
|
|
||||||
*** 94,99 ****
|
|
||||||
--- 109,119 ----
|
|
||||||
{ NULL, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
+ /* LK!!! */
|
|
||||||
+ int MIN_HEIGHT=420;
|
|
||||||
+ #define MIN_WIDTH 185
|
|
||||||
+ #define GRAPH_MIN_HEIGHT 28
|
|
||||||
+
|
|
||||||
#define XtNinterval "interval"
|
|
||||||
#define XtNcount "count"
|
|
||||||
#define XtCCount "Count"
|
|
||||||
***************
|
|
||||||
*** 101,120 ****
|
|
||||||
#define XtCFill "Fill"
|
|
||||||
#define XtNfast "fast"
|
|
||||||
#define XtCFast "Fast"
|
|
||||||
- #define XtNstufAdd "stufAdd"
|
|
||||||
- #define XtCStufAdd "StufAdd"
|
|
||||||
- #define XtNstufSub "stufSub"
|
|
||||||
- #define XtCStufSub "StufSub"
|
|
||||||
#define XtNdebug "debug"
|
|
||||||
#define XtCDebug "Debug"
|
|
||||||
#define XtNusercpuAdd "usercpuAdd"
|
|
||||||
#define XtCUsercpuAdd "UsercpuAdd"
|
|
||||||
#define XtNusercpuSub "usercpuSub"
|
|
||||||
#define XtCUsercpuSub "UsercpuSub"
|
|
||||||
#define XtNsystemcpuAdd "systemcpuAdd"
|
|
||||||
#define XtCSystemcpuAdd "SystemcpuAdd"
|
|
||||||
#define XtNsystemcpuSub "systemcpuSub"
|
|
||||||
#define XtCSystemcpuSub "SystemcpuSub"
|
|
||||||
#define XtNidlecpuAdd "idlecpuAdd"
|
|
||||||
#define XtCIdlecpuAdd "IdlecpuAdd"
|
|
||||||
#define XtNidlecpuSub "idlecpuSub"
|
|
||||||
--- 121,154 ----
|
|
||||||
#define XtCFill "Fill"
|
|
||||||
#define XtNfast "fast"
|
|
||||||
#define XtCFast "Fast"
|
|
||||||
#define XtNdebug "debug"
|
|
||||||
#define XtCDebug "Debug"
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ #define XtNsysloadAdd "sysloadAdd"
|
|
||||||
+ #define XtCSysloadAdd "SysloadAdd"
|
|
||||||
+ #define XtNsysloadSub "sysloadSub"
|
|
||||||
+ #define XtCSysloadSub "SysloadSub"
|
|
||||||
+ #endif
|
|
||||||
#define XtNusercpuAdd "usercpuAdd"
|
|
||||||
#define XtCUsercpuAdd "UsercpuAdd"
|
|
||||||
#define XtNusercpuSub "usercpuSub"
|
|
||||||
#define XtCUsercpuSub "UsercpuSub"
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ #define XtNnicecpuAdd "nicecpuAdd"
|
|
||||||
+ #define XtCNicecpuAdd "NicecpuAdd"
|
|
||||||
+ #define XtNnicecpuSub "nicecpuSub"
|
|
||||||
+ #define XtCNicecpuSub "NicecpuSub"
|
|
||||||
+ #endif
|
|
||||||
#define XtNsystemcpuAdd "systemcpuAdd"
|
|
||||||
#define XtCSystemcpuAdd "SystemcpuAdd"
|
|
||||||
#define XtNsystemcpuSub "systemcpuSub"
|
|
||||||
#define XtCSystemcpuSub "SystemcpuSub"
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ #define XtNintercpuAdd "intercpuAdd"
|
|
||||||
+ #define XtCIntercpuAdd "IntercpuAdd"
|
|
||||||
+ #define XtNintercpuSub "intercpuSub"
|
|
||||||
+ #define XtCIntercpuSub "IntercpuSub"
|
|
||||||
+ #endif
|
|
||||||
#define XtNidlecpuAdd "idlecpuAdd"
|
|
||||||
#define XtCIdlecpuAdd "IdlecpuAdd"
|
|
||||||
#define XtNidlecpuSub "idlecpuSub"
|
|
||||||
***************
|
|
||||||
*** 171,192 ****
|
|
||||||
static XrmOptionDescRec optionDescList[] = {
|
|
||||||
{ "-interval", ".interval", XrmoptionSepArg, (caddr_t) NULL},
|
|
||||||
{ "-immediate", "*PerfChart.immediate", XrmoptionNoArg, "True" },
|
|
||||||
!
|
|
||||||
{ "-lowmemAlarm", "*perfChartFree.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowmemWarn", "*perfChartFree.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highmemAlarm", "*perfChartFree.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highmemWarn", "*perfChartFree.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
!
|
|
||||||
{ "-lowuserAlarm", "*perfChartUser.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowuserWarn", "*perfChartUser.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highuserAlarm", "*perfChartUser.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highuserWarn", "*perfChartUser.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
|
|
||||||
{ "-lowsysAlarm", "*perfChartSystem.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowsysWarn", "*perfChartSystem.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highsysAlarm", "*perfChartSystem.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highsysWarn", "*perfChartSystem.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
|
|
||||||
{ "-lowidleAlarm", "*perfChartIdle.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowidleWarn", "*perfChartIdle.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highidleAlarm", "*perfChartIdle.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
--- 205,250 ----
|
|
||||||
static XrmOptionDescRec optionDescList[] = {
|
|
||||||
{ "-interval", ".interval", XrmoptionSepArg, (caddr_t) NULL},
|
|
||||||
{ "-immediate", "*PerfChart.immediate", XrmoptionNoArg, "True" },
|
|
||||||
! #if __FreeBSD_version >= 220000
|
|
||||||
! { "-lowloadAlarm", "*perfChartLoad.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
! { "-lowloadWarn", "*perfChartLoad.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
! { "-highloadAlarm", "*perfChartLoad.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
! { "-highloadWarn", "*perfChartLoad.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
!
|
|
||||||
! { "-lowswapAlarm", "*perfChartSwap.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
! { "-lowswapWarn", "*perfChartSwap.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
! { "-highswapAlarm", "*perfChartSwap.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
! { "-highswapWarn", "*perfChartSwap.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
! #else
|
|
||||||
{ "-lowmemAlarm", "*perfChartFree.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowmemWarn", "*perfChartFree.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highmemAlarm", "*perfChartFree.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highmemWarn", "*perfChartFree.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
! #endif
|
|
||||||
{ "-lowuserAlarm", "*perfChartUser.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowuserWarn", "*perfChartUser.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highuserAlarm", "*perfChartUser.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highuserWarn", "*perfChartUser.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-lowniceAlarm", "*perfChartNice.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-lowniceWarn", "*perfChartNice.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-highniceAlarm", "*perfChartNice.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-highniceWarn", "*perfChartNice.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
{ "-lowsysAlarm", "*perfChartSystem.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowsysWarn", "*perfChartSystem.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highsysAlarm", "*perfChartSystem.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highsysWarn", "*perfChartSystem.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-lowinterAlarm", "*perfChartInter.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-lowinterWarn", "*perfChartInter.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-highinterAlarm", "*perfChartInter.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
+ { "-highinterWarn", "*perfChartInter.highWarn", XrmoptionSepArg, NULL },
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
{ "-lowidleAlarm", "*perfChartIdle.lowAlarm", XrmoptionSepArg, NULL },
|
|
||||||
{ "-lowidleWarn", "*perfChartIdle.lowWarn", XrmoptionSepArg, NULL },
|
|
||||||
{ "-highidleAlarm", "*perfChartIdle.highAlarm", XrmoptionSepArg, NULL },
|
|
||||||
***************
|
|
||||||
*** 231,244 ****
|
|
||||||
--- 289,319 ----
|
|
||||||
{ "-fill", "*fill", XrmoptionNoArg, "True" },
|
|
||||||
{ "-debug", "*debug", XrmoptionNoArg, "True" },
|
|
||||||
{ "-fast", "*fast", XrmoptionNoArg, (XtPointer)"True" },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-sysload", XtNsysloadSub, XrmoptionNoArg, "True" },
|
|
||||||
+ { "+sysload", XtNsysloadAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #endif
|
|
||||||
{ "-usercpu", XtNusercpuSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+usercpu", XtNusercpuAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-nicecpu", XtNnicecpuSub, XrmoptionNoArg, "True" },
|
|
||||||
+ { "+nicecpu", XtNnicecpuAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #endif
|
|
||||||
{ "-systemcpu", XtNsystemcpuSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+systemcpu", XtNsystemcpuAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-intercpu", XtNintercpuSub, XrmoptionNoArg, "True" },
|
|
||||||
+ { "+intercpu", XtNintercpuAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #endif
|
|
||||||
{ "-idlecpu", XtNidlecpuSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+idlecpu", XtNidlecpuAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { "-freeswap", XtNfreememSub, XrmoptionNoArg, "True" },
|
|
||||||
+ { "+freeswap", XtNfreememAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #else
|
|
||||||
{ "-freemem", XtNfreememSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+freemem", XtNfreememAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
+ #endif
|
|
||||||
{ "-diskxfr", XtNdiskxfrSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+diskxfr", XtNdiskxfrAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
{ "-interrupts", XtNinterruptsSub , XrmoptionNoArg, "True" },
|
|
||||||
***************
|
|
||||||
*** 253,269 ****
|
|
||||||
{ "+nfsclient", XtNnfsclientAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
{ "-nfsserver", XtNnfsserverSub, XrmoptionNoArg, "True" },
|
|
||||||
{ "+nfsserver", XtNnfsserverAdd, XrmoptionNoArg, "TRUE" },
|
|
||||||
- { "-stuf", XtNstufAdd, XrmoptionNoArg, (XtPointer)"True" },
|
|
||||||
- { "+stuf", XtNstufSub, XrmoptionNoArg, (XtPointer)"True" },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Application Resource List - no particular widget */
|
|
||||||
|
|
||||||
static XtResource resources[] = {
|
|
||||||
- { XtNstufAdd, XtCStufAdd, XtRBool, sizeof(Bool),
|
|
||||||
- XtOffsetOf(AppData, addG[1]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
- { XtNstufSub, XtCStufSub, XtRBool, sizeof(Bool),
|
|
||||||
- XtOffsetOf(AppData, subG[0]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNinterval, XtCInterval, XtRInt, sizeof(int),
|
|
||||||
XtOffsetOf(AppData, interval), XtRImmediate, (caddr_t) DEF_INTERVAL },
|
|
||||||
{ XtNcount, XtCCount, XtRInt, sizeof(int),
|
|
||||||
--- 328,338 ----
|
|
||||||
***************
|
|
||||||
*** 274,288 ****
|
|
||||||
XtOffsetOf(AppData, debug), XtRImmediate, (caddr_t)NULL },
|
|
||||||
{ XtNfast, XtCFast, XtRBoolean, sizeof(Boolean),
|
|
||||||
XtOffsetOf(AppData, fast), XtRImmediate, (XtPointer) NULL },
|
|
||||||
!
|
|
||||||
{ XtNusercpuAdd, XtCUsercpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[USR_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNusercpuSub, XtCUsercpuSub, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, subG[USR_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNsystemcpuAdd, XtCSystemcpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[SYS_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNsystemcpuSub, XtCSystemcpuSub, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, subG[SYS_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNidlecpuAdd, XtCIdlecpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[IDL_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNidlecpuSub, XtCIdlecpuSub, XtRBool, sizeof(Bool),
|
|
||||||
--- 343,374 ----
|
|
||||||
XtOffsetOf(AppData, debug), XtRImmediate, (caddr_t)NULL },
|
|
||||||
{ XtNfast, XtCFast, XtRBoolean, sizeof(Boolean),
|
|
||||||
XtOffsetOf(AppData, fast), XtRImmediate, (XtPointer) NULL },
|
|
||||||
! #if __FreeBSD_version >= 220000
|
|
||||||
! { XtNsysloadAdd, XtCSysloadAdd, XtRBool, sizeof(Bool),
|
|
||||||
! XtOffsetOf(AppData, addG[SYS_LOAD]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
! { XtNsysloadSub, XtCSysloadSub, XtRBool, sizeof(Bool),
|
|
||||||
! XtOffsetOf(AppData, subG[SYS_LOAD]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
! #endif
|
|
||||||
{ XtNusercpuAdd, XtCUsercpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[USR_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNusercpuSub, XtCUsercpuSub, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, subG[USR_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { XtNnicecpuAdd, XtCNicecpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
+ XtOffsetOf(AppData, addG[NICE_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ { XtNnicecpuSub, XtCNicecpuSub, XtRBool, sizeof(Bool),
|
|
||||||
+ XtOffsetOf(AppData, subG[NICE_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ #endif
|
|
||||||
{ XtNsystemcpuAdd, XtCSystemcpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[SYS_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNsystemcpuSub, XtCSystemcpuSub, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, subG[SYS_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ { XtNintercpuAdd, XtCIntercpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
+ XtOffsetOf(AppData, addG[INT_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ { XtNintercpuSub, XtCIntercpuSub, XtRBool, sizeof(Bool),
|
|
||||||
+ XtOffsetOf(AppData, subG[INT_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
+ #endif
|
|
||||||
{ XtNidlecpuAdd, XtCIdlecpuAdd, XtRBool, sizeof(Bool),
|
|
||||||
XtOffsetOf(AppData, addG[IDL_CPU]), XtRImmediate, (XtPointer) NULL },
|
|
||||||
{ XtNidlecpuSub, XtCIdlecpuSub, XtRBool, sizeof(Bool),
|
|
||||||
***************
|
|
||||||
*** 324,329 ****
|
|
||||||
--- 410,418 ----
|
|
||||||
void
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, "\nxperfmon++ V2.0 for FreeBSD-2.2.X and 3.X\n");
|
|
||||||
+ #endif
|
|
||||||
fprintf(stderr, "\nusage: xperfmon++ option option option .....\n");
|
|
||||||
fprintf(stderr, "options:\n");
|
|
||||||
fprintf(stderr, " [-display [{host}]:[{vs}]]\n");
|
|
||||||
***************
|
|
||||||
*** 340,350 ****
|
|
||||||
fprintf(stderr, " [-fast] (changes interval from seconds to milliseconds)\n");
|
|
||||||
fprintf(stderr, " [-immediate] (background limit alarm color is based on current sample)\n");
|
|
||||||
fprintf(stderr, " [-fill] (output filled graph instead of line graph)\n\n");
|
|
||||||
!
|
|
||||||
fprintf(stderr, " [{-+}usercpu] ({remove|add} usercpu to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}systemcpu] ({remove|add} systemcpu to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}idlecpu] ({remove|add} idlecpu to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}freemem] ({remove|add} freemem to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}diskxfr] ({remove|add} disk transfers to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}interrupts] ({remove|add} interrupts to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}inputpkts] ({remove|add} input packets to list of graphs\n");
|
|
||||||
--- 429,451 ----
|
|
||||||
fprintf(stderr, " [-fast] (changes interval from seconds to milliseconds)\n");
|
|
||||||
fprintf(stderr, " [-immediate] (background limit alarm color is based on current sample)\n");
|
|
||||||
fprintf(stderr, " [-fill] (output filled graph instead of line graph)\n\n");
|
|
||||||
! #if __FreeBSD_version >= 220000
|
|
||||||
! fprintf(stderr, " [{-+}sysload] ({remove|add} sysload to list of graphs\n");
|
|
||||||
! #endif
|
|
||||||
fprintf(stderr, " [{-+}usercpu] ({remove|add} usercpu to list of graphs\n");
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, " [{-+}nicecpu] ({remove|add} nicecpu to list of graphs\n");
|
|
||||||
+ #endif
|
|
||||||
fprintf(stderr, " [{-+}systemcpu] ({remove|add} systemcpu to list of graphs\n");
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, " [{-+}intercpu] ({remove|add} intercpu to list of graphs\n");
|
|
||||||
+ #endif
|
|
||||||
fprintf(stderr, " [{-+}idlecpu] ({remove|add} idlecpu to list of graphs\n");
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, " [{-+}freeswap] ({remove|add} freeswap to list of graphs\n");
|
|
||||||
+ #else
|
|
||||||
fprintf(stderr, " [{-+}freemem] ({remove|add} freemem to list of graphs\n");
|
|
||||||
+ #endif
|
|
||||||
fprintf(stderr, " [{-+}diskxfr] ({remove|add} disk transfers to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}interrupts] ({remove|add} interrupts to list of graphs\n");
|
|
||||||
fprintf(stderr, " [{-+}inputpkts] ({remove|add} input packets to list of graphs\n");
|
|
||||||
***************
|
|
||||||
*** 361,370 ****
|
|
||||||
fprintf(stderr, " [-high*Alarm {value}] ( Set High Alarm value for *)\n");
|
|
||||||
fprintf(stderr, " [-high*Warn {value}] ( Set High Warning value for *)\n");
|
|
||||||
fprintf(stderr, " Where \"*\" is one of the following:\n");
|
|
||||||
fprintf(stderr, " [mem | user | sys | idle | disk | intrpts |\n");
|
|
||||||
! fprintf(stderr, " input | output | collision | nfsclient | nfsserver]\n");
|
|
||||||
fprintf(stderr, " For Example:\n");
|
|
||||||
fprintf(stderr, " [-lowmemAlarm {value}] ( Set low Free Memory Alarm Value)\n");
|
|
||||||
fprintf(stderr, "WARNING: It is an error condition to set both a high, and a low, limit warning or alarm.\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
--- 462,479 ----
|
|
||||||
fprintf(stderr, " [-high*Alarm {value}] ( Set High Alarm value for *)\n");
|
|
||||||
fprintf(stderr, " [-high*Warn {value}] ( Set High Warning value for *)\n");
|
|
||||||
fprintf(stderr, " Where \"*\" is one of the following:\n");
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, " [load | user | nice | sys | inter | idle | swap | disk |\n");
|
|
||||||
+ #else
|
|
||||||
fprintf(stderr, " [mem | user | sys | idle | disk | intrpts |\n");
|
|
||||||
! #endif
|
|
||||||
! fprintf(stderr, " intrpts | input | output | collision | nfsclient | nfsserver]\n");
|
|
||||||
fprintf(stderr, " For Example:\n");
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ fprintf(stderr, " [-lowswapAlarm {value}] ( Set low Free Swap Alarm Value)\n");
|
|
||||||
+ #else
|
|
||||||
fprintf(stderr, " [-lowmemAlarm {value}] ( Set low Free Memory Alarm Value)\n");
|
|
||||||
+ #endif
|
|
||||||
fprintf(stderr, "WARNING: It is an error condition to set both a high, and a low, limit warning or alarm.\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 386,391 ****
|
|
||||||
--- 495,501 ----
|
|
||||||
time(&timeStamp);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void handleResize( w, unused, event, contin2disp )
|
|
||||||
Widget w;
|
|
||||||
***************
|
|
||||||
*** 394,400 ****
|
|
||||||
Boolean *contin2disp;
|
|
||||||
{
|
|
||||||
Dimension neww, newh;
|
|
||||||
! int i;
|
|
||||||
char eventString[60];
|
|
||||||
switch (event->type) {
|
|
||||||
case Expose:
|
|
||||||
--- 504,511 ----
|
|
||||||
Boolean *contin2disp;
|
|
||||||
{
|
|
||||||
Dimension neww, newh;
|
|
||||||
! Dimension hOverHead, boxH, timeH, newWidgetH;
|
|
||||||
! int i, window_size_changed;
|
|
||||||
char eventString[60];
|
|
||||||
switch (event->type) {
|
|
||||||
case Expose:
|
|
||||||
***************
|
|
||||||
*** 403,415 ****
|
|
||||||
strcpy(eventString,"expose");
|
|
||||||
break;
|
|
||||||
case MapNotify:
|
|
||||||
! neww=0;
|
|
||||||
! newh=0;
|
|
||||||
strcpy(eventString,"map notify");
|
|
||||||
break;
|
|
||||||
case ReparentNotify:
|
|
||||||
! neww=0;
|
|
||||||
! newh=0;
|
|
||||||
strcpy(eventString,"reparent");
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
--- 514,531 ----
|
|
||||||
strcpy(eventString,"expose");
|
|
||||||
break;
|
|
||||||
case MapNotify:
|
|
||||||
! neww=w->core.width;
|
|
||||||
! newh=oldHeight;
|
|
||||||
strcpy(eventString,"map notify");
|
|
||||||
break;
|
|
||||||
+ case UnmapNotify:
|
|
||||||
+ neww=w->core.width;
|
|
||||||
+ newh=oldHeight;
|
|
||||||
+ strcpy(eventString,"unmap notify");
|
|
||||||
+ break;
|
|
||||||
case ReparentNotify:
|
|
||||||
! neww=w->core.width;
|
|
||||||
! newh=oldHeight;
|
|
||||||
strcpy(eventString,"reparent");
|
|
||||||
break;
|
|
||||||
case ConfigureNotify:
|
|
||||||
***************
|
|
||||||
*** 417,429 ****
|
|
||||||
newh=event->xconfigure.height;
|
|
||||||
strcpy(eventString,"configure");
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
! if ( neww < 250 + 10 ) {
|
|
||||||
! neww = 250 + 10;
|
|
||||||
! w->core.width = 250 + 10;
|
|
||||||
XtResizeWindow(w);
|
|
||||||
! }
|
|
||||||
if ( appData.debug )
|
|
||||||
printf("Resize Request: type=%d %s, oldw=%hu, oldh=%hu, neww=%hu, newh=%hu\n",
|
|
||||||
(int)event->type, eventString,
|
|
||||||
--- 533,567 ----
|
|
||||||
newh=event->xconfigure.height;
|
|
||||||
strcpy(eventString,"configure");
|
|
||||||
break;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
+ if ( neww < MIN_WIDTH ) {
|
|
||||||
+ neww = MIN_WIDTH;
|
|
||||||
+ w->core.width = MIN_WIDTH;
|
|
||||||
+ window_size_changed = TRUE;
|
|
||||||
+ } else {
|
|
||||||
+ w->core.width = neww;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if ( newh < MIN_HEIGHT ) {
|
|
||||||
+ newh = MIN_HEIGHT;
|
|
||||||
+ w->core.height = MIN_HEIGHT;
|
|
||||||
+ window_size_changed = TRUE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Now the graphs fit perfect into the window! */
|
|
||||||
+ hOverHead = (5.6 * appData.numGraphsOn) - (6 / appData.numGraphsOn);
|
|
||||||
+ boxH = labelBox->core.height;
|
|
||||||
+ timeH = timechart->core.height;
|
|
||||||
+ newWidgetH = (newh - (boxH+7) - (timeH+10) - hOverHead) / appData.numGraphsOn;
|
|
||||||
+ w->core.height = newWidgetH * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10);
|
|
||||||
+ if(w->core.height != newh) {
|
|
||||||
+ newh = w->core.height;
|
|
||||||
}
|
|
||||||
!
|
|
||||||
! if( neww != oldWidth || newh != oldHeight || window_size_changed == TRUE )
|
|
||||||
XtResizeWindow(w);
|
|
||||||
!
|
|
||||||
if ( appData.debug )
|
|
||||||
printf("Resize Request: type=%d %s, oldw=%hu, oldh=%hu, neww=%hu, newh=%hu\n",
|
|
||||||
(int)event->type, eventString,
|
|
||||||
***************
|
|
||||||
*** 431,441 ****
|
|
||||||
neww, newh);
|
|
||||||
|
|
||||||
if ( event->type == ConfigureNotify ) {
|
|
||||||
! /* Dimension h = perfmon[0]->core.height;*/
|
|
||||||
! Dimension hOverHead = 5 * appData.numGraphsOn;
|
|
||||||
! Dimension boxH = labelBox->core.height;
|
|
||||||
! Dimension timeH = timechart->core.height;
|
|
||||||
! Dimension newWidgetH = (newh - (boxH+8) - (timeH+10) - hOverHead) / appData.numGraphsOn;
|
|
||||||
if ( oldWidth == neww && oldHeight == newh ) return;
|
|
||||||
|
|
||||||
if ( appData.debug )
|
|
||||||
--- 569,575 ----
|
|
||||||
neww, newh);
|
|
||||||
|
|
||||||
if ( event->type == ConfigureNotify ) {
|
|
||||||
!
|
|
||||||
if ( oldWidth == neww && oldHeight == newh ) return;
|
|
||||||
|
|
||||||
if ( appData.debug )
|
|
||||||
***************
|
|
||||||
*** 455,460 ****
|
|
||||||
--- 589,595 ----
|
|
||||||
XFlush(XtDisplay(w));
|
|
||||||
|
|
||||||
}
|
|
||||||
+
|
|
||||||
oldWidth = neww+=10, oldHeight = newh;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 464,472 ****
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
Arg arg;
|
|
||||||
Pixmap icon_pixmap = None;
|
|
||||||
! Widget loadParent, pappaBox;
|
|
||||||
|
|
||||||
char *progname = argv[0];
|
|
||||||
Bool foundAnAdd = FALSE;
|
|
||||||
--- 599,611 ----
|
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
|
||||||
+ /* LK!!! */
|
|
||||||
+ Dimension timeH, newWidgetW, newWidgetH, hOverHead, boxH;
|
|
||||||
+ unsigned int w, h;
|
|
||||||
+
|
|
||||||
Arg arg;
|
|
||||||
Pixmap icon_pixmap = None;
|
|
||||||
! Widget pappaBox;
|
|
||||||
|
|
||||||
char *progname = argv[0];
|
|
||||||
Bool foundAnAdd = FALSE;
|
|
||||||
***************
|
|
||||||
*** 478,483 ****
|
|
||||||
--- 617,626 ----
|
|
||||||
optionDescList, XtNumber(optionDescList),
|
|
||||||
&argc, argv,
|
|
||||||
NULL, NULL);
|
|
||||||
+
|
|
||||||
+ appData.toplevel->core.width=MIN_WIDTH;
|
|
||||||
+ appData.toplevel->core.height=MIN_HEIGHT;
|
|
||||||
+
|
|
||||||
if (argc != 1) usage();
|
|
||||||
|
|
||||||
if ( appData.toplevel->core.depth == 1 )
|
|
||||||
***************
|
|
||||||
*** 540,561 ****
|
|
||||||
xperfmon_width, xperfmon_height));
|
|
||||||
XtSetValues(appData.toplevel, &arg, 1);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
/* create windows */
|
|
||||||
|
|
||||||
pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel,
|
|
||||||
XtNborderWidth, 0,
|
|
||||||
NULL);
|
|
||||||
-
|
|
||||||
XtOverrideTranslations(pappaBox, XtParseTranslationTable(defaultTranslations));
|
|
||||||
|
|
||||||
(void)gethostname(hostname, sizeof(hostname));
|
|
||||||
c = (char *) ((long) &hostname[0] + (int) strlen(hostname));
|
|
||||||
sprintf(c, "\nUpdate Interval = %5.1f secs", (float)(appData.interval*appData.ms_per_sec)/1000.0);
|
|
||||||
|
|
||||||
labelBox = XtVaCreateManagedWidget("LabelBox", labelWidgetClass, pappaBox,
|
|
||||||
! XtNwidth, 250,
|
|
||||||
! /* XtNheight, 16,*/
|
|
||||||
XtNjustify, XtJustifyLeft,
|
|
||||||
XtNinternalHeight, 0,
|
|
||||||
XtNtop, XtChainTop,
|
|
||||||
--- 683,734 ----
|
|
||||||
xperfmon_width, xperfmon_height));
|
|
||||||
XtSetValues(appData.toplevel, &arg, 1);
|
|
||||||
}
|
|
||||||
/* create windows */
|
|
||||||
|
|
||||||
pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel,
|
|
||||||
XtNborderWidth, 0,
|
|
||||||
NULL);
|
|
||||||
XtOverrideTranslations(pappaBox, XtParseTranslationTable(defaultTranslations));
|
|
||||||
|
|
||||||
(void)gethostname(hostname, sizeof(hostname));
|
|
||||||
c = (char *) ((long) &hostname[0] + (int) strlen(hostname));
|
|
||||||
sprintf(c, "\nUpdate Interval = %5.1f secs", (float)(appData.interval*appData.ms_per_sec)/1000.0);
|
|
||||||
|
|
||||||
+ { /* LK!!! handle -geometry option correct, also small changes in handleResize */
|
|
||||||
+ Window rwin;
|
|
||||||
+ int x,y,px,py;
|
|
||||||
+ unsigned int pw,ph,bw,d;
|
|
||||||
+
|
|
||||||
+ XtRealizeWidget(appData.toplevel);
|
|
||||||
+
|
|
||||||
+ XGetGeometry(XtDisplay(appData.toplevel),XtWindow(appData.toplevel),
|
|
||||||
+ &rwin,&x,&y,&w,&h,&bw,&d);
|
|
||||||
+
|
|
||||||
+ if ( w > MIN_WIDTH) {
|
|
||||||
+ newWidgetW = w - 10;
|
|
||||||
+ appData.toplevel->core.width = w;
|
|
||||||
+ } else {
|
|
||||||
+ appData.toplevel->core.width = MIN_WIDTH;
|
|
||||||
+ newWidgetW = MIN_WIDTH - 10;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ hOverHead = (5.6 * appData.numGraphsOn) - (6 / appData.numGraphsOn);
|
|
||||||
+ boxH = 22;
|
|
||||||
+ timeH = 12;
|
|
||||||
+ if (h > GRAPH_MIN_HEIGHT * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10))
|
|
||||||
+ newWidgetH = (h - hOverHead - (boxH+7) - (timeH+10)) / appData.numGraphsOn;
|
|
||||||
+ else
|
|
||||||
+ newWidgetH = GRAPH_MIN_HEIGHT;
|
|
||||||
+
|
|
||||||
+ MIN_HEIGHT = newWidgetH * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10);
|
|
||||||
+ appData.toplevel->core.height = MIN_HEIGHT;
|
|
||||||
+
|
|
||||||
+ XtResizeWindow(appData.toplevel);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
labelBox = XtVaCreateManagedWidget("LabelBox", labelWidgetClass, pappaBox,
|
|
||||||
! XtNwidth, newWidgetW,
|
|
||||||
! XtNheight, boxH,
|
|
||||||
XtNjustify, XtJustifyLeft,
|
|
||||||
XtNinternalHeight, 0,
|
|
||||||
XtNtop, XtChainTop,
|
|
||||||
***************
|
|
||||||
*** 570,577 ****
|
|
||||||
perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox,
|
|
||||||
XtNtopLabel, topNames[i],
|
|
||||||
XtNbotLabel, botNames[i],
|
|
||||||
! XtNwidth, 250,
|
|
||||||
! XtNheight, 36,
|
|
||||||
XtNupdate, appData.interval*appData.ms_per_sec,
|
|
||||||
XtNfillRect, (int)appData.fill,
|
|
||||||
XtNjumpScroll, 1,
|
|
||||||
--- 743,750 ----
|
|
||||||
perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox,
|
|
||||||
XtNtopLabel, topNames[i],
|
|
||||||
XtNbotLabel, botNames[i],
|
|
||||||
! XtNwidth, newWidgetW,
|
|
||||||
! XtNheight, newWidgetH,
|
|
||||||
XtNupdate, appData.interval*appData.ms_per_sec,
|
|
||||||
XtNfillRect, (int)appData.fill,
|
|
||||||
XtNjumpScroll, 1,
|
|
||||||
***************
|
|
||||||
*** 580,600 ****
|
|
||||||
}
|
|
||||||
timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox,
|
|
||||||
XtNfromVert, perfmon[1],
|
|
||||||
! XtNwidth, 250,
|
|
||||||
! XtNheight, 18,
|
|
||||||
XtNupdate, appData.interval*appData.ms_per_sec,
|
|
||||||
XtNjumpScroll, 1,
|
|
||||||
NULL);
|
|
||||||
sys_setup();
|
|
||||||
XtAddCallback(timechart, XtNgetValue, update_time_stat, NULL);
|
|
||||||
|
|
||||||
for ( i=0; i<NUM_GRAPHS; i++ )
|
|
||||||
if ( appData.graphOn[i] )
|
|
||||||
! XtAddCallback(perfmon[i], XtNgetValue, update_stat, i);
|
|
||||||
|
|
||||||
appData.interval_id = XtAppAddTimeOut(appData.app_context,
|
|
||||||
appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel);
|
|
||||||
|
|
||||||
- XtRealizeWidget(appData.toplevel);
|
|
||||||
XtAppMainLoop(appData.app_context);
|
|
||||||
}
|
|
||||||
--- 753,773 ----
|
|
||||||
}
|
|
||||||
timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox,
|
|
||||||
XtNfromVert, perfmon[1],
|
|
||||||
! XtNwidth, newWidgetW,
|
|
||||||
! XtNheight, timeH,
|
|
||||||
XtNupdate, appData.interval*appData.ms_per_sec,
|
|
||||||
XtNjumpScroll, 1,
|
|
||||||
NULL);
|
|
||||||
+
|
|
||||||
sys_setup();
|
|
||||||
XtAddCallback(timechart, XtNgetValue, update_time_stat, NULL);
|
|
||||||
|
|
||||||
for ( i=0; i<NUM_GRAPHS; i++ )
|
|
||||||
if ( appData.graphOn[i] )
|
|
||||||
! XtAddCallback(perfmon[i], XtNgetValue, update_stat, (XtPointer)i);
|
|
||||||
|
|
||||||
appData.interval_id = XtAppAddTimeOut(appData.app_context,
|
|
||||||
appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel);
|
|
||||||
|
|
||||||
XtAppMainLoop(appData.app_context);
|
|
||||||
}
|
|
|
@ -1,312 +0,0 @@
|
||||||
*** ../xperfmon++/StripCharP.h Wed Jul 27 22:29:30 1994
|
|
||||||
--- ./StripCharP.h Thu Apr 30 15:03:13 1998
|
|
||||||
***************
|
|
||||||
*** 62,71 ****
|
|
||||||
#define HIGHLIGHT 1 << 1
|
|
||||||
#define ALL_GCS (FOREGROUND | HIGHLIGHT)
|
|
||||||
|
|
||||||
/* New fields for the PerfChart widget instance record */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
! double valuedata[2048]; /* record of data points */
|
|
||||||
Pixel fgpixel; /* color index for graph */
|
|
||||||
Pixel hipixel; /* color index for lines */
|
|
||||||
Pixel warnColor;
|
|
||||||
--- 62,73 ----
|
|
||||||
#define HIGHLIGHT 1 << 1
|
|
||||||
#define ALL_GCS (FOREGROUND | HIGHLIGHT)
|
|
||||||
|
|
||||||
+ #define NUM_VALUES 2048
|
|
||||||
+
|
|
||||||
/* New fields for the PerfChart widget instance record */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
! double valuedata[NUM_VALUES]; /* record of data points */
|
|
||||||
Pixel fgpixel; /* color index for graph */
|
|
||||||
Pixel hipixel; /* color index for lines */
|
|
||||||
Pixel warnColor;
|
|
||||||
*** ../xperfmon++/TimeChart.h Wed Jul 27 22:29:31 1994
|
|
||||||
--- ./TimeChart.h Thu Apr 30 15:03:14 1998
|
|
||||||
***************
|
|
||||||
*** 88,99 ****
|
|
||||||
#define XtCFillRect "FillRect"
|
|
||||||
|
|
||||||
#define XtNgetValue "getValue"
|
|
||||||
! #define XtNhighlight "highlight"
|
|
||||||
#define XtNjumpScroll "jumpScroll"
|
|
||||||
#define XtNminScale "minScale"
|
|
||||||
#define XtNscale "scale"
|
|
||||||
#define XtNfillRect "fillRect"
|
|
||||||
! #define XtNupdate "update"
|
|
||||||
#define XtNvmunix "vmunix"
|
|
||||||
|
|
||||||
typedef struct _TimeChartRec *TimeChartWidget;
|
|
||||||
--- 88,99 ----
|
|
||||||
#define XtCFillRect "FillRect"
|
|
||||||
|
|
||||||
#define XtNgetValue "getValue"
|
|
||||||
! /* #define XtNhighlight "highlight" */
|
|
||||||
#define XtNjumpScroll "jumpScroll"
|
|
||||||
#define XtNminScale "minScale"
|
|
||||||
#define XtNscale "scale"
|
|
||||||
#define XtNfillRect "fillRect"
|
|
||||||
! /* #define XtNupdate "update" */
|
|
||||||
#define XtNvmunix "vmunix"
|
|
||||||
|
|
||||||
typedef struct _TimeChartRec *TimeChartWidget;
|
|
||||||
*** ../xperfmon++/system.h Wed Jul 27 22:29:34 1994
|
|
||||||
--- ./system.h Thu Apr 30 22:41:43 1998
|
|
||||||
***************
|
|
||||||
*** 20,26 ****
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS
|
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
||||||
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* Original Author: Emanuel Jay Berkenbilt, MIT Project Athena
|
|
||||||
--- 20,26 ----
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS
|
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
||||||
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* Original Author: Emanuel Jay Berkenbilt, MIT Project Athena
|
|
||||||
***************
|
|
||||||
*** 32,38 ****
|
|
||||||
* documentation for any purpose and without fee is hereby granted, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
! * documentation, and that the name of NASA and Sterling Software (collectively
|
|
||||||
* or individually) are not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without specific,
|
|
||||||
* written prior permission. NASA and Sterling Software makes no representations about the
|
|
||||||
--- 32,38 ----
|
|
||||||
* documentation for any purpose and without fee is hereby granted, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
! * documentation, and that the name of NASA and Sterling Software (collectively
|
|
||||||
* or individually) are not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without specific,
|
|
||||||
* written prior permission. NASA and Sterling Software makes no representations about the
|
|
||||||
***************
|
|
||||||
*** 43,49 ****
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
|
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
||||||
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* 1994 Revision
|
|
||||||
--- 43,49 ----
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
|
|
||||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
||||||
! * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*
|
|
||||||
* 1994 Revision
|
|
||||||
***************
|
|
||||||
*** 55,61 ****
|
|
||||||
|
|
||||||
/* This file information needed by both system.c and Perfmon.c */
|
|
||||||
|
|
||||||
! #define NUM_POSSIBLE_STATS 11
|
|
||||||
#define MAX_STATS NUM_POSSIBLE_STATS + 1
|
|
||||||
|
|
||||||
#define LINES_PER_LABEL 2
|
|
||||||
--- 55,65 ----
|
|
||||||
|
|
||||||
/* This file information needed by both system.c and Perfmon.c */
|
|
||||||
|
|
||||||
! #if __FreeBSD_version >= 220000
|
|
||||||
! # define NUM_POSSIBLE_STATS 14
|
|
||||||
! #else
|
|
||||||
! # define NUM_POSSIBLE_STATS 11
|
|
||||||
! #endif
|
|
||||||
#define MAX_STATS NUM_POSSIBLE_STATS + 1
|
|
||||||
|
|
||||||
#define LINES_PER_LABEL 2
|
|
||||||
***************
|
|
||||||
*** 77,93 ****
|
|
||||||
for (stat = 0; stat < num_stats; stat++)
|
|
||||||
|
|
||||||
#define NO_STAT -1
|
|
||||||
! #define USER_CPU_PERCENTAGE 0
|
|
||||||
! #define SYSTEM_CPU_PERCENTAGE 1
|
|
||||||
! #define IDLE_CPU_PERCENTAGE 2
|
|
||||||
! #define FREE_MEM 3
|
|
||||||
! #define DISK_TRANSFERS 4
|
|
||||||
! #define INTERRUPTS 5
|
|
||||||
! #define INPUT_PACKETS 6
|
|
||||||
! #define OUTPUT_PACKETS 7
|
|
||||||
! #define COLLISION_PACKETS 8
|
|
||||||
#define NFS_CLIENT_CALLS 9
|
|
||||||
#define NFS_SERVER_CALLS 10
|
|
||||||
|
|
||||||
struct statistic {
|
|
||||||
int min_val, max_val;
|
|
||||||
--- 81,114 ----
|
|
||||||
for (stat = 0; stat < num_stats; stat++)
|
|
||||||
|
|
||||||
#define NO_STAT -1
|
|
||||||
! #if __FreeBSD_version >= 220000
|
|
||||||
! #define LOAD 0
|
|
||||||
! #define USER_CPU_PERCENTAGE 1
|
|
||||||
! #define NICE_CPU_PERCENTAGE 2
|
|
||||||
! #define SYSTEM_CPU_PERCENTAGE 3
|
|
||||||
! #define INTER_CPU_PERCENTAGE 4
|
|
||||||
! #define IDLE_CPU_PERCENTAGE 5
|
|
||||||
! #define FREE_MEM 6
|
|
||||||
! #define DISK_TRANSFERS 7
|
|
||||||
! #define INTERRUPTS 8
|
|
||||||
! #define INPUT_PACKETS 9
|
|
||||||
! #define OUTPUT_PACKETS 10
|
|
||||||
! #define COLLISION_PACKETS 11
|
|
||||||
! #define NFS_CLIENT_CALLS 12
|
|
||||||
! #define NFS_SERVER_CALLS 13
|
|
||||||
! #else
|
|
||||||
! #define USER_CPU_PERCENTAGE 0
|
|
||||||
! #define SYSTEM_CPU_PERCENTAGE 1
|
|
||||||
! #define IDLE_CPU_PERCENTAGE 2
|
|
||||||
! #define FREE_MEM 3
|
|
||||||
! #define DISK_TRANSFERS 4
|
|
||||||
! #define INTERRUPTS 5
|
|
||||||
! #define INPUT_PACKETS 6
|
|
||||||
! #define OUTPUT_PACKETS 7
|
|
||||||
! #define COLLISION_PACKETS 8
|
|
||||||
#define NFS_CLIENT_CALLS 9
|
|
||||||
#define NFS_SERVER_CALLS 10
|
|
||||||
+ #endif
|
|
||||||
|
|
||||||
struct statistic {
|
|
||||||
int min_val, max_val;
|
|
||||||
***************
|
|
||||||
*** 113,118 ****
|
|
||||||
--- 134,155 ----
|
|
||||||
|
|
||||||
#define VALID_UPDATE(x) ((x <= MAX_TIME) && (x > 0))
|
|
||||||
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ #define SYS_LOAD 0
|
|
||||||
+ #define USR_CPU 1
|
|
||||||
+ #define NICE_CPU 2
|
|
||||||
+ #define SYS_CPU 3
|
|
||||||
+ #define INT_CPU 4
|
|
||||||
+ #define IDL_CPU 5
|
|
||||||
+ #define FRE_MEM 6
|
|
||||||
+ #define DSK_XFR 7
|
|
||||||
+ #define INTRPTS 8
|
|
||||||
+ #define INP_PKT 9
|
|
||||||
+ #define OUT_PKT 10
|
|
||||||
+ #define COL_PKT 11
|
|
||||||
+ #define NFS_CLT 12
|
|
||||||
+ #define NFS_SRV 13
|
|
||||||
+ #else
|
|
||||||
#define USR_CPU 0
|
|
||||||
#define SYS_CPU 1
|
|
||||||
#define IDL_CPU 2
|
|
||||||
***************
|
|
||||||
*** 124,129 ****
|
|
||||||
--- 161,167 ----
|
|
||||||
#define COL_PKT 8
|
|
||||||
#define NFS_CLT 9
|
|
||||||
#define NFS_SRV 10
|
|
||||||
+ #endif
|
|
||||||
#define LAST_ITEM NFS_SRV /* must equal last item above */
|
|
||||||
#define NUM_GRAPHS LAST_ITEM+1
|
|
||||||
|
|
||||||
***************
|
|
||||||
*** 146,168 ****
|
|
||||||
--- 184,238 ----
|
|
||||||
}AppData, *AppDataPtr;
|
|
||||||
|
|
||||||
static char *topNames[] = {
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Load",
|
|
||||||
+ #endif
|
|
||||||
"User",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Nice",
|
|
||||||
+ #endif
|
|
||||||
"System",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Interrpt",
|
|
||||||
+ #endif
|
|
||||||
"Idle",
|
|
||||||
"Free",
|
|
||||||
"Disk",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Inter-",
|
|
||||||
+ #else
|
|
||||||
"Interrupts",
|
|
||||||
+ #endif
|
|
||||||
"Input",
|
|
||||||
"Output",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Collis",
|
|
||||||
+ "NFS Clt",
|
|
||||||
+ "NFS Srv",
|
|
||||||
+ #else
|
|
||||||
"Collision",
|
|
||||||
"NFS Client",
|
|
||||||
"NFS Server",
|
|
||||||
+ #endif
|
|
||||||
};
|
|
||||||
static char *widgetLabels[] = {
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Load",
|
|
||||||
+ #endif
|
|
||||||
"User",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Nice",
|
|
||||||
+ #endif
|
|
||||||
"System",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Inter",
|
|
||||||
+ #endif
|
|
||||||
"Idle",
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "Swap",
|
|
||||||
+ #else
|
|
||||||
"Free",
|
|
||||||
+ #endif
|
|
||||||
"Disk",
|
|
||||||
"Intrpts",
|
|
||||||
"Input",
|
|
||||||
***************
|
|
||||||
*** 171,177 ****
|
|
||||||
--- 241,264 ----
|
|
||||||
"NFSClient",
|
|
||||||
"NFSServer",
|
|
||||||
};
|
|
||||||
+
|
|
||||||
static char *botNames[] = {
|
|
||||||
+ #if __FreeBSD_version >= 220000
|
|
||||||
+ "(* 100)",
|
|
||||||
+ "CPU (%)",
|
|
||||||
+ "CPU (%)",
|
|
||||||
+ "CPU (%)",
|
|
||||||
+ "CPU (%)",
|
|
||||||
+ "CPU (%)",
|
|
||||||
+ "Swap (%)",
|
|
||||||
+ "Trsf/s",
|
|
||||||
+ "rupts/s",
|
|
||||||
+ "Pkts/s",
|
|
||||||
+ "Pkts/s",
|
|
||||||
+ "Pkts/s",
|
|
||||||
+ "Calls/s",
|
|
||||||
+ "Calls/s",
|
|
||||||
+ #else
|
|
||||||
"CPU",
|
|
||||||
"CPU",
|
|
||||||
"CPU",
|
|
||||||
***************
|
|
||||||
*** 183,186 ****
|
|
||||||
--- 270,274 ----
|
|
||||||
"Packets",
|
|
||||||
"Calls",
|
|
||||||
"Calls",
|
|
||||||
+ #endif
|
|
||||||
};
|
|
|
@ -1,336 +0,0 @@
|
||||||
*** ../xperfmon++/Imakefile Wed Jul 27 22:29:29 1994
|
|
||||||
--- ./Imakefile Thu Apr 30 15:03:39 1998
|
|
||||||
***************
|
|
||||||
*** 17,31 ****
|
|
||||||
SYS_MODULE= sgi_system
|
|
||||||
#endif
|
|
||||||
|
|
||||||
! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS)
|
|
||||||
|
|
||||||
INSTPGMFLAGS = $(INSTKMEMFLAGS)
|
|
||||||
! LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB)
|
|
||||||
INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11
|
|
||||||
! # INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 -I/usr/include/bsd
|
|
||||||
! CDEBUGFLAGS = -O
|
|
||||||
! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c
|
|
||||||
! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o
|
|
||||||
|
|
||||||
ComplexProgramTarget(xperfmon++)
|
|
||||||
|
|
||||||
--- 17,38 ----
|
|
||||||
SYS_MODULE= sgi_system
|
|
||||||
#endif
|
|
||||||
|
|
||||||
! #if defined (FreeBSDArchitecture)
|
|
||||||
! FreeBSDFLAGS= -lkvm
|
|
||||||
! SYS_MODULE= freebsd_system
|
|
||||||
! CC= gcc
|
|
||||||
! EXTRA_DEFINES= -DHAVE_SYS_PARAM_H
|
|
||||||
! #endif
|
|
||||||
!
|
|
||||||
! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS) $(FreeBSDFLAGS)
|
|
||||||
|
|
||||||
INSTPGMFLAGS = $(INSTKMEMFLAGS)
|
|
||||||
! LOCAL_LIBRARIES = -lXaw -lXt -lXmu -lX11
|
|
||||||
INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11
|
|
||||||
! # SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c
|
|
||||||
! # OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o
|
|
||||||
! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c
|
|
||||||
! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o
|
|
||||||
|
|
||||||
ComplexProgramTarget(xperfmon++)
|
|
||||||
|
|
||||||
*** ../xperfmon++/README Wed Jul 27 22:29:30 1994
|
|
||||||
--- ./README Thu Apr 30 15:03:39 1998
|
|
||||||
***************
|
|
||||||
*** 18,20 ****
|
|
||||||
--- 18,58 ----
|
|
||||||
Research Center, rsmith@proteus.arc.nasa.gov. Imake will build for correct
|
|
||||||
O/S if x11r5 is fully installed in all the right places.
|
|
||||||
|
|
||||||
+
|
|
||||||
+ 3-15-95 Completely new port of systemdependent file (bsd_system.c) for FreeBSD-2.X
|
|
||||||
+ by Lars Köller @University of Rostock, Germany.
|
|
||||||
+ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de>
|
|
||||||
+
|
|
||||||
+ 8-16-95 Quick and dirty workaround of -geometry option bug.
|
|
||||||
+ But there are still some side effects when changing the geometry.
|
|
||||||
+ Fix memory leak in bsd_system.c
|
|
||||||
+ by Lars Köller @University of Rostock, Germany.
|
|
||||||
+ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de>
|
|
||||||
+
|
|
||||||
+ 30-10-95 Change 'Free Mem' graph to 'Free Swap' cause the FreeBSD memory system
|
|
||||||
+ tries to minimize the free unused amount of memory.
|
|
||||||
+ Include basic support for FreeBSD > 2.1.
|
|
||||||
+ Number of interrupts now independent from 'Update Intervall'
|
|
||||||
+ by Lars Köller @University of Rostock, Germany.
|
|
||||||
+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de>
|
|
||||||
+
|
|
||||||
+ 11-12-95 Fix -geometry bug! Now there is only a MIN_WIDTH of 185 pixels, and the
|
|
||||||
+ MIN_HEIGTH is calculates dynamically depending on the number of active
|
|
||||||
+ graphs. FreeBSD-2.X only:
|
|
||||||
+ Change 'Free Swap' graph from absolut into percent values.
|
|
||||||
+ All graphs shoud be independent of the 'Update Intervall'.
|
|
||||||
+ Modify graph labels and add unit of each graph.
|
|
||||||
+ by Lars Köller @University of Rostock, Germany.
|
|
||||||
+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de>
|
|
||||||
+
|
|
||||||
+ 5-4-96 Fix some event problems that consumes a lot of cpu power after resizing
|
|
||||||
+ (mwm) or restart of an window manager. Make xperfmon compile with
|
|
||||||
+ FreeBSD-current (2.2, changes in get_swapspace)
|
|
||||||
+ by Lars Köller @University of Rostock, Germany.
|
|
||||||
+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de>
|
|
||||||
+
|
|
||||||
+ 4-30-98 Add System Load graph
|
|
||||||
+ Add CPU Nice and Interrupt graph
|
|
||||||
+ Compiles on FreeBSD-2.2.X and 3.X
|
|
||||||
+ by Lars Köller @University of Bielefeld, Germany.
|
|
||||||
+ E-Mail: Lars.Koeller@Uni-Bielefeld.DE
|
|
||||||
*** ../xperfmon++/XPerfmon++.ad Wed Jul 27 22:29:32 1994
|
|
||||||
--- ./XPerfmon++.ad Thu Aug 13 18:58:32 1998
|
|
||||||
***************
|
|
||||||
*** 4,27 ****
|
|
||||||
! commented out, the "NFS Server" graph background will be the application
|
|
||||||
! default color, unless some other resource file has specified it.
|
|
||||||
! *PerfChart.highAlarm: 99998
|
|
||||||
*perfChartIdle.lowWarn: 10
|
|
||||||
*perfChartIdle.lowAlarm: 5
|
|
||||||
! *perfChartUser.highAlarm: 90
|
|
||||||
! *perfChartUser.highWarn: 75
|
|
||||||
! *perfChartSystem.highAlarm: 90
|
|
||||||
! *perfChartSystem.highWarn: 75
|
|
||||||
! *perfChartFree.lowWarn: 2000
|
|
||||||
! *perfChartFree.lowAlarm: 1000
|
|
||||||
! *perfChartDisk.highWarn: 25
|
|
||||||
! *perfChartDisk.highAlarm: 50
|
|
||||||
! *perfChartIntrpts.highWarn: 500
|
|
||||||
! *perfChartIntrpts.highAlarm: 750
|
|
||||||
! *perfChartInput.highWarn: 300
|
|
||||||
! *perfChartInput.highAlarm: 500
|
|
||||||
! *perfChartOutput.highWarn: 300
|
|
||||||
! *perfChartOutput.highAlarm: 500
|
|
||||||
*perfChartCollision.highWarn: 20
|
|
||||||
*perfChartCollision.highAlarm: 50
|
|
||||||
! *perfChartNFSClient.highWarn: 200
|
|
||||||
! *perfChartNFSClient.highAlarm: 400
|
|
||||||
*font: 6x13
|
|
||||||
--- 4,50 ----
|
|
||||||
! commented out, the "NFS Server" graph background will be the application
|
|
||||||
! default color, unless some other resource file has specified it.
|
|
||||||
! *PerfChart.highAlarm: 99998
|
|
||||||
+
|
|
||||||
+ ! Remember Load*100 is shown in the graph!
|
|
||||||
+ *perfChartLoad.highAlarm: 800
|
|
||||||
+ *perfChartLoad.highWarn: 400
|
|
||||||
+
|
|
||||||
+ *perfChartUser.highAlarm: 95
|
|
||||||
+ *perfChartUser.highWarn: 75
|
|
||||||
+
|
|
||||||
+ *perfChartNice.highAlarm: 75
|
|
||||||
+ *perfChartNice.highWarn: 55
|
|
||||||
+
|
|
||||||
+ *perfChartSystem.highAlarm: 40
|
|
||||||
+ *perfChartSystem.highWarn: 25
|
|
||||||
+
|
|
||||||
+ *perfChartInter.highAlarm: 40
|
|
||||||
+ *perfChartInter.highWarn: 25
|
|
||||||
+
|
|
||||||
*perfChartIdle.lowWarn: 10
|
|
||||||
*perfChartIdle.lowAlarm: 5
|
|
||||||
!
|
|
||||||
! *perfChartSwap.lowWarn: 20
|
|
||||||
! *perfChartSwap.lowAlarm: 10
|
|
||||||
!
|
|
||||||
! *perfChartDisk.highWarn: 50
|
|
||||||
! *perfChartDisk.highAlarm: 100
|
|
||||||
!
|
|
||||||
! *perfChartIntrpts.highWarn: 400
|
|
||||||
! *perfChartIntrpts.highAlarm: 600
|
|
||||||
!
|
|
||||||
! *perfChartInput.highWarn: 500
|
|
||||||
! *perfChartInput.highAlarm: 1000
|
|
||||||
!
|
|
||||||
! *perfChartOutput.highWarn: 500
|
|
||||||
! *perfChartOutput.highAlarm: 1000
|
|
||||||
!
|
|
||||||
*perfChartCollision.highWarn: 20
|
|
||||||
*perfChartCollision.highAlarm: 50
|
|
||||||
!
|
|
||||||
! *perfChartNFSClient.highWarn: 100
|
|
||||||
! *perfChartNFSClient.highAlarm: 200
|
|
||||||
!
|
|
||||||
! *perfChartNFSServer.highWarn: 100
|
|
||||||
! *perfChartNFSServer.highAlarm: 200
|
|
||||||
*font: 6x13
|
|
||||||
*** ../xperfmon++/xperfmon++.man Wed Jul 27 22:29:39 1994
|
|
||||||
--- ./xperfmon++.man Thu Apr 30 15:03:39 1998
|
|
||||||
***************
|
|
||||||
*** 85,101 ****
|
|
||||||
default list. Specifying both "-" and "+" options will produce unpredictable
|
|
||||||
results.
|
|
||||||
.TP 26
|
|
||||||
.B \-usercpu | \+usercpu
|
|
||||||
Graph percentage of \fIUser CPU Time\fP.
|
|
||||||
.TP 26
|
|
||||||
.B \-systemcpu | \+systemcpu
|
|
||||||
! Graph \fISystem\fP CPU Percentage.
|
|
||||||
.TP 26
|
|
||||||
.B \-idlecpu | \+idlecpu
|
|
||||||
! Graph \fIIdle\fP CPU Percentage.
|
|
||||||
.TP 26
|
|
||||||
! .B \-freemem | \+freemem
|
|
||||||
! Graph \fIFree Memory\fP.
|
|
||||||
.TP 26
|
|
||||||
.B \-diskxfr | \+diskxfr
|
|
||||||
Graph \fIDisk Transfers\fP per interval period.
|
|
||||||
--- 85,110 ----
|
|
||||||
default list. Specifying both "-" and "+" options will produce unpredictable
|
|
||||||
results.
|
|
||||||
.TP 26
|
|
||||||
+ .B \-sysload | \+sysload
|
|
||||||
+ Graph percentage of \fISystem Load\fP (avaraged over 1 minute).
|
|
||||||
+ .TP 26
|
|
||||||
.B \-usercpu | \+usercpu
|
|
||||||
Graph percentage of \fIUser CPU Time\fP.
|
|
||||||
.TP 26
|
|
||||||
+ .B \-nicecpu | \+nicecpu
|
|
||||||
+ Graph percentage of \fINice CPU Time\fP.
|
|
||||||
+ .TP 26
|
|
||||||
.B \-systemcpu | \+systemcpu
|
|
||||||
! Graph percentage of \fISystem CPU Time\fP.
|
|
||||||
! .TP 26
|
|
||||||
! .B \-intercpu | \+intercpu
|
|
||||||
! Graph percentage of \fIInterrupt CPU Time\fP.
|
|
||||||
.TP 26
|
|
||||||
.B \-idlecpu | \+idlecpu
|
|
||||||
! Graph percentage of \fIIdle CPU Time\fP.
|
|
||||||
.TP 26
|
|
||||||
! .B \-free{mem/swap} | \+free{mem/swap}
|
|
||||||
! Graph \fIFree Memory/Swap (Operating system dependent, swap for FreeBSD in %)\fP.
|
|
||||||
.TP 26
|
|
||||||
.B \-diskxfr | \+diskxfr
|
|
||||||
Graph \fIDisk Transfers\fP per interval period.
|
|
||||||
***************
|
|
||||||
*** 167,183 ****
|
|
||||||
.PP
|
|
||||||
Where "*" is one of the following:
|
|
||||||
.TP 12
|
|
||||||
.B user
|
|
||||||
Set \fIlimit\fP value for User CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
.B sys
|
|
||||||
Set \fIlimit\fP value for System CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
.B idle
|
|
||||||
Set \fIlimit\fP value for Idle CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
! .B mem
|
|
||||||
! Set \fIlimit\fP value for Free Memory.
|
|
||||||
.TP 12
|
|
||||||
.B disk
|
|
||||||
Set \fIlimit\fP value for Disk Transfers.
|
|
||||||
--- 176,201 ----
|
|
||||||
.PP
|
|
||||||
Where "*" is one of the following:
|
|
||||||
.TP 12
|
|
||||||
+ .B load
|
|
||||||
+ Set \fIlimit\fP value for Load Average (multiplied by 100!!!).
|
|
||||||
+ .TP 12
|
|
||||||
.B user
|
|
||||||
Set \fIlimit\fP value for User CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
+ .B nice
|
|
||||||
+ Set \fIlimit\fP value for Nice CPU Percentage.
|
|
||||||
+ .TP 12
|
|
||||||
.B sys
|
|
||||||
Set \fIlimit\fP value for System CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
+ .B inter
|
|
||||||
+ Set \fIlimit\fP value for Interrupt CPU Percentage.
|
|
||||||
+ .TP 12
|
|
||||||
.B idle
|
|
||||||
Set \fIlimit\fP value for Idle CPU Percentage.
|
|
||||||
.TP 12
|
|
||||||
! .B mem/swap
|
|
||||||
! Set \fIlimit\fP value for Free Memory/Swap (OS dependent, swap for FreeBSD).
|
|
||||||
.TP 12
|
|
||||||
.B disk
|
|
||||||
Set \fIlimit\fP value for Disk Transfers.
|
|
||||||
***************
|
|
||||||
*** 304,320 ****
|
|
||||||
.PP
|
|
||||||
Where "&" is one of the following (Note: \fICase\fP IS important):
|
|
||||||
.TP 16
|
|
||||||
! .B Idle
|
|
||||||
! Set Idle CPU Percentage resource.
|
|
||||||
.TP 16
|
|
||||||
.B User
|
|
||||||
Set User CPU Percentage resource.
|
|
||||||
.TP 16
|
|
||||||
.B System
|
|
||||||
Set System CPU Percentage resource.
|
|
||||||
.TP 16
|
|
||||||
! .B Free
|
|
||||||
! Set Free Memory resource.
|
|
||||||
.TP 16
|
|
||||||
.B Disk
|
|
||||||
Set Disk Transfer count resource.
|
|
||||||
--- 322,347 ----
|
|
||||||
.PP
|
|
||||||
Where "&" is one of the following (Note: \fICase\fP IS important):
|
|
||||||
.TP 16
|
|
||||||
! .B Load
|
|
||||||
! Set System Load resource.
|
|
||||||
.TP 16
|
|
||||||
.B User
|
|
||||||
Set User CPU Percentage resource.
|
|
||||||
.TP 16
|
|
||||||
+ .B Nice
|
|
||||||
+ Set Nice CPU Percentage resource.
|
|
||||||
+ .TP 16
|
|
||||||
.B System
|
|
||||||
Set System CPU Percentage resource.
|
|
||||||
.TP 16
|
|
||||||
! .B Inter
|
|
||||||
! Set Interrupt CPU Percentage resource.
|
|
||||||
! .TP 16
|
|
||||||
! .B Idle
|
|
||||||
! Set Idle CPU Percentage resource.
|
|
||||||
! .TP 16
|
|
||||||
! .B Free/Swap
|
|
||||||
! Set Free Memory/Swap resource.
|
|
||||||
.TP 16
|
|
||||||
.B Disk
|
|
||||||
Set Disk Transfer count resource.
|
|
||||||
***************
|
|
||||||
*** 394,398 ****
|
|
||||||
--- 421,449 ----
|
|
||||||
out there would like to port this program to any other operating system or architecture I would be
|
|
||||||
glad to incorporate the modifications into this master copy. Send me your changes via E-Mail at the
|
|
||||||
above address.
|
|
||||||
+ .PP
|
|
||||||
+ .I xperfmon++ V1.2 for FreeBSD
|
|
||||||
+ was written by Lars Köller with a lot of helpful notes by Jörg Wunsch.
|
|
||||||
+ .PP
|
|
||||||
+ .I xperfmon++ V1.31 for FreeBSD
|
|
||||||
+ close some memory leaks, fix geometry (resize) bug, display free swap
|
|
||||||
+ without resizing of graph in percent.
|
|
||||||
+ .PP
|
|
||||||
+ .I xperfmon++ V1.33 for FreeBSD
|
|
||||||
+ contains some fixes due to event problems and compiles fine under
|
|
||||||
+ FreeBSD 2.2 (changes in get_swapspace).
|
|
||||||
+ Now the -geometry switch works well!
|
|
||||||
+ .PP
|
|
||||||
+ .I xperfmon++ V1.40 for FreeBSD
|
|
||||||
+ contains some fixes due to changes in the networking structs and
|
|
||||||
+ cleans up the FreeBSD version number #if's. Now it should compile fine
|
|
||||||
+ from FreeBSD 2.0 up to FreeBSD-3.0-current.
|
|
||||||
+ .PP
|
|
||||||
+ .I xperfmon++ V2.0 for FreeBSD 2.2.X and 3.0
|
|
||||||
+ added System Load, Nice and Interrupt CPU graphs.
|
|
||||||
+ Should compile fine from FreeBSD 2.2 up to FreeBSD-3.0-current.
|
|
||||||
+ .PP
|
|
||||||
+ Please E-Mail any bugs or comments with the subject
|
|
||||||
+ "xperfmon++: ..." to Lars.Koeller@Uni-Bielefeld.DE.
|
|
||||||
.PP
|
|
||||||
Enjoy!
|
|
|
@ -1,7 +0,0 @@
|
||||||
This package contains xperfmon++ V2.0 a X based system performance meter.
|
|
||||||
|
|
||||||
The program monitors:
|
|
||||||
system load, user-, nice-, system-, interrupt-, idle-cputime,
|
|
||||||
free swap, disk io, number of interrupts,
|
|
||||||
network-input, -output, -collision packets and
|
|
||||||
NFS client and server activity.
|
|
|
@ -1,2 +0,0 @@
|
||||||
bin/xperfmon++
|
|
||||||
lib/X11/app-defaults/XPerfmon++
|
|
3
sysutils/xperfmon/scripts/configure
vendored
3
sysutils/xperfmon/scripts/configure
vendored
|
@ -1,3 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
cp ${FILESDIR}/freebsd_system.c ${WRKSRC}/freebsd_system.c
|
|
Loading…
Add table
Reference in a new issue