Kod: Markera allt
sudo apt-get install python
Tackar...Fixat!Sundhult skrev:Det där funkade bra för en Ubuntu 10.04 LTS också, även om det står 8.10 i texten. Kanske skulle ändras för att kännas mer up to date?
//.D
Kod: Markera allt
#!/bin/bash
# Script to create rrd-file
# 24h with 2,5 min resolution
# 7d with 5 min resolution
# 1y with 10 min resolution
# 20y with 1h resolution
directory="/home/niklas/rrddata/"
filename="outside_temp.rrd"
# Check i file already exist
if [ ! -f "$directory$filename" ]
then
# File doesn´t exist, create new rrd-file
echo "Creating RRDtool DB for outside temp sensor"
rrdtool create $directory$filename \
--step 150 \
DS:outsidetemp:GAUGE:300:-50:60 \
RRA:AVERAGE:0.5:1:576 \
RRA:AVERAGE:0.5:2:2016 \
RRA:AVERAGE:0.5:4:52560 \
RRA:AVERAGE:0.5:24:175200 \
RRA:MAX:0.5:1:576 \
RRA:MAX:0.5:2:2016 \
RRA:MAX:0.5:4:52560 \
RRA:MAX:0.5:24:175200 \
RRA:MIN:0.5:1:576 \
RRA:MIN:0.5:2:2016 \
RRA:MIN:0.5:4:52560 \
RRA:MIN:0.5:24:175200 \
echo "Done!"
else
echo $directory$filename" already exist, delete it first."
fi
Kod: Markera allt
RRA:MIN:0.5:4:52560 \
RRA:MIN:0.5:24:175200 \
echo "Done!"
else
echo $directory$filename" already exist, delete it first."
fi
Kod: Markera allt
RRA:MIN:0.5:4:52560 \
RRA:MIN:0.5:24:175200
echo "Done!"
else
echo $directory$filename" already exist, delete it first."
fi
Kod: Markera allt
sudo apt-get install owfs
Kod: Markera allt
sudo owfs -u --allow_other /mnt/1wire/
Kod: Markera allt
server: usb = all
Kod: Markera allt
find /mnt/1wire/ -maxdepth 2 -name temperature
find /mnt/1wire/ -maxdepth 2 -name humidity