[SIGAR-64] nfs metric bindings

This commit is contained in:
Doug MacEachern 2007-07-26 06:48:35 +00:00
parent 58b300996b
commit 103440f8c0
3 changed files with 152 additions and 0 deletions

View File

@ -34,6 +34,126 @@ sub hash {
#this script generates jni code and java classes for the following table
my $nfs_v2 = [
{
name => 'getattr', type => 'Long',
},
{
name => 'setattr', type => 'Long',
},
{
name => 'root', type => 'Long',
},
{
name => 'lookup', type => 'Long',
},
{
name => 'readlink', type => 'Long',
},
{
name => 'read', type => 'Long',
},
{
name => 'writecache', type => 'Long',
},
{
name => 'write', type => 'Long',
},
{
name => 'create', type => 'Long',
},
{
name => 'remove', type => 'Long',
},
{
name => 'rename', type => 'Long',
},
{
name => 'link', type => 'Long',
},
{
name => 'symlink', type => 'Long',
},
{
name => 'mkdir', type => 'Long',
},
{
name => 'rmdir', type => 'Long',
},
{
name => 'readdir', type => 'Long',
},
{
name => 'fsstat', type => 'Long',
},
];
my $nfs_v3 = [
{
name => 'getattr', type => 'Long',
},
{
name => 'setattr', type => 'Long',
},
{
name => 'lookup', type => 'Long',
},
{
name => 'access', type => 'Long',
},
{
name => 'readlink', type => 'Long',
},
{
name => 'read', type => 'Long',
},
{
name => 'write', type => 'Long',
},
{
name => 'create', type => 'Long',
},
{
name => 'mkdir', type => 'Long',
},
{
name => 'symlink', type => 'Long',
},
{
name => 'mknod', type => 'Long',
},
{
name => 'remove', type => 'Long',
},
{
name => 'rmdir', type => 'Long',
},
{
name => 'rename', type => 'Long',
},
{
name => 'link', type => 'Long',
},
{
name => 'readdir', type => 'Long',
},
{
name => 'readdirplus', type => 'Long',
},
{
name => 'fsstat', type => 'Long',
},
{
name => 'fsinfo', type => 'Long',
},
{
name => 'pathconf', type => 'Long',
},
{
name => 'commit', type => 'Long',
},
];
my %classes = (
Mem => [
{
@ -954,6 +1074,10 @@ my %classes = (
plat => ''
},
],
NfsClientV2 => $nfs_v2,
NfsServerV2 => $nfs_v2,
NfsClientV3 => $nfs_v3,
NfsServerV3 => $nfs_v3,
ResourceLimit => [
{
name => 'cpu_cur',

View File

@ -786,6 +786,26 @@ public class Sigar implements SigarProxy {
return TcpStat.fetch(this);
}
public NfsClientV2 getNfsClientV2()
throws SigarException {
return NfsClientV2.fetch(this);
}
public NfsServerV2 getNfsServerV2()
throws SigarException {
return NfsServerV2.fetch(this);
}
public NfsClientV3 getNfsClientV3()
throws SigarException {
return NfsClientV3.fetch(this);
}
public NfsServerV3 getNfsServerV3()
throws SigarException {
return NfsServerV3.fetch(this);
}
/**
* Get general network info.
* @exception SigarException on failure.

View File

@ -159,6 +159,14 @@ public interface SigarProxy {
public TcpStat getTcpStat() throws SigarException;
public NfsClientV2 getNfsClientV2() throws SigarException;
public NfsServerV2 getNfsServerV2() throws SigarException;
public NfsClientV3 getNfsClientV3() throws SigarException;
public NfsServerV3 getNfsServerV3() throws SigarException;
public NetInfo getNetInfo() throws SigarException;
public String getFQDN() throws SigarException;