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

3
.gitignore vendored
View File

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

View File

@@ -1,8 +1,6 @@
#!/bin/bash #!/bin/bash
minutes=$1 minutes=$1
echo "THIS SCRIPT IS FOR FREEBSD." echo "THIS SCRIPT IS FOR FREEBSD."
echo "" echo ""
echo "This script will scrape:" echo "This script will scrape:"
@@ -12,7 +10,6 @@ echo "- CPU/Memory via top"
echo "- Disk Stats via gstat" echo "- Disk Stats via gstat"
echo "- ZFS Pool vai zpool iostat" echo "- ZFS Pool vai zpool iostat"
echo "" echo ""
echo "Output will be a series of csv files."
echo "------------------------" echo "------------------------"
echo "./collect.sh 60 - will collect for 60 minutes." echo "./collect.sh 60 - will collect for 60 minutes."
echo "------------------------" echo "------------------------"
@@ -20,14 +17,16 @@ echo ""
echo "This script will auto uploaded data to ftp.ixsystems.com when completed." 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 "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 "Airgapped systems will need to upload the '*.csv' and/or take a debug."
echo ""
echo ""
echo "Starting gstat Collection" echo "Starting gstat Collection"
echo "Starting iostat Collection" echo "Starting iostat Collection"
echo "Starting zpool iostat Collection" echo "Starting zpool iostat Collection"
echo "Starting cpu Collection" echo "Starting cpu Collection"
echo "Starting nic Collection" echo "Starting nic Collection"
echo ""
echo -n "minute:" echo -n "minute:"
for (( i=1; i<=$minutes; i++ )); do for (( i=1; i<=$minutes; i++ )); do
timeout 2s gstat -C -s -d -o -p -I 60s >> gstat.csv & 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 topstat.py
python3 ifstat.py python3 ifstat.py
echo -n " $i" echo -n " $i"
# Wait for 60 seconds before the next iteration sleep 60
sleep 60
done done
cp *.csv /var/log cp *.csv /var/log
DEBUGFILE=`midclt call system.debug_generate -job` && export DEBUGFILE 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
curl --user customer:ixcustomer -T $DEBUGFILE ftp.ixsystems.com/debug-`hostname`-`date +%Y%m%d%H%M`.tgz