Skip to content

Commit e02f038

Browse files
committed
Use dmon for monitor_proc
1 parent 85bd290 commit e02f038

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

userbenchmark/release-test/monitor_proc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ get_gpu_max_memory_usage_cuda() {
1717
local max=$2
1818
local curr
1919
# Some processes might not use the GPU
20-
if ! nvidia-smi pmon -s m -c 1 -o T | grep "${my_pid}" >/dev/null 2>/dev/null; then
20+
if ! nvidia-smi dmon -s m -c 1 -o T -i 0 | grep "${my_pid}" >/dev/null 2>/dev/null; then
2121
echo "${max}"
2222
return
2323
fi
24-
curr=$(nvidia-smi pmon -s m -c 1 -o T | grep "${my_pid}" | awk '{print $5}' | sort | tail -1 | grep -o "[0-9.]*")
24+
curr=$(nvidia-smi dmon -s m -c 1 -o T -i 0 | grep "${my_pid}" | awk '{print $4}' | sort | tail -1 | grep -o "[0-9.]*")
2525
max "${curr}" "${max}"
2626
}
2727

0 commit comments

Comments
 (0)