#!/bin/bash
JOBID=$1
TASK_HOSTNAME=$(hostname)
echo $TASK_HOSTNAME >> $FILENAME
FILENAME=$JOBID"_"$TASK_HOSTNAME".csv"
echo "Writing nvidia-smi to: "$FILENAME
nvidia-smi >> $FILENAME
nvidia-smi -L >> $FILENAME
nvidia-smi \
--query-gpu=timestamp,count,gpu_name,gpu_uuid,utilization.gpu,utilization.memory,memory.total,memory.reserved,memory.used,memory.free,temperature.gpu,temperature.memory \
--format=csv -l 1 \
>> $FILENAME |