summaryrefslogtreecommitdiff
path: root/src/pmdas/gfs2/pmdagfs2.h
blob: f897d13e8ad8bf94acee8805dac9e02e553bd9da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Global Filesystem v2 (GFS2) PMDA
 *
 * Copyright (c) 2013 - 2014 Red Hat.
 * 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

#ifndef PMDAGFS2_H
#define PMDAGFS2_H

#include "glocks.h"
#include "sbstats.h"
#include "glstats.h"
#include "worst_glock.h"
#include "ftrace.h"
#include "latency.h"
#include "control.h"

enum {
	CLUSTER_GLOCKS = 0,	/* 0 - /sys/kernel/debug/gfs2/<fs>/glocks */
	CLUSTER_SBSTATS,	/* 1 - /sys/kernel/debug/gfs2/<fs>/sbstats */
	CLUSTER_GLSTATS,	/* 2 - /sys/kernel/debug/gfs2/<fs>/glstats */
        CLUSTER_TRACEPOINTS,	/* 3 - /sys/kernel/debug/tracing/events/gfs2/ */
        CLUSTER_WORSTGLOCK,     /* 4 - Custom metric for worst glock */
	CLUSTER_LATENCY,	/* 5 - Custom metric for working out latency of filesystem operations */
        CLUSTER_CONTROL,        /* 6 - Control for specific tracepoint enabling (for installs without all of the GFS2 tracepoints) */
	NUM_CLUSTERS
};

enum {
	GFS_FS_INDOM = 0,       /* 0 -- mounted gfs filesystem names */
	NUM_INDOMS
};

struct gfs2_fs {
        dev_t              dev_id;
	struct glocks      glocks;
	struct sbstats     sbstats;
        struct glstats     glstats;
        struct ftrace      ftrace;
        struct worst_glock worst_glock;
        struct latency     latency;
};

extern pmdaMetric metrictable[];
extern int metrictable_size();

#endif	/*PMDAGFS2_H*/