tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Mahendra Vallabh (Mike)" <mike () uranus ! cs ! waikato ! ac ! nz>
To: tru64-unix-managers
Subject: Remote Procedure Calls (RPC's)
Date: Sun, 13 Aug 1995 21:38:04 +0000	[thread overview]
Message-ID: <96075322406557.tru64-unix-managers.marc@archive.invalid> (raw)

Hi there,

Can anyone out there help me with the following code segment?
I have a lecturer who is trying to measure ``load'' on several
various machines.  Here's what he is trying to do:

/* rload
 * 
 * Gives the load on a remote host.
    cc [ flag ... ] file ...  -lrpcsvc
 *
 */
#include "/d/pvm3/include/pvm3.h"
#include <stdio.h>
#include <rpc/rpc.h>
#include <rpcsvc/rstat.h>
 
 
/* Proto - can't find a system one */ 
enum clnt_stat rstat(char *host, struct statstime *statp);
 
int
main(int ac, char **av) {
    int nhosts;
    enum clnt_stat      cstat;
    struct statstime    stats;
    float * load;
    nhosts = 1;
    load = (float *)malloc(nhosts*sizeof(float));
 
    cstat = rstat(av[1], &stats);
 
    if (cstat != RPC_SUCCESS) {
        clnt_perrno(cstat);
        exit (cstat);
    }
    load[0]=(float)stats.avenrun[0];
 
    printf ("%f\n", load[0]); 
    free(load);
    exit(0);
 }
 
This code compiles fine on a Sun Sparcstation 2 (Solaris 2.4) and our Alpha
Box (OSF/1 v3.0).  However the program won't run on the Alpha.

ie,
rload.alpha is the alpha binary
rload.sun   is the sun binary

On the Alpha:

  rload.alpha sunhost    works
  rload.alpha alphahost  results in the following error

  cstat returns 15
  RPC: Program not registered

On the Sun:

  rload.sun sunhost   works
  rload.sun alphahost results in the following error

  cstat returns 12
  RPC: Remote system error

So.... are RPC's on an Alpha different from those on a Sun???

Mike

                 reply	other threads:[~1995-08-13 21:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox