3 * Author: Melissa Howland <melissa.howland@us.ibm.com>
5 * Copyright IBM Corp. 2006.
7 * Definitions used by mon_fsstatd.
11 #ifndef __mon_fsstatd_h__
12 #define __mon_fsstatd_h__
15 #include <linux/types.h>
16 #include <sys/ioctl.h>
17 #include "../include/zt_common.h"
19 /* mon_function values */
20 #define MONWRITE_START_INTERVAL 0x00 /* start interval recording */
21 #define MONWRITE_STOP_INTERVAL 0x01 /* stop interval or config recording */
23 #define MAX_REC_LEN 4010
24 #define MAX_NAMES_LEN 3900
25 #define MAX_NAME_LEN 1800
26 #define MAX_DIR_LEN 1800
27 #define MAX_TYPE_LEN 256
28 #define FSSTATD_APPLID 0x01
29 /* Assume usually lengths of name, dir and type <= 512 bytes total */
30 #define SMALL_MON_RECORD_LEN 602
31 #define LARGE_MON_RECORD_LEN 4010
34 unsigned char mon_function
;
35 unsigned short applid
;
36 unsigned char record_num
;
37 unsigned short version
;
38 unsigned short release
;
39 unsigned short mod_level
;
40 unsigned short datalen
;
43 } __attribute__((packed
));
47 __u16 fsstat_data_len
;
48 __u16 fsstat_data_offset
;
49 } __attribute__((packed
));
63 static struct option options
[] = {
64 {"help", no_argument
, NULL
, 'h'},
65 {"version", no_argument
, NULL
, 'v'},
66 {"attach", no_argument
, NULL
, 'a'},
67 {"interval", required_argument
, NULL
, 'i'},
71 static const char opt_string
[] = "+hvai:";
73 static const char help_text
[] =
74 "mon_fsstatd: Daemon that writes file system utilization information\n"
75 "to the z/VM monitor stream.\n"
77 "Usage: mon_fstatd [OPTIONS]\n"
80 "-h, --help Print this help, then exit\n"
81 "-v, --version Print version information, then exit\n"
82 "-a, --attach Run in foreground\n"
83 "-i, --interval=<seconds> Sample interval\n";