-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackground.sh
More file actions
27 lines (25 loc) · 739 Bytes
/
background.sh
File metadata and controls
27 lines (25 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
path_to_executable=$(which pt-summary 2>/dev/null)
if [ -x "$path_to_executable" ] ; then
qsummary=$path_to_executable
elif [ -f pt-summary ] ; then
qsummary='./pt-summary'
else
wget percona.com/get/pt-summary
chmod a+x pt-summary
qsummary='./pt-summary'
fi
path_to_executable=$(which pt-mysql-summary 2>/dev/null)
if [ -x "$path_to_executable" ] ; then
qmysql=$path_to_executable
elif [ -f pt-mysql-summary ] ; then
qmysql='./pt-mysql-summary'
else
wget percona.com/get/pt-mysql-summary
chmod a+x pt-mysql-summary
qmysql='./pt-mysql-summary'
fi
echo "Getting background information..."
$qsummary >summary.txt 2>/dev/null
$qmysql >>summary.txt 2>/dev/null
df -h >> summary.txt