X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Finfofile.h;h=e1ce4829f32d28d79d888dffe4d2ab6c6f032ed4;hb=e6f5b6ec8d303807a43534a2a33cc9640b8d2972;hp=813d816656f015b6db58e4000cdd601b70193d45;hpb=3ab887b9bc819a846c75dd7f2ee5d41fac22b19f;p=debian%2Famanda diff --git a/server-src/infofile.h b/server-src/infofile.h index 813d816..e1ce482 100644 --- a/server-src/infofile.h +++ b/server-src/infofile.h @@ -25,7 +25,7 @@ * University of Maryland at College Park */ /* - * $Id: infofile.h,v 1.7.4.4 1998/12/03 03:02:45 martinea Exp $ + * $Id: infofile.h,v 1.14 2006/05/25 01:47:20 johnfranks Exp $ * * interface for current info file reading code */ @@ -39,22 +39,31 @@ #define EPOCH ((time_t)0) #define AVG_COUNT 3 +#define NB_HISTORY 100 #define newperf(ary,f) ( ary[2]=ary[1], ary[1]=ary[0], ary[0]=(f) ) typedef struct stats_s { /* fields updated by dumper */ - long size; /* original size of dump in kbytes */ - long csize; /* compressed size of dump in kbytes */ - long secs; /* time of dump in secs */ + off_t size; /* original size of dump in kbytes */ + off_t csize; /* compressed size of dump in kbytes */ + time_t secs; /* time of dump in secs */ time_t date; /* end time of dump */ /* fields updated by taper */ - int filenum; /* file number on tape */ + off_t filenum; /* file number on tape */ char label[MAX_LABEL]; /* tape label */ } stats_t; +typedef struct history_s { + int level; /* level of dump */ + off_t size; /* original size of dump in kbytes */ + off_t csize; /* compressed size of dump in kbytes */ + time_t date; /* time of dump */ + time_t secs; /* time of dump in secs */ +} history_t; + typedef struct perf_s { - float rate[AVG_COUNT]; - float comp[AVG_COUNT]; + double rate[AVG_COUNT]; + double comp[AVG_COUNT]; } perf_t; typedef struct info_s { @@ -67,20 +76,17 @@ typedef struct info_s { perf_t incr; stats_t inf[DUMP_LEVELS]; int last_level, consecutive_runs; + history_t history[NB_HISTORY+1]; } info_t; -int open_infofile P((char *infofile)); -void close_infofile P((void)); +int open_infofile(char *infofile); +void close_infofile(void); -char *get_dumpdate P((info_t *info, int level)); -double perf_average P((float *array, double def)); -int get_info P((char *hostname, char *diskname, info_t *info)); -int get_firstkey P((char *hostname, int hostname_size, - char *diskname, int diskname_size)); -int get_nextkey P((char *hostname, int hostname_size, - char *diskname, int diskname_size)); -int put_info P((char *hostname, char *diskname, info_t *info)); -int del_info P((char *hostname, char *diskname)); +char *get_dumpdate(info_t *info, int level); +double perf_average(double *array, double def); +int get_info(char *hostname, char *diskname, info_t *info); +int put_info(char *hostname, char *diskname, info_t *info); +int del_info(char *hostname, char *diskname); #endif /* ! INFOFILE_H */