29 lines
703 B
Bash
Executable File
29 lines
703 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 ""
|
|
|
|
|
|
iterations=$1
|
|
|
|
for (( i=1; i<=$iterations; i++ )); do
|
|
# Execute the command
|
|
echo "Executing $i Iteration"
|
|
echo "Processing zpool iostat"
|
|
python3 ixiostat.py
|
|
echo "Processing gstat"
|
|
gstat -C -s -d -o -p >> /root/gstat.csv
|
|
# 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
|