当前位置: 首页>>代码示例>>Python>>正文


Python GlancesPlugin.update_views方法代码示例

本文整理汇总了Python中glances.plugins.glances_plugin.GlancesPlugin.update_views方法的典型用法代码示例。如果您正苦于以下问题:Python GlancesPlugin.update_views方法的具体用法?Python GlancesPlugin.update_views怎么用?Python GlancesPlugin.update_views使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在glances.plugins.glances_plugin.GlancesPlugin的用法示例。


在下文中一共展示了GlancesPlugin.update_views方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert and log
        self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total'])
开发者ID:Efreak,项目名称:glances,代码行数:10,代码来源:glances_memswap.py

示例2: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Optional
        for key in self.stats.keys():
            self.views[key]['optional'] = True
开发者ID:hank,项目名称:glances,代码行数:11,代码来源:glances_ip.py

示例3: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert
        for i in self.stats:
            self.views[i[self.get_key()]]['used']['decoration'] = self.get_alert(
                i['used'], maximum=i['size'], header=i['mnt_point'])
开发者ID:Exasis,项目名称:glances,代码行数:12,代码来源:glances_fs.py

示例4: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert only
        for key in ['cpu', 'mem', 'swap']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
开发者ID:markandrewj,项目名称:glances,代码行数:12,代码来源:glances_quicklook.py

示例5: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert and log
        self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total'])
        # Optional
        for key in ['active', 'inactive', 'buffers', 'cached']:
            if key in self.stats:
                self.views[key]['optional'] = True
开发者ID:Efreak,项目名称:glances,代码行数:14,代码来源:glances_mem.py

示例6: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert
        for i in self.stats:
            disk_real_name = i['disk_name']
            self.views[i[self.get_key()]]['read_bytes']['decoration'] = self.get_alert(int(i['read_bytes'] // i['time_since_update']),
                                                                                       header=disk_real_name + '_rx')
            self.views[i[self.get_key()]]['write_bytes']['decoration'] = self.get_alert(int(i['write_bytes'] // i['time_since_update']),
                                                                                        header=disk_real_name + '_tx')
开发者ID:Efreak,项目名称:glances,代码行数:15,代码来源:glances_diskio.py

示例7: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views"""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert
        for i in self.stats:
            ifrealname = i['interface_name'].split(':')[0]
            self.views[i[self.get_key()]]['rx']['decoration'] = self.get_alert(int(i['rx'] // i['time_since_update'] * 8),
                                                                               header=ifrealname + '_rx')
            self.views[i[self.get_key()]]['tx']['decoration'] = self.get_alert(int(i['tx'] // i['time_since_update'] * 8),
                                                                               header=ifrealname + '_tx')
开发者ID:SpaceAppsXploration,项目名称:glances,代码行数:15,代码来源:glances_network.py

示例8: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert
        for i in self.stats:
            if not i['value']:
                continue
            if i['type'] == 'battery':
                self.views[i[self.get_key()]]['value']['decoration'] = self.get_alert(100 - i['value'], header=i['type'])
            else:
                self.views[i[self.get_key()]]['value']['decoration'] = self.get_alert(i['value'], header=i['type'])
开发者ID:Exasis,项目名称:glances,代码行数:16,代码来源:glances_sensors.py

示例9: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views"""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        try:
            # Alert and log
            self.views['min15']['decoration'] = self.get_alert_log(self.stats['min15'], max=100 * self.stats['cpucore'])
            # Alert only
            self.views['min5']['decoration'] = self.get_alert(self.stats['min5'], max=100 * self.stats['cpucore'])
        except KeyError:
            # try/except mandatory for Windows compatibility (no load stats)
            pass
开发者ID:SpaceAppsXploration,项目名称:glances,代码行数:16,代码来源:glances_load.py

示例10: update_views

# 需要导入模块: from glances.plugins.glances_plugin import GlancesPlugin [as 别名]
# 或者: from glances.plugins.glances_plugin.GlancesPlugin import update_views [as 别名]
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        GlancesPlugin.update_views(self)

        # Add specifics informations
        # Alert and log
        for key in ['user', 'system', 'iowait']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert_log(self.stats[key], header=key)
        # Alert only
        for key in ['steal', 'total']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
        # Optional
        for key in ['nice', 'irq', 'iowait', 'steal']:
            if key in self.stats:
                self.views[key]['optional'] = True
开发者ID:Efreak,项目名称:glances,代码行数:20,代码来源:glances_cpu.py


注:本文中的glances.plugins.glances_plugin.GlancesPlugin.update_views方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。