コード例 #1
0
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.update_views(self)

        # Add specifics informations
        # Alert and log
        self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total'])
コード例 #2
0
ファイル: unicon_ip.py プロジェクト: sdtimothy8/Coding
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.update_views(self)

        # Add specifics informations
        # Optional
        for key in self.stats.keys():
            self.views[key]['optional'] = True
コード例 #3
0
ファイル: unicon_ip.py プロジェクト: sdtimothy8/Coding
    def __init__(self, args=None):
        """Init the plugin."""
        UnicornPlugin.__init__(self, args=args)

        # We want to display the stat in the curse interface
        self.display_curse = True

        # Init the stats
        self.reset()
コード例 #4
0
    def __init__(self, args=None):
        """Init the plugin."""
        UnicornPlugin.__init__(self, args=args)

        # We dot not want to display the stat in the curse interface
        # The core number is displayed by the load plugin
        self.display_curse = False

        # Init the stat
        self.reset()
コード例 #5
0
    def __init__(self, args=None):
        """Init the CPU plugin."""
        UnicornPlugin.__init__(
            self, args=args, items_history_list=items_history_list)

        # We want to display the stat in the curse interface
        self.display_curse = True

        # Init stats
        self.reset()
コード例 #6
0
ファイル: unicorn_fs.py プロジェクト: sdtimothy8/Coding
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.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'])
コード例 #7
0
    def __init__(self, args=None):
        """Init the plugin."""
        UnicornPlugin.__init__(self, args=args)

        # The plgin can be disable using: args.disable_docker
        self.args = args

        # We want to display the stat in the curse interface
        self.display_curse = True

        # Init the Docker API
        self.docker_client = False
コード例 #8
0
ファイル: unicon_mem.py プロジェクト: sdtimothy8/Coding
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.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
コード例 #9
0
    def __init__(self, args=None):
        """Init the plugin."""
        UnicornPlugin.__init__(self, args=args)

        # Init the sensor class
        self.unicongrabbat = UniconGrabBat()

        # We do not want to display the stat in a dedicated area
        # The HDD temp is displayed within the sensors plugin
        self.display_curse = False

        # Init stats
        self.reset()
コード例 #10
0
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.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')
コード例 #11
0
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.update_views(self)

        # Add specifics informations
        try:
            # Alert and log
            self.views['min15']['decoration'] = self.get_alert_log(
                self.stats['min15'], maximum=100 * self.stats['cpucore'])
            # Alert onlynb_log_core
            self.views['min5']['decoration'] = self.get_alert(
                self.stats['min5'], maximum=100 * self.stats['cpucore'])
        except KeyError:
            # try/except mandatory for Windows compatibility (no load stats)
            pass
コード例 #12
0
    def __init__(self, args=None):
        """Init the plugin."""
        UnicornPlugin.__init__(self,
                               args=args,
                               items_history_list=items_history_list)

        # We want to display the stat in the curse interface
        self.display_curse = True

        # Init stats
        self.reset()

        # Call CorePlugin in order to display the core number
        try:
            self.nb_log_core = CorePlugin(args=self.args).update()["log"]
        except Exception:
            self.nb_log_core = 0
コード例 #13
0
    def update_views(self):
        """Update stats views."""
        # Call the father's method
        UnicornPlugin.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