225 lines
3.5 KiB
Org Mode
225 lines
3.5 KiB
Org Mode
* about
|
|
This program has been tested on TrueNAS CORE and SCALE
|
|
Will automatically upload to our FTP server.
|
|
|
|
If they are airgapped, they can take a debug to get stats.
|
|
|
|
* clone repo
|
|
|
|
#+begin_src shell
|
|
git clone https://gitlab.komputernerds.com/mmance/statscollect.git
|
|
#+end_src
|
|
|
|
* run program
|
|
|
|
#+begin_src shell
|
|
cd statscollect
|
|
python3 collect.py
|
|
#+end_src
|
|
|
|
|
|
* collection on CORE
|
|
|
|
** Disk
|
|
|
|
#+begin_src shell
|
|
iostat -xyd 1 1
|
|
#+end_src
|
|
|
|
iostat = [
|
|
"timestamp",
|
|
"name",
|
|
"read_s",
|
|
"rkB_s",
|
|
"rrqm_s",
|
|
"%rrqm",
|
|
"r_await",
|
|
"rareq-sz",
|
|
"w_s",
|
|
"wkB_s",
|
|
"wrqm_s",
|
|
"%wrqm",
|
|
"w_await",
|
|
"wareq-sz",
|
|
"d_s",
|
|
"dkB_s",
|
|
"drqm_s",
|
|
"%drqm",
|
|
"d_await",
|
|
"dareq-sz",
|
|
"f_s",
|
|
"f_await",
|
|
"aqu-sz",
|
|
"%utilread_s",
|
|
]
|
|
|
|
** CPU
|
|
#+begin_src shell
|
|
iostat -c 1 1
|
|
#+end_src
|
|
|
|
cpustat = [
|
|
"timestamp",
|
|
"name",
|
|
"%user",
|
|
"%nice",
|
|
"%system",
|
|
"%iowait",
|
|
"%steal",
|
|
"%idle",
|
|
]
|
|
|
|
** Memory
|
|
|
|
#+begin_src shell
|
|
top -bn 1
|
|
#+end_src
|
|
|
|
memstat = [
|
|
"timestamp",
|
|
"name",
|
|
"mem_active",
|
|
"mem_inactive",
|
|
"mem_wired",
|
|
"mem_free",
|
|
]
|
|
|
|
|
|
** Network
|
|
|
|
#+begin_src shell
|
|
ifstat -znq 1 1
|
|
#+end_src
|
|
ifstat = [
|
|
"timestamp",
|
|
"name",
|
|
"Kbps_in",
|
|
"Kbps_out",
|
|
]
|
|
** ZFS
|
|
|
|
#+begin_src shell
|
|
zpool iostat -Tu -l -p -v -y 15 1
|
|
#+end_src
|
|
ziostat = [
|
|
"timestamp",
|
|
"name",
|
|
"capacity_alloc",
|
|
"capacity_free",
|
|
"ops_read",
|
|
"ops_write",
|
|
"bandwidth_read",
|
|
"bandwidth_write",
|
|
"total_wait_read",
|
|
"total_wait_write",
|
|
"disk_wait_read",
|
|
"disk_wait_write",
|
|
"syncq_wait_read",
|
|
"syncq_wait_write",
|
|
"asyncq_wait_read",
|
|
"asyncq_wait_write",
|
|
"scrub_wait",
|
|
"trim_wait",
|
|
"rebuld_wait",
|
|
]
|
|
|
|
* collection on SCALE
|
|
|
|
** Disk
|
|
|
|
#+begin_src shell
|
|
gstat -C -s -d -o -p -I 5s
|
|
#+end_src
|
|
|
|
gstat = [
|
|
"timestamp",
|
|
"name",
|
|
"q-depth",
|
|
"total_ops_s",
|
|
"read_s",
|
|
"read_sz-KiB",
|
|
"read-KiB_s",
|
|
"ms_read",
|
|
"write_s",
|
|
"write_sz-KiB",
|
|
"write-KiB_s",
|
|
"ms_write",
|
|
"delete_s",
|
|
"delete-sz-KiB",
|
|
"delete-KiB_s",
|
|
"ms_delete",
|
|
"other_s",
|
|
"ms_other",
|
|
"%busy",
|
|
]
|
|
|
|
** CPU
|
|
|
|
#+begin_src shell
|
|
iostat -C -t proc -d
|
|
#+end_src
|
|
|
|
cpustat = [
|
|
"timestamp",
|
|
"name",
|
|
"%user",
|
|
"%nice",
|
|
"%system",
|
|
"%iowait",
|
|
"%steal",
|
|
"%idle",
|
|
]
|
|
|
|
** Memory
|
|
|
|
#+begin_src shell
|
|
top -n 1
|
|
#+end_src
|
|
|
|
memstat = [
|
|
"timestamp",
|
|
"name",
|
|
"mem_active",
|
|
"mem_inactive",
|
|
"mem_wired",
|
|
"mem_free",
|
|
]
|
|
|
|
** Network
|
|
|
|
#+begin_src shell
|
|
ifstat -znq 1 1
|
|
#+end_src
|
|
ifstat = [
|
|
"timestamp",
|
|
"name",
|
|
"Kbps_in",
|
|
"Kbps_out",
|
|
]
|
|
** ZFS
|
|
|
|
#+begin_src shell
|
|
zpool iostat -Tu -l -p -v -y 15 1
|
|
#+end_src
|
|
ziostat = [
|
|
"timestamp",
|
|
"name",
|
|
"capacity_alloc",
|
|
"capacity_free",
|
|
"ops_read",
|
|
"ops_write",
|
|
"bandwidth_read",
|
|
"bandwidth_write",
|
|
"total_wait_read",
|
|
"total_wait_write",
|
|
"disk_wait_read",
|
|
"disk_wait_write",
|
|
"syncq_wait_read",
|
|
"syncq_wait_write",
|
|
"asyncq_wait_read",
|
|
"asyncq_wait_write",
|
|
"scrub_wait",
|
|
"trim_wait",
|
|
"rebuld_wait",
|
|
]
|