* perfmon, and rstat
@ 1995-03-13 13:16 judith
0 siblings, 0 replies; only message in thread
From: judith @ 1995-03-13 13:16 UTC (permalink / raw)
To: tru64-unix-managers
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 <rpcsvc/rstat.h>
:
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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-03-13 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-13 13:16 perfmon, and rstat judith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox