tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Remote Procedure Calls (RPC's)
@ 1995-08-13 21:38 Mahendra Vallabh (Mike)
  0 siblings, 0 replies; only message in thread
From: Mahendra Vallabh (Mike) @ 1995-08-13 21:38 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-08-13 21:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-13 21:38 Remote Procedure Calls (RPC's) Mahendra Vallabh (Mike)

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