Tuesday, June 8, 2021

XCH - Chia Coin hit 23.065 ExaBytes this morning

Tue 08 Jun 2021 03:41:02 PM UTC
------------------------------------------------------------------
--     chia farm summary                                        --
------------------------------------------------------------------
Farming status: Farming
Total chia farmed: 0.0
User transaction fees: 0.0
Block rewards: 0.0
Last height farmed: 0
Plot count: 412
Total size of plots: 40.782 TiB
Estimated network space: 20486.711 PiB
Expected time to win: 3 months and 2 weeks

I’m at 412 plots or 40.782 TBytes. That’s a lot of storage to be using for something
that’s not really doing anything or making anything. But, I’ll continue on for another
couple months. I’m using about 1.8TB of storage a day for Chia… I’ll run out of
spare space in another month or so..

Anyway, here is my idea. There is a MASSIVE amount of storage being reserved for
chia that’s basically Lottery Tickets. Wouldn’t it be cool if all that storage was
actually being used for something? Say, GENOME Research? Heya Bram Cohen !!!

You are the one who setup bit torrent, I know it’d be pretty easy to have data shared
across multiple computers and without to much impact on the computers doing the
storage you could store stuff inside of all those files. Distribute 1 PB across 10,000
files and do block assembly at the head end. Heck even store them on 10 computers
for faster read or 100. Nobody wants to take them down for sake of potentially loosing
out on the Lottery… So a file could be recreated pretty easily.

Or calculating PI to some insane number…. Or something scientific. I could think of
a few math problems that would be intersting.

Or Perhaps that’s already the plan?

23PB That’s larger than all the data storage companies put together. It’s such a big
number it’s hard to imagine Only things I could come up with only look at what an
actual PB is, not X23….

Wednesday, September 2, 2020

RAID STATS / Temperature to MRTG

MRTG wants 4 attributes.
In / Out / Uptime / Hostname.

So I put those 4 things into a file…. n4.$DRIVE
for each drive in the array. Then I’m going to use cron to run this
script (Below) which puts it on a samba share that has the server
that’s running MRTG. Which will also have a cron job that will be
polling that file every 5 minutes. Then running MRTG to grab that
data and store it in it’s log file.

Then It’ll give me out 5 sets of graphs with the temperature displayed
over the last 24 / 48 hours.

I used Drive Temp from SYSCTL
Raspberian Temperature to grab the CPU Temp (Which is an independent device from the drives)
as well as grabbing uptime and hostname…

root@nas4:~/bin# cat raidtemp.mrtg
#!/bin/bash
##########################################################
#
#    Use Smartctl to get drive temperature
#
##########################################################
GREP=/usr/bin/grep
CAT=/usr/bin/cat
ECHO=/usr/bin/echo
SCTL="/usr/sbin/smartctl --all"
FIND="ature_Cels"
DATE=`/usr/bin/date +"%m.%d.%y.%H.%M"`
AWK=/usr/bin/awk
CPUTEMP="/root/bin/temp"
FINDCPU="temp"
UPTIME=`/usr/bin/uptime`
HOSTNAME=`$CAT /etc/HOSTNAME`
FILELOC=/home/digitemp/n4

#
#  It'll ignore unfound drives, so list em all
#
DRIVES=(/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf)
#
#
#
for i in "${DRIVES[@]}"
 do
   DRIVE=`$ECHO $i | $AWK -F/ '{print $3}'`
   TEMP=`$SCTL $i | $GREP $FIND | $AWK -F- '{print $2}' | $AWK '{print $1}'`
   CPUTMP=`$CPUTEMP | $GREP $FINDCPU | $AWK -F: '{print $2}' | $AWK -F. '{print $1}'`

   if [ ! -z "$TEMP" ]
   then
    $ECHO $TEMP > $FILELOC.$DRIVE
    $ECHO $CPUTMP >> $FILELOC.$DRIVE
    $ECHO $UPTIME >> $FILELOC.$DRIVE
    $ECHO $HOSTNAME >> $FILELOC.$DRIVE
   fi
 done

root@nas4:~/bin#

Getting temperature from the CPU is fairly simple / straightforward as well

root@nas4:~/bin# cat temp
#!/bin/bash

# SARPi Project : http://sarpi.fatdog.nl - cpu_status.sh
#
# Raspberry Pi 2, 3, 4 - CPU clock frequency and thermal status.
# This script outputs the current status of the CPU clock speed (MHz)
# and core temperature (Celsius) for monitoring or testing purposes
# while under load or idle.
#
# Usage -
# Default command:   watch ./cpu_status.sh     # 2 seconds refresh
# Timed refresh:     watch -n<number of seconds or 0> ./cpu_status.sh
# With highlights:   watch -d -n0 ./cpu_status.sh
# Perm highlights:   watch -d=cumulative -n0 ./cpu_status.sh
#
# Exaga : 15 Jan 2018 - progenitor
#         29 Jun 2019 - updated with rpi model & hw revision
#         03 Jul 2019 - updated with system uptime
#

# Get RPi model and hardware revision
RPiModel=$(dmesg | grep "Machine model:" | cut -d' ' -f10-16)
RPiHWRev=$(cat /proc/cpuinfo | grep Revision | cut -d' ' -f2)

# Get cpu_status function
cpu_status () {
# Get current CPU frequency (All 4 cores)
CPU0freq=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq)
cpuFreq0=$(($CPU0freq/1000))
if [ -f /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq ]; then
CPU1freq=$(cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq)
cpuFreq1=$(($CPU1freq/1000))
CPU2freq=$(cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq)
cpuFreq2=$(($CPU2freq/1000))
CPU3freq=$(cat /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq)
cpuFreq3=$(($CPU3freq/1000))
fi

# Ouput RPi model/version and system uptime to terminal
echo Device": "$RPiModel
echo HW Rev": "$RPiHWRev
echo
echo Uptime":"$(uptime)
echo

# Output CPU clock status to terminal
echo CPU Clock Speed
echo CPU 0 freq": "$cpuFreq0"MHz"
if [ -f /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq ]; then
echo CPU 1 freq": "$cpuFreq1"MHz"
echo CPU 2 freq": "$cpuFreq2"MHz"
echo CPU 3 freq": "$cpuFreq3"MHz"
fi
echo

# Get CPU thermal status and output to terminal
echo CPU Thermal Status
cpuTemp0=$(cat /sys/class/thermal/thermal_zone0/temp)
cpuTemp1=$(($cpuTemp0/1000))
cpuTemp2=$(($cpuTemp0/100))
cpuTempM=$(($cpuTemp2 % $cpuTemp1))
echo CPU temp": "$cpuTemp1"."$cpuTempM"°C"

# Output exit method to terminal
echo && echo && echo && echo
echo "[Press CTRL+C to exit.]"
}

# Roll cpu_status function
cpu_status

exit 0

#eofroot@nas4:~/bin#

And the Finished Product:


Tuesday, August 25, 2020

Flight Aware

I started running Fligtaware from my home the other day 8/1/20

With a (5 / 7) DBi Antenna

Flightaware Opens in a new Window

and then again on 8/15/20 with another antenna (9 / 10 / 12 DBi)

Flightaware 2
Opens in a new window

The 5/7 is on the roof. The 9/10/12 DBi is in my office.

Going to be putting the larger antenna up on the roof in the near future.

Monday, August 24, 2020

Communion

So one of my favorite Cartoonists Ralph Bakshi wrote a movie called Wizards in thee 70’s.

I’m a new catholic. Or not actually a Catholic yet. I’m just going through their indoctrination phase right now. Anyway, Every time I see the Bible March or Communion. I see the Scene from Wizards where the two priests are caught “sleeping” in the temple and they have to do their “thing”.

It’s a hilarious movie and was kind of a cult movie while I was in college.

I have several of his signed Cells from that movies. Probably 5 or 6. I’m working on getting them framed and up on the walls. Maybe someday I’ll get them displayed ;)

RAID STATS

Added a RAID 5 array to my storage units and needed to be able to gather
more information than just the cat /proc/mdstat. So I use a combination of

mdadm
smartctl

I wrote a little shelll script. It’s not very efficient, but I dont’ have time right now to make it more efficient, and it does the job. Yeah, it’s making lots of calls but Oh well, it’s not a busy drive right now and the system is basically empty 1 TB used on a 16 TB System, with nobody really using it. So it’s empty.


#!/bin/bash
##########################################################
#    Use Smartctl to get RAID Infor / Stat / Temp / Hours
##########################################################
GREP=/usr/bin/grep
ECHO=/usr/bin/echo
SCTL="/usr/sbin/smartctl --all"
FIND1="ature_Cels"
FIND2="Power_On"
DATE=`/usr/bin/date +"%m.%d.%y.%H.%M"`
AWK=/usr/bin/awk
CAT=/usr/bin/cat
MDADM="/sbin/mdadm --detail /dev/md127"
DRIVES=(/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf)
#
# RAID STATS
#
$ECHO "=================================="
$CAT /proc/mdstat
$ECHO "=================================="
$ECHO "Drive STATUS:"
$MDADM | $GREP clean
$MDADM | $GREP Failed
$ECHO "=================================="
$ECHO "Active DRIVE(s):"
$MDADM | $GREP active
$ECHO "=================================="
#
#  TEMP Stats
#
$ECHO "DRIVE Temperature(s):"
for i in "${DRIVES[@]}"
 do
   TEMP=`$SCTL $i | $GREP $FIND1 | $AWK -F- '{print $2}' | $AWK '{print $1}'`
   if [ ! -z "$TEMP" ]
   then
    echo $DATE:$i:$TEMP
   fi
 done
#
# HOURS Stats
#
$ECHO "=================================="
#
$ECHO "Power ON HOUR(s):"
for i in "${DRIVES[@]}"
 do
   TEMP=`$SCTL $i | $GREP $FIND2 | $AWK -F- '{print $2}' | $AWK '{print $1}'`
   if [ ! -z "$TEMP" ]
   then
    echo $DATE:$i:$TEMP
   fi
 done

Which gives me a nice result…

root@nas4:~/bin# ./raidstat
==================================
Personalities : [raid6] [raid5] [raid4]
md127 : active raid5 sdc1[2] sdb1[1] sde1[5] sdd1[3] sda1[0]
      15627540480 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
      bitmap: 0/30 pages [0KB], 65536KB chunk

unused devices: <none>
==================================
             State : clean
    Failed Devices : 0
==================================
Active DRIVE
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1
       5       8       65        4      active sync   /dev/sde1
==================================
DRIVE Temperatures:
08.24.20.08.27:/dev/sda:38
08.24.20.08.27:/dev/sdb:37
08.24.20.08.27:/dev/sdc:34
08.24.20.08.27:/dev/sdd:37
08.24.20.08.27:/dev/sde:36
==================================
Power ON HOURS:
08.24.20.08.27:/dev/sda:576
08.24.20.08.27:/dev/sdb:517
08.24.20.08.27:/dev/sdc:517
08.24.20.08.27:/dev/sdd:516
08.24.20.08.27:/dev/sde:517

So Now I have a nice little script I’m going to setup a cron job to run and then every morning It’ll e-mail me a copy of the results for me to check out and make sure there isn’t any problems with the NAS drive. I’m not actively on these NAS devices so I want to make sure that nothing happens to the RAID Array while I’m watching TV or something else. I just want to set it up and forget about it. Stick more stuff on it and have it do it’s thing in the background.
====================
So now I have 4 RAID systems in the Da Attic
N1 RAID 1 16TB Active 16TB Mirroring
N2 RAID 1 8TB Active 8 TB Mirroring
N3 RAID 1 16TB Active 16TB Mirroring
N4 RAID 5 16TB Active
====================

Grand total of 56TB Protected raid. I’m thinking about moving some of the RAID 1 to RAID 5. I just haven’t decided if I trust RAID 5 yet. I’ve been running it for a few weeks. I just don’t have any way to backup the system. So If I loose it I loose it. Right now I’m not really needing it, so I have it running and I’m playing with it to see if I loose anything on it. I’m thinking the first time I loose it I’ll probably nix the idea of using RAID 5. I’ve had that problem in the past. But that was 13 years ago. RAID has come a long way since then. I guess I’ll wait and see.