Ubuntu Temperature Monitoring

Recently procured cpu fans for my Asus A17 laptop from Amazon and installed the same into my laptop myself. I already had the Farraige Heavy Magnetic Screwdriver Set; 25-1 Repair Kit, with Portable Leather Case, Professional Opening Tools for Mobile Laptop Glasses, Star/Y-Type/Flat-Blade/Triangle Screwdrivers, black. And my internal instinct which has helped me in many such situations.

Why I decided to replace the fans is because the laptop was going crazy with copy paste ^C ^V in xubuntu xwindows across applications and finally the sensors command was showing 75 + and at times even 90 which is quoted as critical in many online forums and the sensors command output also.

After installation I wanted to monitor the temperature and collect the data into a spreadsheet, my preferred one being LibreOffice Calc. Well for this I just fired up gedit and created the shell script with occasional checks directly in the shell itself.

The above shell script when run on the command line will output a single line as csv with the values in the order cpu_fan,Tdie,Tctl,temp1,date,time. Hence initialized a file with these values alone and in crontab at reboot this initial file will be copied on to /dev/shm/sensor_values.csv making sure only one session data will exist in the csv.

After this was running for some time the sensor_values.csv had the following data.

The csv when copied from shell and pasted into LibreOffice Calc the application will prompt with an auto detected import dialogue.

The final imported spreadsheet looks as in the following screenshot image.

The fan speed and temperature variations show clearly that system is working fine and my attempt to resolve a hardware issue was successful.

Thankyou for reading this checkout my contributions to the developer community and technical profiles.

Exploring Animation Creation with GIMP, Bash, and FFmpeg: A Journey into Headphone Speaker Testing

For a long time, I had a desire to create a video that helps people confirm that their headphones are worn correctly, especially when there are no left or right indicators. While similar solutions exist out there, I decided to take this on as an exploration of my own, using tools I’m already familiar with: GIMP, bash, and FFmpeg.

This project resulted in a short animation that visually shows which speaker—left, right, or both—is active, syncing perfectly with the narration.

Project Overview:
The goal of the video was simple: create an easy way for users to verify if their headphones are worn correctly. The animation features:

  • “Hear on both speakers”: Animation shows pulsations on both sides.
  • “Hear on left speaker only”: Pulsations only on the left.
  • “Hear on right speaker only”: Pulsations only on the right.
  • Silence: No pulsations at all. Tools Used:
  • Amazon Polly for generating text-to-speech narration.
  • Audacity for audio channel switching.
  • GIMP for creating visual frames of the animation.
  • Bash scripting to automate the creation of animation sequences.
  • FFmpeg to compile the frames into the final video.
  • LibreOffice Calc to calculate frame sequences for precise animation timing. Step-by-Step Workflow:
  1. Creating the Audio Narration:
    Using Amazon Polly, I generated a text-to-speech audio file with the necessary instructions. Polly’s lifelike voice makes it easy to understand. I then used Audacity to modify the audio channels, ensuring that the left, right, and both channels played at the appropriate times.
  2. Synchronizing Audio and Visuals:
    I needed the animation to sync perfectly with the audio. To achieve this, I first identified the start and end of each segment in the audio file and created a spreadsheet in LibreOffice Calc. This helped me calculate the number of frames per segment, ensuring precise timing for the animation.
  3. Creating Animation Frames in GIMP:
    The visual animation was created using a simple diaphragm depression effect. I made three frames in GIMP:
  • One for both speakers pulsating,
  • One for the left speaker only,
  • One for the right speaker only.
  1. Automation with Bash:
    Once the frames were ready, I created a guideline text using Gedit that outlined the sequence. I then used a bash while-read loop combined with a seq loop to generate 185 image files. These files followed a naming convention of anim_%03d.png, ensuring they were easy to compile later.
  2. Compiling with FFmpeg:
    After all frames were created, I used FFmpeg to compile the images into the final video. The result was a fluid, synchronized animation that matched the audio perfectly. The Finished Product:
    Here’s the final video that demonstrates the headphone speaker test:

https://youtu.be/_fskGicSSUQ

Why I Chose These Tools:
Being familiar with xUbuntu, I naturally gravitated toward tools that work seamlessly in this environment. Amazon Polly provided high-quality text-to-speech output, while Audacity handled the channel switching with ease. GIMP was my go-to for frame creation, and the combination of bash and FFmpeg made the entire animation process efficient and automated.

This project not only satisfied a long-held desire but also served as an exciting challenge to combine these powerful tools into one cohesive workflow. It was a satisfying dive into animation and audio synchronization, and I hope it can help others as well!

Conclusion:
If you’re into creating animated videos or simply exploring new ways to automate your creative projects, I highly recommend diving into tools like GIMP, bash, and FFmpeg. Whether you’re on xUbuntu like me or another system, the potential for customization is vast. Let me know if you found this helpful or if you have any questions!