mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
chore: change file modes
This commit is contained in:
parent
2a7539ffe0
commit
e1f55bf78d
1 changed files with 4 additions and 2 deletions
6
nvhtop.py
Normal file → Executable file
6
nvhtop.py
Normal file → Executable file
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue