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
|
<?php
# Collectd NFS plugin
require_once 'conf/common.inc.php';
require_once 'type/GenericStacked.class.php';
# Check http://github.com/octo/collectd/blob/master/src/nfs.c
## LAYOUT
# nfs-XX/nfs_procedure-YY.rrd
$obj = new Type_GenericStacked($CONFIG, $_GET);
$obj->data_sources = array('value');
switch($obj->args['pinstance']) {
case 'v2client':
$obj->order = array('create', 'fsstat', 'getattr', 'link', 'lookup', 'mkdir', 'null', 'readdir', 'readlink', 'read', 'remove', 'rename', 'rmdir', 'root', 'setattr', 'symlink', 'wrcache', 'write');
break;
case 'v3client':
$obj->order = array('access', 'commit', 'create', 'fsinfo', 'fsstat', 'getattr', 'link', 'lookup', 'mkdir', 'mknod', 'null', 'pathconf', 'read', 'readdir', 'readdirplus', 'readlink', 'remove', 'rename', 'rmdir', 'setattr', 'symlink', 'write');
break;
}
$obj->rrd_title = sprintf('NFS-%s Procedures', $obj->args['pinstance']);
$obj->rrd_vertical = 'Procedures';
$obj->rrd_format = '%5.2lf';
$obj->rrd_graph();
|