Guest User

Untitled

a guest
Mar 15th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/bin/bash
  2. #current_temp_0.value 68
  3. uptime=$(</proc/uptime)
  4. uptime=${uptime%%.*}
  5. echo $uptime
  6. temp=`/home/user/getgpustat 0 current_temp_0`
  7. echo $temp
  8. #600 second, you can change the minimum uptime here:
  9. if [ $uptime -gt 600 ]
  10. then
  11. #50°, you can change minimum temp here:
  12. if [ $temp -lt 50 ]
  13. then
  14. coldreboot
  15. else
  16. echo "Temps inf a 50: $temp";
  17. fi
  18. else
  19. echo "Uptime inferieur a 600: $uptime";
  20. fi
Advertisement
Add Comment
Please, Sign In to add comment