Exemple #1
0
    def reset_process_sort(self):
        """Reset the process_auto_by variable."""
        # Default sort is...
        process_auto_by = 'cpu_percent'
        glances_processes.setautosortkey(process_auto_by)
        glances_processes.setmanualsortkey(None)

        return process_auto_by
Exemple #2
0
    def reset_process_sort(self):
        """Reset the process_auto_by variable."""
        # Default sort is...
        process_auto_by = 'cpu_percent'
        glances_processes.setautosortkey(process_auto_by)
        glances_processes.setmanualsortkey(None)

        return process_auto_by
Exemple #3
0
    def set_process_sort(self, item_type):
        """Define the process auto sort key from the alert type."""
        # Process sort depending on alert type
        if item_type.startswith("MEM"):
            # Sort TOP process by memory_percent
            process_auto_by = 'memory_percent'
        elif item_type.startswith("CPU_IOWAIT"):
            # Sort TOP process by io_counters (only for Linux OS)
            process_auto_by = 'io_counters'
        else:
            # Default sort is...
            process_auto_by = 'cpu_percent'
        glances_processes.setautosortkey(process_auto_by)

        return process_auto_by
Exemple #4
0
    def set_process_sort(self, item_type):
        """Define the process auto sort key from the alert type."""
        # Process sort depending on alert type
        if item_type.startswith("MEM"):
            # Sort TOP process by memory_percent
            process_auto_by = 'memory_percent'
        elif item_type.startswith("CPU_IOWAIT"):
            # Sort TOP process by io_counters (only for Linux OS)
            process_auto_by = 'io_counters'
        else:
            # Default sort is...
            process_auto_by = 'cpu_percent'
        glances_processes.setautosortkey(process_auto_by)

        return process_auto_by