summaryrefslogtreecommitdiffstats
path: root/src/nvtop.c
diff options
context:
space:
mode:
authorMaxime Schmitt <maxime.schmitt91@gmail.com>2018-12-30 23:25:04 +0100
committerMaxime Schmitt <maxime.schmitt91@gmail.com>2019-01-01 17:39:02 +0100
commit024788ff79961edd7f8784e9e68e64326bb14501 (patch)
tree777739b8b9addc5407dcf99448a51f29657162de /src/nvtop.c
parentae1c9429453c26d3534a6133567f4bf0dc04a628 (diff)
New interface placement algorithm.
Diffstat (limited to 'src/nvtop.c')
-rw-r--r--src/nvtop.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/nvtop.c b/src/nvtop.c
index 8f352fe..3f78be8 100644
--- a/src/nvtop.c
+++ b/src/nvtop.c
@@ -52,8 +52,7 @@ static const char helpstring[] =
" -v --version : Print the version and exit\n"
" -s --gpu-select : Column separated list of GPU IDs to monitor\n"
" -i --gpu-ignore : Column separated list of GPU IDs to ignore\n"
-" -p --max-gpu-plot : Show only one bar plot corespondong to the maximum of all GPUs\n"
-" -P --no-plot : Disable bar plot"
+" -p --no-plot : Disable bar plot\n"
" -C --no-color : No colors\n"
" -N --no-cache : Always query the system for user names and command line information\n"
" -f --freedom-unit : Use fahrenheit\n"
@@ -125,21 +124,15 @@ static const struct option long_opts[] = {
.val = 'E'
},
{
- .name = "max-gpu-plot",
- .has_arg = no_argument,
- .flag = NULL,
- .val = 'p'
- },
- {
.name = "no-plot",
.has_arg = no_argument,
.flag = NULL,
- .val = 'P'
+ .val = 'p'
},
{0,0,0,0},
};
-static const char opts[] = "hvd:s:i:CNfE:pP";
+static const char opts[] = "hvd:s:i:CNfE:p";
static size_t update_mask_value(const char *str, size_t entry_mask, bool addTo) {
char *saveptr;
@@ -179,9 +172,8 @@ int main (int argc, char **argv) {
bool use_color_if_available = true;
bool cache_pid_infos = true;
bool use_fahrenheit = false;
- bool show_per_gpu_plot = true;
+ bool show_plot = true;
double encode_decode_hide_time = 30.;
- char *interface_layout = "CNPN";
while (true) {
int optchar = getopt_long(argc, argv, opts, long_opts, NULL);
if (optchar == -1)
@@ -231,12 +223,8 @@ int main (int argc, char **argv) {
}
}
break;
- case 'P':
- interface_layout = "PN";
- show_per_gpu_plot = false;
- break;
case 'p':
- show_per_gpu_plot = false;
+ show_plot = false;
break;
case ':':
case '?':
@@ -304,8 +292,7 @@ int main (int argc, char **argv) {
}
struct nvtop_interface *interface = initialize_curses(
num_devices, biggest_name, use_color_if_available, use_fahrenheit,
- show_per_gpu_plot, encode_decode_hide_time, refresh_interval,
- interface_layout);
+ show_plot, encode_decode_hide_time, refresh_interval);
timeout(refresh_interval);
double time_slept = refresh_interval;