Files
statscollect/collect.sh
2024-04-30 15:55:37 -04:00

20 lines
593 B
Bash
Executable File

#!/bin/bash
minutes=$1
greeting="Running perfcollect for $minutes minutes"
echo "$greeting"
echo "Will auto upload to iXsystem when completed."
echo "Airgapped Systems will need to exfiltrate /root/*.csv"
echo ""
python3 ./collect.zpool.iostat.py --minutes $minutes &
echo "running gstat"
timeout "$minutes"m gstat -C -s -d -o -p -I 60s > /root/gstat.csv &
cp /root/zpool_iostat.csv /root/gstat.csv /var/log
DEBUGFILE=`midclt call system.debug_generate -job` && export DEBUGFILE
curl --user customer:ixcustomer -T $DEBUGFILE ftp.ixsystems.com/debug-`hostname`-`date +%Y%m%d%H%M`.tgz