Skip navigation.
Home

MySQL

Tools: What file system?

On Linux, you have a plethora of File Systems available.

Recently I was testing databases (MySQL, MariaDB) especially with ThreadPool against a Violin Flash Memory Array, and I forgot what file system the LUN was mounted (and formatted) as.

There are two ways to find out:

  • df -T (show mounted life systems, along with the FS type)
  • file -s /dev/xxx (show more details about a FS node)

Weather station

I wanted to add a weather station to my home automation system for a number of reasons...

  • watering lawn (temperature, season, moisture, dew point)
  • weather (temperature, chance of rain)
  • historical (collect data over years)

In 2006, I bought the weather station WS2300 and integrated it in a number of ways.

  • I have a sizable MySQL database, so using the mysql2300 module, I stick weather data into the database every 10 minutes

Water the lawn if temperature exceeded 80 degrees

I read somewhere that you should do extra watering of lawn (after sunset), if the temperature exceeded 80° F during the day.

So, a really quick hack works like this:

A bash script
#!/bin/bash

TEMP="`/usr/bin/mysql -ss open2300 -e \"SELECT FLOOR(MAX(temp_out)) FROM weather GROUP BY (rec_date) ORDER BY rec_date DESC LIMIT 1;\"`"
if [ "$TEMP" -ge 80 ]; then
/root/water-on.exp
/root/water2.exp 120 1
/root/water3.exp 120 1
fi

Syndicate content