瀏覽代碼

Added watch command

koerschens 3 年之前
父節點
當前提交
24a5f8b863
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      cvgpu.sh

+ 6 - 1
cvgpu.sh

@@ -3,4 +3,9 @@
 dir=$(dirname "$0")
 python_executable="$dir/miniconda3/bin/python"
 
-$python_executable "$dir"/python/gpu_status.py $@
+if [ "$1" = "watch" ]; then
+    shift
+    watch -n 10 $python_executable "$dir"/python/gpu_status.py $@
+else
+    $python_executable "$dir"/python/gpu_status.py $@
+fi