#!/bin/bash

export TZ="Europe/Stockholm"

LOGPATH="/home/ubuntu/control/logs"
LOGFILE="$LOGPATH/$(date "+%F").log"

timestamp() {
    date "+%R"
}

load() {
    cat /proc/loadavg | awk '{print $1}'
}

echo "$(timestamp) $(load)" >> $LOGFILE
