This repository was archived by the owner on Jun 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import syslog
88import sys
99
10+ def test_proc3 ( p_file ):
11+
12+ """
13+ Check if <p_file> contains keyword 'proc3'
14+ """
15+
16+ p_fd = open ( p_file )
17+
18+ p_contents = p_fd .read ()
19+
20+ p_fd .close ()
21+
22+ m = re .search (".*proc3.*" , p_contents , flags = re .MULTILINE )
23+
24+ if not m :
25+ return False
26+ else :
27+ return True
28+
1029verboselevel = 0
1130descriptors = [ ]
1231old_values = { }
1332# What we want ganglia to monitor, where to find it, how to extract it, ...
1433configtable = [
1534 {
1635 'group' : 'nfs_client' ,
17- 'tests' : [ 'stat.S_ISREG(os.stat("/proc/net/rpc/nfs").st_mode)' ],
36+ 'tests' : [ 'stat.S_ISREG(os.stat("/proc/net/rpc/nfs").st_mode)' , 'test_proc3("/proc/net/rpc/nfs")' ],
1837 'prefix' : 'nfs_v3_' ,
1938 # The next 4 lines can be at the 'group' level or the 'name' level
2039 'file' : '/proc/net/rpc/nfs' ,
4766 },
4867 {
4968 'group' : 'nfs_server' ,
50- 'tests' : [ 'stat.S_ISREG(os.stat("/proc/net/rpc/nfsd").st_mode)' ],
69+ 'tests' : [ 'stat.S_ISREG(os.stat("/proc/net/rpc/nfsd").st_mode)' , 'test_proc3("/proc/net/rpc/nfsd")' ],
5170 'prefix' : 'nfsd_v3_' ,
5271 # The next 4 lines can be at the 'group' level or the 'name' level
5372 'file' : '/proc/net/rpc/nfsd' ,
You can’t perform that action at this time.
0 commit comments