From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075318306520.tru64-unix-managers.marc@archive.invalid> From: judith () npac ! syr ! edu Date: Mon, 13 Mar 1995 13:16:53 +0000 To: tru64-unix-managers Subject: perfmon, and rstat X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075318306520 I have a user who wants to use the rstat system call to get statistics across the network from an alpha, to be displayed on some other unix box. He's modeled his code on "perfmon", using calls to rstat to startup rstatds on the nodes to be watched. We were able to get rstatd sort of running by uncommenting its entry in /etc/inetd.conf and restarting inetd, but when I try to access the node from another node, using the code, I get: Nodename: Permission denied Any ideas as to what to tweak to allow startup of rstatd by a user, remotely? I'll append the gist of the code at the bottom (with much deleted for brevity - just saved references to rstat, mostly) Many thanks in advance... Judith Reed judith@npac.syr.edu systems@npac.syr.edu ***************************************************************************** : #include : char **hosts; struct statstime *orig, *new; struct mystat { int usr; int sys; int pkt; int page; int disk; } *save; int secs; int n; : catch() {} main(ac, av) char **av; { int i; char *calloc(); struct itimerval it; time_t clock; if (isdigit(av[ac - 1][0])) { secs = atoi(av[ac - 1]); ac--; } else { secs = SLPDEFAULT; } hosts = (char**)calloc(ac, sizeof(char *)); orig = (struct statstime*)calloc(ac, sizeof(struct statstime)); new = (struct statstime*)calloc(ac, sizeof(struct statstime)); save = (struct mystat*)calloc(ac, sizeof(struct mystat)); /* * Go through it once to fire up all the rstatd's. */ for (i = 1; i < ac; ++i) { if (rstat(av[i], &orig[i - 1]) == 0) { hosts[n++] = av[i]; } else { perror(av[i]); exit(1); } } : for (i = 0; i < ac - 1; ++i) { rstat(hosts[i], &orig[i]); } : getstats(i) { int y, u, s, d, pkt, pg, pos; if (rstat(hosts[i], &new[i]) != 0) { perror(hosts[i]); exit(1); }