diff --git a/npu_status.sh b/npu_status.sh index cc1d24a4..6bc3f2af 100644 --- a/npu_status.sh +++ b/npu_status.sh @@ -4,24 +4,19 @@ output_dir=$1 sleep_time=$2 print_to_screen=$3 -output_file_path="${output_dir}/gpu_status_$(date +"%Y%m%d%H%M%S").json" - -device_cnt=$(npu-smi info | grep '310P3' | wc -l) -chip_id_arr_from_info=(0 0 0 0 0 0 0 0) -npu_id_arr_from_info=(0 1 2 3 4 5 6 7) -npu_id_arr=(0 1 2 3 4 5 6 7) +output_file_path="${output_dir}/npu_status_$(date +"%Y%m%d%H%M%S").json" +device_cnt=$(npu-smi info | grep '910B1' | wc -l) get_power_dissipation() { local npu_id="$1" - power_dissipation=$(npu-smi info -t power -i ${npu_id} | grep "Power Dissipation(W)" | awk '{print $4}') + power_dissipation=$(npu-smi info -t power -i ${npu_id} | grep "NPU Real-time Power(W)" | awk '{print $5}') echo "${power_dissipation}" } get_mem_usage() { - local chip="$1" - local device="$2" - mem_usage=$(npu-smi info | grep "${chip} ${device}" | awk '{print $8}') + local npu_id="$1" + mem_usage=$(npu-smi info -t usages -i ${npu_id} | grep "HBM Usage Rate(%)" | awk '{print $5}') echo "${mem_usage}" } @@ -32,15 +27,15 @@ for i in {1..1500} do device_mem_usage="" for ((i=0; i