Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/nvtop/interface_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ enum process_field {
process_cpu_mem_usage,
process_command,
process_field_count,
// Sentinel used to represent "no sorting field" (e.g. no secondary sort key)
process_none = process_field_count,
};

// Filter applied to the displayed process list based on their workload type
enum process_type_filter {
process_type_filter_all = 0, // Show every process
process_type_filter_compute_only, // Show compute (and compute+graphical) processes only
process_type_filter_graphical_only,// Show graphical (and compute+graphical) processes only
process_type_filter_count,
};

typedef int process_field_displayed;
Expand Down
1 change: 1 addition & 0 deletions include/nvtop/interface_internal_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct option_window {
WINDOW *option_win;
bool last_key_was_number;
unsigned int input_number;
bool sort_by_secondary_active; // F6 sort window: editing the secondary sort key
};

struct process_window {
Expand Down
4 changes: 3 additions & 1 deletion include/nvtop/interface_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ typedef struct nvtop_interface_option_struct {
nvtop_interface_gpu_opts *gpu_specific_opts; // GPU specific options
char *config_file_location; // Location of the config file
enum process_field sort_processes_by; // Specify the field used to order the processes
bool sort_descending_order; // Sort in descending order
enum process_field sort_processes_by_secondary; // Optional secondary sort field (tie-break), or process_none
bool sort_descending_order; // Sort in descending order
enum process_type_filter process_type_filter; // Filter the process list by workload type
int update_interval; // Interval between interface update in milliseconds
process_field_displayed process_fields_displayed; // Which columns of the
// process list are displayed
Expand Down
Loading