From e1f55bf78dd311f2e8b7421dcc1ba33d89135fcc Mon Sep 17 00:00:00 2001 From: XuehaiPan Date: Sun, 31 Jan 2021 02:20:02 +0800 Subject: [PATCH] chore: change file modes --- nvhtop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 nvhtop.py diff --git a/nvhtop.py b/nvhtop.py old mode 100644 new mode 100755 index 75e0b4c..bba0b94 --- a/nvhtop.py +++ b/nvhtop.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + ################################################################################# # Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # # @@ -27,7 +29,7 @@ ################################################################################# # To Run: -# $ python nvhtop.py +# $ python3 nvhtop.py import curses import datetime @@ -115,7 +117,7 @@ class Device(object): def condition(self): try: memory_utilization = self.memory_used / self.memory_total - gpu_utilization = int(self.utilization[:-1]) + gpu_utilization = float(self.utilization[:-1]) / 100 except ValueError: return 'high'