File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,13 @@ Activity:
9999
100100As user ** root** , download the latest version of the scripts collection (see [ Releases] ( https://github.com/Azmodey/ch_dba_scripts/releases ) page):
101101```
102- # wget https://github.com/Azmodey/ch_dba_scripts/archive/1.0 .0.tar.gz
102+ # wget https://github.com/Azmodey/ch_dba_scripts/archive/1.1 .0.tar.gz
103103```
104104
105105Extract script files to separate directory (for example ** ~ scripts/** ) and grant the necessary execution rights:
106106```
107- # tar xvzf 1.0 .0.tar.gz
108- # mv ch_dba_scripts-1.0 .0/scripts ~/scripts
107+ # tar xvzf 1.1 .0.tar.gz
108+ # mv ch_dba_scripts-1.1 .0/scripts ~/scripts
109109# chmod 700 ~/scripts/*.sh
110110```
111111
Original file line number Diff line number Diff line change 11#! /bin/bash
2+
23# ClickHouse activity
34
45
@@ -85,16 +86,16 @@ if [[ $PLATFORM == "Red Hat Enterprise Linux Server" || $PLATFORM == "CentOS Lin
8586 IOSTAT_UTIL=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 15`
8687fi
8788if [[ $PLATFORM == " Debian GNU/Linux" ]]; then
88- IOSTAT_R_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 11`
89- IOSTAT_W_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 12`
90- IOSTAT_UTIL=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 17`
89+ IOSTAT_R_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 11 | sed ' s/,/./g ' `
90+ IOSTAT_W_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 12 | sed ' s/,/./g ' `
91+ IOSTAT_UTIL=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 17 | sed ' s/,/./g ' `
9192
9293 IOSTAT_AWAIT=` awk " BEGIN {print ($IOSTAT_R_AWAIT +$IOSTAT_W_AWAIT )/2}" `
9394fi
9495if [[ $PLATFORM == " Ubuntu" ]]; then
95- IOSTAT_R_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 7`
96- IOSTAT_W_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 13`
97- IOSTAT_UTIL=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 22`
96+ IOSTAT_R_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 7 | sed ' s/,/./g ' `
97+ IOSTAT_W_AWAIT=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 13 | sed ' s/,/./g ' `
98+ IOSTAT_UTIL=` iostat -d -x -g ALL | grep ALL | tr -s " " | cut -d " " -f 22 | sed ' s/,/./g ' `
9899
99100 IOSTAT_AWAIT=` awk " BEGIN {print ($IOSTAT_R_AWAIT +$IOSTAT_W_AWAIT )/2}" `
100101fi
You can’t perform that action at this time.
0 commit comments