updated
This commit is contained in:
@@ -6,7 +6,6 @@ import os
|
||||
import shutil
|
||||
import socket
|
||||
import platform
|
||||
import tarfile
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
@@ -285,6 +284,7 @@ def collect_data(minutes):
|
||||
coreMemstat()
|
||||
|
||||
if i == minutes:
|
||||
print("")
|
||||
print("")
|
||||
break
|
||||
|
||||
@@ -388,6 +388,7 @@ def main():
|
||||
for i in range(minutesToWait):
|
||||
print(f"{i} ", end="", flush=True)
|
||||
time.sleep(minutesToWait * 60)
|
||||
print("")
|
||||
|
||||
print("Starting Collection")
|
||||
|
||||
|
||||
36
readme.org
36
readme.org
@@ -220,3 +220,39 @@ ziostat = [
|
||||
"trim_wait",
|
||||
"rebuld_wait",
|
||||
]
|
||||
|
||||
|
||||
* Example
|
||||
|
||||
#+begin_src shell
|
||||
root@m40g2-124a[~/statscollect]# python3 collect.py
|
||||
########################################################################
|
||||
# FreeNAS CORE/SCALE performance capture script v.02 #
|
||||
########################################################################
|
||||
# This script collects cpu/mem/disk/network/pool #
|
||||
# When it is completed, it will copy csv files to your /var/log folder #
|
||||
# It will then attempt to take a debug and upload both to our FTP #
|
||||
# If not connected to the internet, it will have to be manually d/l #
|
||||
########################################################################
|
||||
# Running this script repeatedly will append results to CSV files #
|
||||
# - https://gitlab.komputernerds.com/mmance/statscollect - #
|
||||
########################################################################
|
||||
|
||||
Enter the duration in minutes: 5
|
||||
Enter the delay before capture in minutes: 2
|
||||
Delaying capture by 2 minutes...
|
||||
0 1 Starting Collection
|
||||
Minute: 0 1 2 3 4
|
||||
Copied 'ifStat.csv' to /var/log successfully.
|
||||
Copied 'gstat.csv' to /var/log successfully.
|
||||
Copied 'cpuStat.csv' to /var/log successfully.
|
||||
Copied 'boot-pool-zio.csv' to /var/log successfully.
|
||||
Copied 'memStat.csv' to /var/log successfully.
|
||||
Copied 'tank-zio.csv' to /var/log successfully.
|
||||
Taking new debug.
|
||||
% Total % Received % Xferd Average Speed Time Time Time Current
|
||||
Dload Upload Total Spent Left Speed
|
||||
100 1969k 0 0 100 1969k 0 2055k --:--:-- --:--:-- --:--:-- 2055k
|
||||
Data collection and upload completed.
|
||||
root@m40g2-124a[~/statscollect]#
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user