Exemplo n.º 1
0
    def __init__(self, argv=(), env=None, debug=False):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)
        
        """
        MuninPlugin.__init__(self, argv, env, debug)
        self._category = 'Disk IO'

        self._info = DiskIOinfo()

        self._labelDelim = {'fs': '/', 'lv': '-'}

        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)

        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)

        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
        else:
            self._partList = None

        devlist = self._info.getLVlist()
        if devlist:
            devlist.sort()
            self._lvList = ["-".join(x) for x in devlist]
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        else:
            self._lvList = None

        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)
Exemplo n.º 2
0
    def __init__(self, argv=(), env=None, debug=False):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)
        
        """
        MuninPlugin.__init__(self, argv, env, debug)
        self._category = 'Disk IO'

        self._info = DiskIOinfo()
        
        self._labelDelim = { 'fs': '/', 'lv': '-'}
        
        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)
            
        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)
            
        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
        else:
            self._partList = None
            
        devlist = self._info.getLVlist()
        if devlist:
            devlist.sort()
            self._lvList = ["-".join(x) for x in devlist]
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        else:
            self._lvList = None
        
        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)
Exemplo n.º 3
0
    def __init__(self, argv = (), env = {}):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv: List of command line arguments.
        @param env:  Dictionary of environment variables.
        
        """
        MuninPlugin.__init__(self, argv, env)

        self._info = DiskIOinfo()
        
        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)
            
        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)
            
        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
            
        devlist = self._info.getLVlist()
        if devlist:
            devlist.sort()
            self._lvList = ["-".join(x) for x in devlist]
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        
        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)
Exemplo n.º 4
0
class MuninDiskIOplugin(MuninPlugin):
    """Multigraph Munin Plugin for monitoring Disk I/O.

    """
    plugin_name = 'diskiostats'
    isMultigraph = True

    def __init__(self, argv=(), env=None, debug=False):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)
        
        """
        MuninPlugin.__init__(self, argv, env, debug)
        self._category = 'Disk IO'

        self._info = DiskIOinfo()
        
        self._labelDelim = { 'fs': '/', 'lv': '-'}
        
        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)
            
        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)
            
        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
        else:
            self._partList = None
            
        self._lvList = self._info.getLVnameList()
        if self._lvList:
            self._lvList.sort()
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        else:
            self._lvList = None
        
        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)
        
                
    def retrieveVals(self):
        """Retrieve values for graphs."""
        if self._diskList:
            self._fetchDevAll('disk', self._diskList, 
                              self._info.getDiskStats)
        if self._mdList:
            self._fetchDevAll('md', self._mdList, 
                              self._info.getMDstats)
        if self._partList:
            self._fetchDevAll('part', self._partList, 
                              self._info.getPartitionStats) 
        if self._lvList:
            self._fetchDevAll('lv', self._lvList, 
                              self._info.getLVstats)
        self._fetchDevAll('fs', self._fsList, 
                          self._info.getFilesystemStats)
                
    def _configDevRequests(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Request stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_requests' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Requests' % titlestr, self._category,
                info='Disk I/O - %s Throughput, Read / write requests per second.' 
                     % titlestr,
                args='--base 1000 --lower-limit 0',
                vlabel='reqs/sec read (-) / write (+)', printf='%6.1lf',
                autoFixNames = True)
            for dev in devlist:
                graph.addField(dev + '_read',
                               fixLabel(dev, maxLabelLenGraphDual, 
                                        repl = '..', truncend=False,
                                        delim = self._labelDelim.get(namestr)), 
                               draw='LINE2', type='DERIVE', min=0, graph=False)
                graph.addField(dev + '_write',
                               fixLabel(dev, maxLabelLenGraphDual, 
                                        repl = '..', truncend=False,
                                        delim = self._labelDelim.get(namestr)),
                               draw='LINE2', type='DERIVE', min=0, 
                               negative=(dev + '_read'),info=dev)
            self.appendGraph(name, graph)

    def _configDevBytes(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Throughput stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_bytes' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Throughput' % titlestr, self._category,
                info='Disk I/O - %s Throughput, bytes read / written per second.'
                     % titlestr,
                args='--base 1000 --lower-limit 0', printf='%6.1lf',
                vlabel='bytes/sec read (-) / write (+)',
                autoFixNames = True)
            for dev in devlist:
                graph.addField(dev + '_read', 
                               fixLabel(dev, maxLabelLenGraphDual, 
                                        repl = '..', truncend=False,
                                        delim = self._labelDelim.get(namestr)),
                               draw='LINE2', type='DERIVE', min=0, graph=False)
                graph.addField(dev + '_write', 
                               fixLabel(dev, maxLabelLenGraphDual, 
                                        repl = '..', truncend=False,
                                        delim = self._labelDelim.get(namestr)),
                               draw='LINE2', type='DERIVE', min=0, 
                               negative=(dev + '_read'), info=dev)
            self.appendGraph(name, graph)
            
    def _configDevActive(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Queue Length.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_active' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Queue Length' % titlestr, 
                self._category,
                info='Disk I/O - Number  of I/O Operations in Progress for every %s.'
                     % titlestr,
                args='--base 1000 --lower-limit 0', printf='%6.1lf',
                autoFixNames = True)
            for dev in devlist:
                graph.addField(dev, 
                               fixLabel(dev, maxLabelLenGraphSimple, 
                                        repl = '..', truncend=False,
                                        delim = self._labelDelim.get(namestr)), 
                               draw='AREASTACK', type='GAUGE', info=dev)
            self.appendGraph(name, graph)

    def _fetchDevAll(self, namestr, devlist, statsfunc):
        """Initialize I/O stats for devices.
        
        @param namestr:   Field name component indicating device type.
        @param devlist:   List of devices.
        @param statsfunc: Function for retrieving stats for device.
        
        """
        for dev in devlist:
            stats = statsfunc(dev)
            name = 'diskio_%s_requests' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rios'])
                self.setGraphVal(name, dev + '_write', stats['wios'])
            name = 'diskio_%s_bytes' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rbytes'])
                self.setGraphVal(name, dev + '_write', stats['wbytes'])
            name = 'diskio_%s_active' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev, stats['ios_active'])
                
    def autoconf(self):
        """Implements Munin Plugin Auto-Configuration Option.
        
        @return: True if plugin can be  auto-configured, False otherwise.
                 
        """
        # If no exception is thrown during initialization, the plugin should work.
        return True
Exemplo n.º 5
0
class MuninDiskIOplugin(MuninPlugin):
    """Multigraph Munin Plugin for monitoring Disk I/O.

    """
    plugin_name = 'diskiostats'
    isMultigraph = True

    def __init__(self, argv=(), env={}, debug=False):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)
        
        """
        MuninPlugin.__init__(self, argv, env, debug)

        self._info = DiskIOinfo()

        self._labelDelim = {'fs': '/', 'lv': '-'}

        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)

        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)

        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
        else:
            self._partList = None

        devlist = self._info.getLVlist()
        if devlist:
            devlist.sort()
            self._lvList = ["-".join(x) for x in devlist]
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        else:
            self._lvList = None

        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)

    def retrieveVals(self):
        """Retrieve values for graphs."""
        if self._diskList:
            self._fetchDevAll('disk', self._diskList, self._info.getDiskStats)
        if self._mdList:
            self._fetchDevAll('md', self._mdList, self._info.getMDstats)
        if self._partList:
            self._fetchDevAll('part', self._partList,
                              self._info.getPartitionStats)
        if self._lvList:
            self._fetchDevAll('lv', self._lvList, self._info.getLVstats)
        self._fetchDevAll('fs', self._fsList, self._info.getFilesystemStats)

    def _configDevRequests(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Request stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_requests' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph(
                'Disk I/O - %s - Requests' % titlestr,
                'Disk I/O',
                info=
                'Disk I/O - %s Throughput, Read / write requests per second.' %
                titlestr,
                args='--base 1000 --lower-limit 0',
                vlabel='reqs/sec read (-) / write (+)',
                printf='%6.1lf',
                autoFixNames=True)
            for dev in devlist:
                graph.addField(dev + '_read',
                               fixLabel(dev,
                                        maxLabelLenGraphDual,
                                        repl='..',
                                        truncend=False,
                                        delim=self._labelDelim.get(namestr)),
                               draw='LINE2',
                               type='DERIVE',
                               min=0,
                               graph=False)
                graph.addField(dev + '_write',
                               fixLabel(dev,
                                        maxLabelLenGraphDual,
                                        repl='..',
                                        truncend=False,
                                        delim=self._labelDelim.get(namestr)),
                               draw='LINE2',
                               type='DERIVE',
                               min=0,
                               negative=(dev + '_read'),
                               info=dev)
            self.appendGraph(name, graph)

    def _configDevBytes(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Throughput stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_bytes' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph(
                'Disk I/O - %s - Throughput' % titlestr,
                'Disk I/O',
                info=
                'Disk I/O - %s Throughput, bytes read / written per second.' %
                titlestr,
                args='--base 1000 --lower-limit 0',
                printf='%6.1lf',
                vlabel='bytes/sec read (-) / write (+)',
                autoFixNames=True)
            for dev in devlist:
                graph.addField(dev + '_read',
                               fixLabel(dev,
                                        maxLabelLenGraphDual,
                                        repl='..',
                                        truncend=False,
                                        delim=self._labelDelim.get(namestr)),
                               draw='LINE2',
                               type='DERIVE',
                               min=0,
                               graph=False)
                graph.addField(dev + '_write',
                               fixLabel(dev,
                                        maxLabelLenGraphDual,
                                        repl='..',
                                        truncend=False,
                                        delim=self._labelDelim.get(namestr)),
                               draw='LINE2',
                               type='DERIVE',
                               min=0,
                               negative=(dev + '_read'),
                               info=dev)
            self.appendGraph(name, graph)

    def _configDevActive(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Queue Length.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_active' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph(
                'Disk I/O - %s - Queue Length' % titlestr,
                'Disk I/O',
                info=
                'Disk I/O - Number  of I/O Operations in Progress for every %s.'
                % titlestr,
                args='--base 1000 --lower-limit 0',
                printf='%6.1lf',
                autoFixNames=True)
            for dev in devlist:
                graph.addField(dev,
                               fixLabel(dev,
                                        maxLabelLenGraphSimple,
                                        repl='..',
                                        truncend=False,
                                        delim=self._labelDelim.get(namestr)),
                               draw='AREASTACK',
                               type='GAUGE',
                               info=dev)
            self.appendGraph(name, graph)

    def _fetchDevAll(self, namestr, devlist, statsfunc):
        """Initialize I/O stats for devices.
        
        @param namestr:   Field name component indicating device type.
        @param devlist:   List of devices.
        @param statsfunc: Function for retrieving stats for device.
        
        """
        for dev in devlist:
            stats = statsfunc(dev)
            name = 'diskio_%s_requests' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rios'])
                self.setGraphVal(name, dev + '_write', stats['wios'])
            name = 'diskio_%s_bytes' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rbytes'])
                self.setGraphVal(name, dev + '_write', stats['wbytes'])
            name = 'diskio_%s_active' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev, stats['ios_active'])
Exemplo n.º 6
0
class MuninDiskIOplugin(MuninPlugin):
    """Multigraph Munin Plugin for monitoring Disk I/O.

    """
    plugin_name = 'diskiostats'
    isMultigraph = True

    def __init__(self, argv = (), env = {}):
        """Populate Munin Plugin with MuninGraph instances.
        
        @param argv: List of command line arguments.
        @param env:  Dictionary of environment variables.
        
        """
        MuninPlugin.__init__(self, argv, env)

        self._info = DiskIOinfo()
        
        self._diskList = self._info.getDiskList()
        if self._diskList:
            self._diskList.sort()
            self._configDevRequests('disk', 'Disk', self._diskList)
            self._configDevBytes('disk', 'Disk', self._diskList)
            self._configDevActive('disk', 'Disk', self._diskList)
            
        self._mdList = self._info.getMDlist()
        if self._mdList:
            self._mdList.sort()
            self._configDevRequests('md', 'MD', self._mdList)
            self._configDevBytes('md', 'MD', self._mdList)
            self._configDevActive('md', 'MD', self._mdList)
            
        devlist = self._info.getPartitionList()
        if devlist:
            devlist.sort()
            self._partList = [x[1] for x in devlist]
            self._configDevRequests('part', 'Partition', self._partList)
            self._configDevBytes('part', 'Partition', self._partList)
            self._configDevActive('part', 'Partition', self._partList)
            
        devlist = self._info.getLVlist()
        if devlist:
            devlist.sort()
            self._lvList = ["-".join(x) for x in devlist]
            self._configDevRequests('lv', 'LV', self._lvList)
            self._configDevBytes('lv', 'LV', self._lvList)
            self._configDevActive('lv', 'LV', self._lvList)
        
        self._fsList = self._info.getFilesystemList()
        self._fsList.sort()
        self._configDevRequests('fs', 'Filesystem', self._fsList)
        self._configDevBytes('fs', 'Filesystem', self._fsList)
        self._configDevActive('fs', 'Filesystem', self._fsList)
                
    def retrieveVals(self):
        """Retrive values for graphs."""
        if self._diskList:
            self._fetchDevAll('disk', self._diskList, 
                              self._info.getDiskStats)
        if self._mdList:
            self._fetchDevAll('md', self._mdList, 
                              self._info.getMDstats)
        if self._partList:
            self._fetchDevAll('part', self._partList, 
                              self._info.getPartitionStats) 
        if self._lvList:
            self._fetchDevAll('lv', self._lvList, 
                              self._info.getLVstats)
        self._fetchDevAll('fs', self._fsList, 
                          self._info.getFilesystemStats)
                
    def _configDevRequests(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Request stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_requests' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Requests' % titlestr, 'Disk I/O',
                info='Disk I/O - %s Throughput, Read / write requests per second.' 
                     % titlestr,
                args='--base 1000 --lower-limit 0',
                vlabel='reqs/sec read (-) / write (+)')
            for dev in devlist:
                graph.addField(dev + '_read', namestr, draw='LINE2', 
                               type='DERIVE', min=0, graph=False)
                graph.addField(dev + '_write', namestr, draw='LINE2', 
                               type='DERIVE', min=0, negative=(dev + '_read'))
            self.appendGraph(name, graph)

    def _configDevBytes(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Throughput stats.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_bytes' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Throughput' % titlestr, 'Disk I/O',
                info='Disk I/O - %s Throughput, bytes read / written per second.'
                     % titlestr,
                args='--base 1000 --lower-limit 0',
                vlabel='bytes/sec read (-) / write (+)')
            for dev in devlist:
                graph.addField(dev + '_read', dev, draw='LINE2', type='DERIVE',
                    min=0, graph=False)
                graph.addField(dev + '_write', dev, draw='LINE2', type='DERIVE',
                    min=0, negative=(dev + '_read'))
            self.appendGraph(name, graph)
            
    def _configDevActive(self, namestr, titlestr, devlist):
        """Generate configuration for I/O Queue Length.
        
        @param namestr:  Field name component indicating device type.
        @param titlestr: Title component indicating device type.
        @param devlist:  List of devices.
        
        """
        name = 'diskio_%s_active' % namestr
        if self.graphEnabled(name):
            graph = MuninGraph('Disk I/O - %s - Queue Length' % titlestr, 
                'Disk I/O',
                info='Disk I/O - Number  of I/O Operations in Progress for every %s.'
                     % titlestr,
                args='--base 1000 --lower-limit 0')
            for dev in devlist:
                graph.addField(dev, dev, draw='AREASTACK', type='GAUGE')
            self.appendGraph(name, graph)

    def _fetchDevAll(self, namestr, devlist, statsfunc):
        """Initialize I/O stats for devices.
        
        @param namestr:   Field name component indicating device type.
        @param devlist:   List of devices.
        @param statsfunc: Function for retrieving stats for device.
        
        """
        for dev in devlist:
            stats = statsfunc(dev)
            name = 'diskio_%s_requests' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rios'])
                self.setGraphVal(name, dev + '_write', stats['wios'])
            name = 'diskio_%s_bytes' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rbytes'])
                self.setGraphVal(name, dev + '_write', stats['wbytes'])
            name = 'diskio_%s_active' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev, stats['ios_active'])