new zpool iostat scrape command from scratch

This commit is contained in:
Marc Mance
2024-05-29 18:24:15 -04:00
parent 33746e0b54
commit e68681e00f
3 changed files with 131 additions and 4 deletions

View File

@@ -8,12 +8,23 @@ 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
iostat="python3 ixiostat.py "
gstat="gstat -C -s -d -o -p -I 60s >> /root/gstat.csv"
iterations=$1
for (( i=1; i<=$iterations; i++ )); do
# Execute the command
$gstat
$iostat
# Wait for 60 seconds before the next iteration
sleep 60
done
cp *.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