Archivo de la categoría: General

memory sar

#!/bin/bash
DATE=`date +%Y%m%d%M%s`
SIZE=`free |grep Mem|awk ‘{print $3}’`
SIZE=50001
if [ $SIZE -ne 50000 ]; then
ps axuww > /var/log/sa/sar-$DATE.log
sar -x ALL 1 5 >> /tmp/sar-$DATE.log
gzip /var/log/sa/sar-$DATE.log
hostname -d -f |mail -s «MEMORIA en uso sobre $SIZE» maceta @  macetadura.cl

orvibo ha

- platform: orvibo
discovery: false
switches:
- host: 192.168.0.20
mac: ac:
name: "kk"

api:

sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /space/32G
- type: memory_free

homekit:

shell_command:
rclone32: 'sudo mount /space/32G ;sudo /usr/bin/rclone sync /space/nextcloud/ /space/32G/ -P;/home/homeassistant/checkmountusb'
eject32: 'sudo sync; sudo umount /space/32G;/home/homeassistant/checkmountusb'
mount32: 'sudo mount /space/32G;/home/homeassistant/checkmountusb'


binary_sensor:
- platform: mqtt
name: USB32G
state_topic: "home/usb/mount"
payload_on: "1"
payload_off: "0"