Commits

Radu Potop  committed 5a44d91

cput output in TSV format

  • Participants
  • Parent commits 3f22adc

Comments (0)

Files changed (1)

 #!/bin/bash
 # Get CPU and GPU temperature
 
-echo -ne 'CPU\tMB\tGPU\n'
+echo -ne 'DATE\tCPU\tMB\tGPU\n'
 
 while (true) do
 
+    DATE=`date '+%Y-%m-%d %H:%M:%S'`
     CPU=`sensors|egrep 'CPU Temperature'|awk '{print $3}'| sed 's/°C//'|sed 's/+//'`
     MB=`sensors|egrep 'MB Temperature'|awk '{print $3}'| sed 's/°C//'|sed 's/+//'`
     GPU=`nvidia-settings -q GPUCoreTemp | egrep 'Attribute'|awk '{print $4}'|sed 's/\.//'`
 
-    echo -ne "$CPU\t$MB\t$GPU\n"
+    echo -ne "$DATE\t$CPU\t$MB\t$GPU\n"
 
     sleep 5