ftp.nice.ch/pub/next/tools/performance/NLoad.3.0.NI.bs.tar.gz#/NLoad/RPCLoadView.m

This is RPCLoadView.m in view mode; [Download] [Up]

#import <rpcsvc/rstat.h>

#import "RPCLoadView.h"
#import "NLoadCommon.h"

@implementation RPCLoadView : LoadView

extern int rstat(const char *, struct statstime *);

- initFrame:(const NXRect *) frameRect
{
	id result = [super initFrame:frameRect];
	
	update = getFloatDefault("RemoteUpdateSeconds");
	
	return result;
}

- loadAverage:(long *) vector loadScale:(int *) scale
{
	struct statstime stats;
	int i;
   
	if(rstat(hostName, &stats) != 0) return nil;

	for (i = 0; i < QUEUES; i++) vector[i] = stats.avenrun[i];
   
	*scale = FSCALE;
   
	return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.