# Path: collectors/lib/utils.py
# PY3 = sys.version_info[0] > 2
# USER = "nobody"
# def drop_privileges(user=USER):
# def is_sockfile(path):
# def err(msg):
#     def is_numeric(value):
#     def is_numeric(value):


import sys
import time
from collectors.lib import utils
        "lock", "lockt", "locku", "access", "getattr", "lookup", "lookup_root",
        "remove", "rename", "link", "symlink", "create", "pathconf", "statfs",
        "readlink", "readdir", "server_caps", "delegreturn", "getacl", "setacl",
        "fs_locations", "rel_lkowner", "secinfo", "fsid_present",
        # nfsv4.1 client ops
        "exchange_id", "create_ses", "destroy_ses", "sequence", "get_lease_t",
        "reclaim_comp", "layoutget", "getdevinfo", "layoutcommit", "layoutreturn",
        "secinfo_no", "test_stateid", "free_stateid",
        "getdevicelist", "bind_conn_to_ses", "destroy_clientid",
        # nfsv4.2 clientops
        "seek", "allocate", "deallocate", "layoutstats", "clone"
    ),
    "proc3": (
        "null", "getattr", "setattr", "lookup", "access", "readlink",
        "read", "write", "create", "mkdir", "symlink", "mknod",
        "remove", "rmdir", "rename", "link", "readdir", "readdirplus",
        "fsstat", "fsinfo", "pathconf", "commit",
    ),
}


def main():
    """nfsstat main loop"""

    try:
        f_nfs = open("/proc/net/rpc/nfs")
    except IOError as e:
        print("Failed to open input file: %s" % (e,), file=sys.stderr)
        return 13  # Ask tcollector to not re-start us immediately.


# Path: collectors/lib/utils.py
# PY3 = sys.version_info[0] > 2
# USER = "nobody"
# def drop_privileges(user=USER):
# def is_sockfile(path):
# def err(msg):
#     def is_numeric(value):
#     def is_numeric(value):


# Path: collectors/0/nfsstat.py
import sys
import time
from collectors.lib import utils

        "lock", "lockt", "locku", "access", "getattr", "lookup", "lookup_root",
        "remove", "rename", "link", "symlink", "create", "pathconf", "statfs",
        "readlink", "readdir", "server_caps", "delegreturn", "getacl", "setacl",
        "fs_locations", "rel_lkowner", "secinfo", "fsid_present",
        # nfsv4.1 client ops
        "exchange_id", "create_ses", "destroy_ses", "sequence", "get_lease_t",
        "reclaim_comp", "layoutget", "getdevinfo", "layoutcommit", "layoutreturn",
        "secinfo_no", "test_stateid", "free_stateid",
        "getdevicelist", "bind_conn_to_ses", "destroy_clientid",
        # nfsv4.2 clientops
        "seek", "allocate", "deallocate", "layoutstats", "clone"
    ),
    "proc3": (
        "null", "getattr", "setattr", "lookup", "access", "readlink",
        "read", "write", "create", "mkdir", "symlink", "mknod",
        "remove", "rmdir", "rename", "link", "readdir", "readdirplus",
        "fsstat", "fsinfo", "pathconf", "commit",
    ),
}


def main():
    """nfsstat main loop"""

    try:
        f_nfs = open("/proc/net/rpc/nfs")
    except IOError as e:
        print("Failed to open input file: %s" % (e,), file=sys.stderr)
        return 13  # Ask tcollector to not re-start us immediately.


    utils.drop_privileges()