Raspberry Pi: Current System Information

I’ve written a simple bash script to show the current temperature, voltage, and core clock on my Raspberry Pi (Model B running Raspbian). I had to install bc (a basic calculator) as it wasn’t installed by default. You can get it by running the command

sudo apt-get install bc

Then run this code:

echo Raspberry Pi System Information
echo -------------------------------
temp_measured=`sudo /opt/vc/bin/vcgencmd measure_temp`
temp_centigrade=`echo $temp_measured| cut -d '=' -f2 | sed 's/..$//'`
temp_fahrenheit=$(echo "scale=2;((9/5) * $temp_centigrade) + 32" |bc)
core_measured=`sudo /opt/vc/bin/vcgencmd measure_clock arm`
core_cut=`echo $core_measured| cut -c15-`
core_mhz=$(echo "scale=1;($core_cut / 1000000)" |bc)
volt_measured=`sudo /opt/vc/bin/vcgencmd measure_volts core`
volt_cut=`echo $volt_measured| cut -d '=' -f2 | sed 's/.$//'`
echo Temperature = $temp_centigrade\*C \($temp_fahrenheit\*F\)
echo Voltage = $volt_cut V
echo Core clock = $core_mhz MHz

The output should like this:

3 thoughts on “Raspberry Pi: Current System Information”

  1. The World’s 1st ChatGPT-Powered 3-In-1 Multi Channel Autoresponder For WhatsApp To 10X Your Traffic!

    Upload UNLIMITED Contacts, Send UNLIMITED WhatsApp Texts WITHOUT Getting Banned!

    AI MultiMarketer Is The Only Way To Unlock The Power Of Multi-Channel Autoresponders & Dominate Your Market With Unlimited Reach Across SMS

    – All From A Single Dashboard! Don’t miss out on this game-changing tool.

    Upgrade your marketing strategy today!


  2. Hello :)

    The innovative method is a counterintuitive
    method to build and manage an online business,
    especially the lifestyle of freedom business model,
    allowing you to establish a sustainable and profitable
    enduring business that offers you freedom,
    fun, and excitement.

    We accomplish this by constructing a “business machine”
    that operates for you around the clock,
    where your sole responsibility is to oversee the process,
    without having to create products or offerings,
    or chase fresh clients or provide to them.

    And as a result…this liberates you to live and experience your life
    while the business operates for you – this is the Secret Lead System.

    See our page:

    See you on the other side

  3. World’s First 80-In One – ChatGPT (OpenAi)

    Killer App Suite That Does Everything-

    Creating Content
    Eye Catchy Graphics
    Converting Text To Video
    Text To Image
    Chat GPT AI Chatbot
    Keyword To Video
    Keyword To Image
    Corrects Grammar
    Makes Image Variations…

    Ad Copy & Spreadsheet Generator In Just 2 Mins…

    And so on…

    Secure your one-time fee access here: https://warriorplus.com/o2/a/wb3k53/0


Leave a Reply

Your email address will not be published. Required fields are marked *