Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/src/collectd/collectd.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include "network.h"

#define	NAMELEN		28
#define	SEC2INT(s)	((s)/interval)

typedef	struct	Swap	Swap;
typedef	struct	Sysstat	Sysstat;

struct Swap {
	char*	name;
	ulong	n;
	ulong	m;
};

struct Sysstat {
	ulong	id;
	ulong	cs;
	ulong	intr;
	ulong	syscall;
	ulong	pfault;
	ulong	tlbfault;
	ulong	tlbpurge;
	ulong	load;
	ulong	idlepct;
	ulong	intrpct;
};

extern	char*	hostname;
extern	uint	interval;

void*	emalloc(ulong);
char*	estrdup(char*);
void	snooze(void);
void	wakeupall(void);

Biobuf*	readswap(Biobuf*, char*, Swap*);
Biobuf*	readsysstat(Biobuf*, char*, Sysstat*);

void	cpuproc(void*);
void	dfproc(void*);
void	interfaceproc(void*);
void	loadproc(void*);
void	memoryproc(void*);
void	swapproc(void*);
void	uptimeproc(void*);
void	usersproc(void*);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].