/*************************************************/
/*Title:    sysctrl.h                            */
/*Descr:                                         */
/*Author:   Liang Hanxi                          */
/*Create:   2002-4-5                             */
/*Modify:   2002-6-25                            */
/*************************************************/

#ifndef __SYSCTRL__H
#define __SYSCTRL__H

#include "time.h"
#include <sys/vfs.h>
#include <errno.h>
#include <mntent.h>
#include <sys/sysinfo.h>
#include "heartbeat.h"

#define SYS_T_report	50*60*1	//1min

#define MAX_PARTITION_NUM 16

typedef struct partition
{
	char mountpoint_path[16];
	DWORD used_space;
	DWORD total_space;
}partition;

typedef struct hb_sysinfo{
	DWORD			up_time;
	BYTE			idle_cpu_rate;
	DWORD			ram_total_used;
	DWORD			ram_total;
	DWORD			ram_swap_used;
	DWORD			ram_swap_total;
	DWORD			ram_buffers;
	DWORD			ram_cached;
	BYTE			pt_count;
	partition pt[MAX_PARTITION_NUM];
}hb_sysinfo;

typedef struct mnt_list
{
	char			mnt_fsname[50];
	char			mnt_dir[50];
	DWORD			total;
	DWORD			free;
	DWORD			limit;
}mnt_list;

void sysctrl_init();
void system_report();
#endif



