Giter Club home page Giter Club logo

lcdproc-temperature's Introduction

lcdproc-temperature

A small LCDproc patch adding a custom screen aggregating CPU, memory and temperature info. It is geared towards the Raspberry Pi (any model) and a 4x20 LCD:

+--------------------+
|##### CPU MEM #####@|
|----|----|----|----||  CPU usage gauge per core
|%[-----------------]|  Total CPU usage gauge
|E-------F  T: XX°C  |  Memory usage gauge and current core temperature
+--------------------+

Details

Temperature information is gathered from /sys/class/thermal/thermal_zone0/temp and can be adapted for other paths in clients/lcdproc/machine_Linux.c. The other information is based on LCDproc built-ins. Since it is not portable and hardware specific, there is no reason to commit this upstream, so the patch is published here. Of course you can achieve the same with a perl/python/whatever script without having to touch the lcdproc sources, but I took this approach because it was the most convenient way for me. Comments, improvements, corrections, and rants welcome...

Usage

Activate the [Total] screen in your lcdproc.conf

Demo:

LCDproc mod demo

lcdproc-temperature's People

Watchers

 avatar

lcdproc-temperature's Issues

Temperature display for FreeBSD

Howdy,
Hopefully this message gets to you even though your repo appears to be dormant for some years now.
You've done some great work here aaaaaaand I'd like to see if it possible to integrate/modify this patch for FreeBSD purposes.
I'm not entirely familiar with how Linux/Debian goes about reporting cpu core temperatures...I'm assuming the "/sys/class/thermal/thermal_zone0/temp" file simply contains a number that is expressed as the temperature in Celsius?
FreeBSD reports cpu core temperatures with "sysctl dev.cpu..temperature: C" . This is given provided that the Kernel module "coretemp.ko" is loaded. We can, for instance, grab that temperature number by executing "exec sysctl -n dev.cpu.0.temperature | cut -c-2" , which gives us a whole number (40) ... "exec sysctl -n dev.cpu.0.temperature | cut -c-4" gives us a number with one decimal (40.1)... "exec sysctl -n dev.cpu.0.temperature | cut -c-5" gives us a number with one decimal and C (C for Celsius)
Full disclosure: I am actually only interested in displaying the temperature, not so much the other very useful gauges you've included in the [Total] screen.
Have you any suggestions/insights in how I might achieve this? Perhaps a modified version of your [Total] screen that is specific to FreeBSD, with say, the cpu core temperatures (individual and/or average of the combined cores) and perhaps along with other temperature sensors on the motherboard? Motherboard temperatures can be provided by executing "sysctl hw.acpi.thermal.tz0.temperature", and for motherboards with multiple temperature sensors on the board, simply executing "sysctl hw.acpi.thermal.tz1.temperature" and so forth. All sysctl commands I listed here do not require root/superuser privileges.
I'll be mighty appreciative for any help you can provide!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.