Advertisement
Guest User

systemp

a guest
May 28th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/bin/sh
  2. temp_sda=`hddtemp /dev/sda | cut -c 33-38`
  3. temp_sdb=`hddtemp /dev/sdb | cut -c 33-38`
  4. temp_cpu0=`sensors | grep 'Core 0' | cut -c 16-22`
  5. temp_cpu1=`sensors | grep 'Core 1' | cut -c 16-22`
  6. echo '<html>\n<head>\n<title>system temperature</title>\n</head>'> index.html;
  7. echo '<body><h2>\n<table>\n\t<tr><td>HDD1: '${temp_sda}'</td></tr>\n\t<tr><td>HDD2: '${temp_sdb}'</td></tr>' >> index.html;
  8. echo '\t<tr><td>CPU Core 0: '${temp_cpu0}'</td></tr>\n\t<tr><td>CPU Core 1: '${temp_cpu1}'</tr></td>\n</table>\n</h2></body>\n</html>' >> index.h$
  9. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement