added gitignore

This commit is contained in:
Marc Mance
2024-06-04 13:17:20 -04:00
parent a4e2b739dd
commit 48292c6730
2 changed files with 10 additions and 11 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
*.csv
test.sh

View File

@@ -1,8 +1,6 @@
#!/bin/bash
minutes=$1
echo "THIS SCRIPT IS FOR FREEBSD."
echo ""
echo "This script will scrape:"
@@ -12,7 +10,6 @@ echo "- CPU/Memory via top"
echo "- Disk Stats via gstat"
echo "- ZFS Pool vai zpool iostat"
echo ""
echo "Output will be a series of csv files."
echo "------------------------"
echo "./collect.sh 60 - will collect for 60 minutes."
echo "------------------------"
@@ -20,14 +17,16 @@ echo ""
echo "This script will auto uploaded data to ftp.ixsystems.com when completed."
echo "It will also copy the '*.csv' files to /var/log"
echo "Airgapped systems will need to upload the '*.csv' and/or take a debug."
echo ""
echo ""
echo "Starting gstat Collection"
echo "Starting iostat Collection"
echo "Starting zpool iostat Collection"
echo "Starting cpu Collection"
echo "Starting nic Collection"
echo ""
echo -n "minute:"
for (( i=1; i<=$minutes; i++ )); do
timeout 2s gstat -C -s -d -o -p -I 60s >> gstat.csv &
@@ -36,12 +35,11 @@ for (( i=1; i<=$minutes; i++ )); do
python3 topstat.py
python3 ifstat.py
echo -n " $i"
# Wait for 60 seconds before the next iteration
echo -n " $i"
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
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