File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ init_module_gpu()
35
35
printf " %-17s " " #TIME" > $OUT_FILE
36
36
37
37
for gpu_no in ` seq 0 $LAST_GPU_NO ` ; do
38
- printf " %-17s %-17s " " gpu_${gpu_no} _avail " " gpu_${gpu_no} _used " >> $OUT_FILE
38
+ printf " %-17s %-17s " " gpu_${gpu_no} _avail_GB " " gpu_${gpu_no} _used_GB " >> $OUT_FILE
39
39
done
40
40
printf " \n" >> $OUT_FILE
41
41
@@ -60,7 +60,8 @@ collect_data_gpu()
60
60
61
61
line=$( printf " %-17d " $current_time )
62
62
for val in $gpu_free_used ; do
63
- line+=$( printf " %-17d " $val )
63
+ valgb=$( echo " scale=3; $val /1000" | bc )
64
+ line+=$( printf " %-17.3f " $valgb )
64
65
done
65
66
line+=$( printf " \n" )
66
67
@@ -166,7 +167,7 @@ plot_data_gpu()
166
167
167
168
printf " %s \n" " var options = { " >> $OUT_FILE
168
169
printf " %s \n" " chart: {" >> $OUT_FILE
169
- printf " %s \n" " title: 'GPU ${gpu_no} Memory (MB )'," >> $OUT_FILE
170
+ printf " %s \n" " title: 'GPU ${gpu_no} Memory (GB )'," >> $OUT_FILE
170
171
# printf "%s \n" "subtitle: '(GB)' " >> $OUT_FILE
171
172
printf " %s \n" " }," >> $OUT_FILE
172
173
printf " %s \n" " width: 600, " >> $OUT_FILE
You can’t perform that action at this time.
0 commit comments