Xref: utzoo comp.windows.x:35375 comp.sys.encore:911 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!augean.ua.OZ.AU!flinders!lennon!clapton!cwilson From: cwilson@clapton.austek.oz (Chris Wilson) Newsgroups: comp.windows.x,comp.sys.encore Subject: xmeter on Umax BSD Keywords: xmeter multimax encore Message-ID: <103@clapton.austek.oz> Date: 17 Apr 91 07:03:43 GMT Organization: Austek Microsystems, Adelaide, South Australia Lines: 63 Has anyone managed to get xmeter running on an Encore Multimax running BSD 4.3. It compiles and runs without errors but displays all hosts (including itself) as down. This problem appears to be in the routine getmeter which always get the return status RPC_TIMEDOUT from the clnt_call routine. I'm a complete rpc novice so I don't know where to start fixing this problem. Any help would be appreciated. The getmeter routine is included below. Regards, Chris Wilson Austek Microsystems Pty. Ltd., Technology Park, Adelaide, SA 5095 Australia ACSnet: cwilson@austek.oz Internet: cwilson@austek.oz.au UUCP: uunet.uu.net!munnari!austek.oz.au!cwilson /* * getmeter - Executes rstat(3) call to read statistics for specified host. * I do all the rpc junk myself so that I have better control over timeouts * than rstat(3) gives me. If we're watching multiple stats * on the same host I only do one rstat(3) call (refcnt and curcnt are * used for this). */ int getmeter (h) register METER *h; { enum clnt_stat cs; register SHMETER *sh; int p; sh = h->sh; if (sh->curcnt >= sh->refcnt) sh->curcnt = 0; if (!sh->curcnt++) { if (sh->clnt == NULL) { if ((p = getport (h)) < 0) return (-1); sh->addr.sin_port = p; sh->s = RPC_ANYSOCK; if (!(sh->clnt = clntudp_create(&sh->addr, RSTATPROG, RSTATVERS_TIME, ptto, &sh->s))) return (-1); sh->first = 1; sh->idx = 0; } else { sh->first = 0; sh->idx ^= 1; } cs = clnt_call (sh->clnt, RSTATPROC_STATS, xdr_void, 0, xdr_statstime, &sh->st[sh->idx], tto); /* Bad status RPC_TIMEDOUT always returned here */ if (cs != RPC_SUCCESS) { clnt_destroy (sh->clnt); close (sh->s); /* Some clnt_destroy's don't do this */ sh->clnt = NULL; return (-1); } } return (sh->first ? 0 : sh->clnt == NULL ? -1 : (sd[h->stat].val) (h)); }