Initial commit

This commit is contained in:
Marc Mance
2024-04-30 15:25:47 -04:00
commit 8ae4a2e656
3 changed files with 444 additions and 0 deletions

22
collect.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
greeting="Running perfcollect for $1 minutes"
echo "$greeting"
echo "Will auto upload to iXsystem when completed."
echo "Airgapped Systems will need to exfiltrate /root/*.csv"
python3 ./collect.zpool.iostat.py --minutes $1
start_time=$(date +%s) # Get start time in seconds since epoch
duration=$(($1*60)) # Set duration in seconds (here: 5 minutes)
gstat -C -s -d -o -p -I 60s > /root/gstat.csv & # Run the command in the background
while [[ $(($(date +%s) - $start_time)) -lt $duration ]]; do
sleep 1
done
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