Categories
Linux

How to measure the temperature of your Raspberry PI

When running Raspian on your PI (and other distro`s for PI), an Raspberry PI specific application is installed, which let you monitor everything from volt-status, HDMI-status to the PI`s core temperature.

To check the core temperature, simply run the command  “/opt/vc/bin/vcgencmd measure_temp”

PS: Run the commando  “/opt/vc/bin/vcgencmd commands” to see all the data you can extract via that application.

Unfortunately, it does not appear to be possible to check the temperature elsewhere on the (physical) Pi, without getting a temperature sensor.

Categories
Linux Windows

How to install Raspian for Raspberry Pi from Windows

I am currently in the process of setting up a SETI@Home cluster running on Raspberry PI boxes. Currently i am working with three nodes, and i will expand it if is a success.

For OS, i use Raspian (Debian clone), combined with some cheap 8GB SDCards from a random cheap vendor.

In order to install the Raspian ISO image to a SD card, i use the application win32 disk imager, which simply takes a ISO image, and writes it to a designaded SD card.

It is worth noticing that this will cause the partition(s) on the SD card to not be any larger than the image itself. But you can fix this upon your first Raspberry PI boot, as the application “raspi-config” will be auto-started. (if not, start it)

Categories
Linux Uncategorized

Workaround for inotify on NFS-clients

I run multiple virtual machines which shares all their data via a NFS-server. I have an application that fetches files, and another server that watches for new files in a folder, using inotify. But i quickly noticed that inotify does not work over NFS. I “fixed” this by doing a simle workaround that finds all files in the watched folder, and simply touches them. This causes inotify to dectect those files.

Example:
find s -type f -exec touch {} \;

This works for me since i can simply run the command via cron, or via another scheduled job, but that does not mean that i works for your case. But perhaps it gives you some ideas.

Categories
PHP Ubuntu

Adding SSH support to PHP on Ubuntu

I have previously written a post on how to add SSH support to PHP, but that post is old, and it has now become even easier to get it up and running. And therefore making it much easier to auto upgrade WordPress via SSH. (automatic, yay!)

As root, do the following:

1: apt-get install libssh2-1-dev libssh2-php

2: Check that is installed: php -m |grep ssh2

3: Restart apache: service apache2 restart

And you should now have SSH support in PHP.

Categories
Linux Software

Enabling SSH installation of Data Protector clients

Just a quick how-to- make sure that you can install new Data Protector clients using SSH.

All this is done FROM the Linux the installation server, using the root user.

First of all, you have to copy the .omnirc-file if you have not done it before.
cp /opt/omni/.omnirc.TMPL /opt/omni/.omnirc

Then, edit the .omnirc file in /opt/omnic/ and make sure that OB2_SSH_ENABLED is set to “1”.

Then you need to make sure that the installation server can SSH to the client(s) without being asked for a password. If you do not have a SSH-key, you can generate one by running ssh-keygen.

Now copy your public key to the client(s) that you are going to install Data Protector on, by running ssh-copy-id root@<client>. Test it afterwards by SSHing to the client(s), if you do not get asked by a password, you are good to go!

PS: You have to SSH to the client at least once, as you will be asked to confirm the client certificate the first time.