Skip to content

Commit 586e77d

Browse files
committed
Version 1.1.0
1 parent 1ff66de commit 586e77d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ Activity:
9999

100100
As 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

105105
Extract 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

scripts/clickhouse_activity.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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`
8687
fi
8788
if [[ $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}"`
9394
fi
9495
if [[ $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}"`
100101
fi

0 commit comments

Comments
 (0)