Commits

Radu Potop committed ecc4680

cput

  • Participants
  • Parent commits 5a44d91

Comments (0)

Files changed (1)

 #!/bin/bash
-# Get CPU and GPU temperature
+# Get temperature for CPU, MOBO, GPU, HDD
 
-echo -ne 'DATE\tCPU\tMB\tGPU\n'
+echo -e 'DATE\tCPU\tMOBO\tGPU\tHDD'
 
 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/+//'`
+    MOBO=`sensors|egrep 'MB Temperature'|awk '{print $3}'| sed 's/°C//'|sed 's/+//'`
     GPU=`nvidia-settings -q GPUCoreTemp | egrep 'Attribute'|awk '{print $4}'|sed 's/\.//'`
+    HDD=`hddtemp /dev/sda | awk '{print $4}' | sed 's/°C//'`
 
-    echo -ne "$DATE\t$CPU\t$MB\t$GPU\n"
+    echo -e "$DATE\t$CPU\t$MOBO\t$GPU\t$HDD"
 
     sleep 5