Author Topic: HTML5 Server Temperature Graph  (Read 5145 times)

0 Members and 1 Guest are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
HTML5 Server Temperature Graph
« on: July 02, 2014, 07:40:41 am »
I wrote a script that logs the cpu temperature of my server. This is a frontend for it written in javascript. It uses the html5 canvas tag.

Dark theme(default):
http://cookiecraft.eeems.me:81/stats/sensors.php?theme=dark

Light theme:
http://cookiecraft.eeems.me:81/stats/sensors.php?theme=light


Features:
+ Awesome solarized color palettes.
+ Graph zooms in on data.
+ Graph division scales to y-axis range.
+ Lines indicating normal and critical temperature (not seen in these images. My server is stable at the moment)
« Last Edit: July 02, 2014, 07:44:30 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: HTML5 Server Temperature Graph
« Reply #1 on: July 02, 2014, 07:43:23 am »
Now that's pretty cool ! :D

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: HTML5 Server Temperature Graph
« Reply #2 on: July 02, 2014, 07:43:55 am »
Maybe have the dark theme have a light shadow :P
Anyways, it is looking awesome! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: HTML5 Server Temperature Graph
« Reply #3 on: July 02, 2014, 10:27:08 am »
You should include graphs for CPU and memory usage to see if it coincides with temperatures changes.
/e

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: HTML5 Server Temperature Graph
« Reply #4 on: July 02, 2014, 11:42:27 am »
Good idea Eeems. :)

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: HTML5 Server Temperature Graph
« Reply #5 on: July 02, 2014, 12:43:05 pm »
Yeah I should, but first I am going to add labels to the x-axis (time)
If you like my work: why not give me an internet?








Offline ordelore

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +7/-0
  • Genius and Friend
    • View Profile
    • ordelore8x
Re: HTML5 Server Temperature Graph
« Reply #6 on: July 02, 2014, 01:08:58 pm »
So custom themes default to light? I think I know how you decide which theme to use.
I am a friend.
I mine Bitcoins.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: HTML5 Server Temperature Graph
« Reply #7 on: July 02, 2014, 03:10:30 pm »
Dark is the default when you don't specify a theme. Light is the default when you specify a theme that does not exist :P
If you like my work: why not give me an internet?








Offline ordelore

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +7/-0
  • Genius and Friend
    • View Profile
    • ordelore8x
Re: HTML5 Server Temperature Graph
« Reply #8 on: July 02, 2014, 04:22:05 pm »
Which is why there is no 'thegame' texture?
* ordelore runs
I am a friend.
I mine Bitcoins.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: HTML5 Server Temperature Graph
« Reply #9 on: July 04, 2014, 04:27:17 am »
The script now captures cpu usage as well, but I have not added it to the graph yet. I should make a more detailed graph for cpu usage ,because it fluctuates more than the temperature. This implies that the datalogger script should run more often.


I added a temperature alarm that makes a sound when the cpu overheats. When it's above the critical threshold the server will automatically reboot. The alarm only sounds during the day so I don't wake up anyone. This is to make sure my dad does not throw out the server :P When a critical temperature occurs at night it will simply reboot or shut down (depends on the temperature)
If you like my work: why not give me an internet?








Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: HTML5 Server Temperature Graph
« Reply #10 on: July 04, 2014, 04:30:53 am »
Wow Keoni you're being very careful with your server. O.O Mine is just an RPi lying around in a corner and ignored by everyone. :P