返回顶部
摘要: #!/bin/bash gpu_node=`kubectl get node --show-labels | grep cuda=11.2 | awk '{print $1}'` real_gpu_core_free=0 real_gpu_mem_free=0 core_sum=0 mem_sum= 阅读全文
posted @ 2022-10-21 10:30 丨君丶陌 阅读(73) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash kubectl get deploy -n host | grep -v ' 0 ' | awk '{print $1}' > deploy.txt for deploy in `cat deploy.txt` do check_gpu=`kubectl describe d 阅读全文
posted @ 2022-10-21 10:26 丨君丶陌 阅读(38) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash for node in `kubectl get node | grep node | awk '{print $1}'` do total_cpu=`kubectl describe node $node | grep cpu | awk '{print $2}' | se 阅读全文
posted @ 2022-10-21 10:23 丨君丶陌 阅读(53) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash ##check workdir## if [ `ls /var/lib/docker/ | grep overlay2 | wc -l` -ne 0 ] then dir="/var/lib/docker/" else dir="/data/docker/" fi ##cle 阅读全文
posted @ 2022-10-21 10:06 丨君丶陌 阅读(187) 评论(0) 推荐(0) 编辑