Compare commits
69 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
70750a4855 | ||
![]() |
1b9c8e588e | ||
![]() |
00ae2c9ddb | ||
![]() |
66fdb9339d | ||
![]() |
e519313752 | ||
![]() |
14b295ec92 | ||
![]() |
197e4729b0 | ||
![]() |
13ec5072fb | ||
![]() |
07fd5df5d1 | ||
![]() |
763ba10872 | ||
![]() |
fd31cc84ce | ||
![]() |
d45dd77f6d | ||
![]() |
56b7415198 | ||
![]() |
aba69e1d4e | ||
![]() |
4bb70413be | ||
![]() |
1c1c4638af | ||
![]() |
13d2783348 | ||
![]() |
828f25d828 | ||
![]() |
099d38b11d | ||
![]() |
adda63da26 | ||
![]() |
198e0d5a0d | ||
![]() |
a76ec6a051 | ||
![]() |
0dc9caaf95 | ||
![]() |
1843cf1f4f | ||
![]() |
b2c11b2d81 | ||
![]() |
def7f81455 | ||
![]() |
1286af5fd5 | ||
![]() |
4a7d0e07a9 | ||
![]() |
936843fb1b | ||
![]() |
ac43eee969 | ||
![]() |
0111b1118d | ||
![]() |
f86232b95c | ||
![]() |
6ce7155199 | ||
![]() |
2fb1ba00d5 | ||
![]() |
2542954305 | ||
![]() |
9437fb1aab | ||
![]() |
aa8de299c4 | ||
![]() |
86ccfb2fcc | ||
![]() |
5d66f40e06 | ||
![]() |
f0848b8489 | ||
![]() |
a14d551a3f | ||
![]() |
cb3fd87f09 | ||
![]() |
c29168ccaf | ||
![]() |
8899f10756 | ||
![]() |
e03ba82187 | ||
![]() |
5c48a8a0a9 | ||
![]() |
876c374bef | ||
![]() |
df93ddc45c | ||
![]() |
2f2b7680bd | ||
![]() |
216d8f9d19 | ||
![]() |
da90482071 | ||
![]() |
5c38853a05 | ||
![]() |
ffd7aca201 | ||
![]() |
30e61d917b | ||
![]() |
c2140d79f7 | ||
![]() |
d15426bfef | ||
![]() |
235cc4e0f9 | ||
![]() |
9e243c4d63 | ||
![]() |
54df506b36 | ||
![]() |
62eefc8dfa | ||
![]() |
34dcfd05c9 | ||
![]() |
cbb2534577 | ||
![]() |
d9ccab2bf7 | ||
![]() |
6cc7ff252a | ||
![]() |
cf4e6b47b7 | ||
![]() |
c1d00b994a | ||
![]() |
2c6bdbb0db | ||
![]() |
4d82fbaa56 | ||
![]() |
ca10ec7411 |
16 changed files with 678 additions and 168 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
*.md
|
||||
build/**
|
||||
Makefile
|
||||
.perltidy
|
||||
*.json
|
||||
*.png
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@ result_*
|
|||
sql/*.sql
|
||||
sql/*.csv
|
||||
cve.csv
|
||||
default*.cnf
|
||||
.env
|
54
.travis.yml
54
.travis.yml
|
@ -1,54 +0,0 @@
|
|||
language: perl
|
||||
perl:
|
||||
- "5.24"
|
||||
|
||||
os: linux
|
||||
dist: focal
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
- DB=mariadb:5.5
|
||||
- DB=mariadb:10.2
|
||||
- DB=mariadb:10.3
|
||||
- DB=mariadb:10.4
|
||||
- DB=mariadb:10.5
|
||||
- DB=mysql:5.5
|
||||
- DB=mysql:5.7
|
||||
- DB=mysql:8.0
|
||||
- DB=percona:5.6
|
||||
- DB=percona:5.7
|
||||
- DB=percona:8.0
|
||||
|
||||
install:
|
||||
- cpanm --quiet --notest Data::Dumper
|
||||
- cpanm --quiet --notest JSON
|
||||
- cpanm --quiet --notest Perl::Critic
|
||||
- cpanm --quiet --notest Text::Template
|
||||
|
||||
before_script:
|
||||
- mysql --version
|
||||
- mysqladmin --version
|
||||
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
|
||||
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
|
||||
- chmod 600 ~/.my.cnf
|
||||
- git clone https://github.com/datacharmer/test_db.git
|
||||
- cd test_db
|
||||
- count=10
|
||||
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
|
||||
- if [[ $DB =~ .*:8.0 ]] ; then
|
||||
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
|
||||
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
|
||||
done ;
|
||||
fi
|
||||
- "cat employees.sql | grep -v 'storage_engine' | mysql"
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
|
||||
|
||||
after_script:
|
||||
- docker stop mysqltestinstance
|
||||
- echo "Standard Output: $(cat stdout.txt)"
|
||||
- echo "Standard Error : $(cat stderr.txt)"
|
|
@ -127,7 +127,7 @@ these guidelines is the best way to get your work included in MySQLTuner.
|
|||
<a name="git-flow"></a>
|
||||
#### Git Flow for pull requests
|
||||
|
||||
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
|
||||
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the project, clone your fork,
|
||||
and configure the remotes:
|
||||
|
||||
```bash
|
||||
|
|
1
CURRENT_VERSION.txt
Normal file
1
CURRENT_VERSION.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2.5.4
|
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM ubuntu:latest
|
||||
|
||||
LABEL maintainer="jmrenouard@gmail.com"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recommends \
|
||||
apt-utils \
|
||||
curl \
|
||||
wget \
|
||||
perl \
|
||||
perl-doc \
|
||||
mysql-client \
|
||||
libjson-perl \
|
||||
libtext-template-perl \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p /results
|
||||
RUN apt clean all
|
||||
WORKDIR /
|
||||
COPY ./mysqltuner.pl /mysqltuner.pl
|
||||
COPY ./vulnerabilities.csv /vulnerabilities.txt
|
||||
COPY ./basic_passwords.txt /basic_passwords.txt
|
||||
COPY ./template_example.tpl /template.tpl
|
||||
|
||||
ENTRYPOINT [ "perl", "/mysqltuner.pl", "--passwordfile", "/basic_passwords.txt",\
|
||||
"--cvefile", "/vulnerabilities.txt", "--nosysstat", "--defaults-file", \
|
||||
"/defaults.cnf", "--dumpdir", "/results", "--outputfile", \
|
||||
"/results/mysqltuner.txt", "--template", "/template.tpl", \
|
||||
"--reportfile", "/results/mysqltuner.html" ]
|
||||
CMD ["--verbose" ]
|
22
Makefile
22
Makefile
|
@ -20,8 +20,9 @@ help:
|
|||
|
||||
|
||||
installdep_debian:
|
||||
apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
|
||||
cpanm File::Util
|
||||
sudo apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
|
||||
sudo cpanm File::Util
|
||||
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
|
||||
|
||||
tidy:
|
||||
dos2unix ./mysqltuner.pl
|
||||
|
@ -39,6 +40,10 @@ generate_cve:
|
|||
git add ./vulnerabilities.csv
|
||||
git commit -m "Generate CVE list at $(shell date --iso=seconds)"
|
||||
|
||||
generate_version_file:
|
||||
rm -f CURRENT_VERSION.txt
|
||||
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $$NF}' > CURRENT_VERSION.txt
|
||||
|
||||
generate_features:
|
||||
perl ./build/genFeatures.sh
|
||||
git add ./FEATURES.md
|
||||
|
@ -68,5 +73,18 @@ increment_major_version:
|
|||
git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MAJOR_VERSION) major version at $(shell date --iso=seconds)"
|
||||
git push --tags
|
||||
|
||||
docker_build:
|
||||
docker build . -t jmrenouard/mysqltuner:latest -t jmrenouard/mysqltuner:$(VERSION)
|
||||
|
||||
docker_slim:
|
||||
docker run --rm -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD):/root/app -w /root/app jmrenouard/mysqltuner:latest slim build
|
||||
|
||||
docker_push: docker_build
|
||||
bash build/publishtodockerhub.sh $(VERSION)
|
||||
|
||||
|
||||
push:
|
||||
git push
|
||||
|
||||
pull:
|
||||
git pull
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
[](https://www.buymeacoffee.com/jmrenouard)
|
||||
|
||||
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
[](https://www.buymeacoffee.com/jmrenouard)
|
||||
|
||||
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||
|
|
126
README.md
126
README.md
|
@ -34,26 +34,29 @@ MySQLTuner needs you
|
|||
|
||||
## Stargazers over time
|
||||
|
||||
[](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
|
||||
[](https://starchart.cc/major/MySQLTuner-perl)
|
||||
|
||||
|
||||
Compatibility
|
||||
====
|
||||
|
||||
Test result are available here: [Travis CI/MySQLTuner-perl](https://travis-ci.org/major/MySQLTuner-perl)
|
||||
Test result are available here:
|
||||
|
||||
* MySQL 8.0 (partial support, password checks don't work)
|
||||
* Percona Server 8.0 (partial support, password checks don't work)
|
||||
* MySQL 5.7 (full support)
|
||||
* Percona Server 5.7 (full support)
|
||||
* MariaDB 10.3 - 10.11 (full support)
|
||||
* MySQL 8.0, 8.2, 8.3 (full support)
|
||||
* Percona Server 8.0, 8.2, 8.3 (full support)
|
||||
* MariaDB 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 (full support)
|
||||
* Galera replication (full support)
|
||||
* Percona XtraDB cluster (full support)
|
||||
* Mysql Replications (partial support, no test environment)
|
||||
|
||||
* MySQL 8.1 (not supported, deprecated version)
|
||||
* Percona Server 5.7 (not supported, deprecated version)
|
||||
* MySQL 5.7 (not supported, deprecated version)
|
||||
* MySQL 5.6 and earlier (not supported, deprecated version)
|
||||
* Percona Server 5.6 (not supported, deprecated version)
|
||||
* MariaDB 10.7, 10.8, 10.9, 10.10 (not supported, deprecated version)
|
||||
* MariaDB 10.3 and earlier (not supported, deprecated version)
|
||||
* MariaDB 5.5 (not supported, deprecated version)
|
||||
* MariaDB 10.2 and earlier (not supported, deprecated version)
|
||||
|
||||
***Windows Support is partial***
|
||||
|
||||
|
@ -65,24 +68,30 @@ Test result are available here: [Travis CI/MySQLTuner-perl](https://travis-ci.or
|
|||
* Cloud based is not supported at this time (Help wanted! GCP, AWS, Azure support requested)
|
||||
|
||||
***Unsupported storage engines: PRs welcome***
|
||||
--
|
||||
|
||||
* NDB is not supported feel free to create a Pull Request
|
||||
* MyISAM is too old and no longer active
|
||||
* RockDB
|
||||
* Archive
|
||||
* Spider
|
||||
* ColummStore
|
||||
* TokuDB
|
||||
* XtraDB
|
||||
* Connect
|
||||
|
||||
Unmaintenained stuff from MySQL or MariaDB:
|
||||
--
|
||||
|
||||
* MyISAM is too old and no longer active
|
||||
* RockDB is not maintained anymore
|
||||
* TokuDB is not maintained anymore
|
||||
* XtraDB is not maintained anymore
|
||||
|
||||
* CVE vulnerabilities detection support from [https://cve.mitre.org](https://cve.mitre.org)
|
||||
|
||||
***MINIMAL REQUIREMENTS***
|
||||
|
||||
* Perl 5.6 or later (with [perl-doc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod) package)
|
||||
* Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
|
||||
* Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
|
||||
* Unrestricted read access to the MySQL server
|
||||
OS root access recommended for MySQL < 5.1
|
||||
|
||||
***WARNING***
|
||||
--
|
||||
|
@ -131,9 +140,12 @@ Optional Sysschema installation for MySQL 5.6
|
|||
--
|
||||
|
||||
Sysschema is installed by default under MySQL 5.7 and MySQL 8 from Oracle.
|
||||
By default, on MySQL 5.6/5.7/8, performance schema is enabled by default.
|
||||
By default, on MySQL 5.6/5.7/8, performance schema is enabled.
|
||||
For previous MySQL 5.6 version, you can follow this command to create a new database sys containing very useful view on Performance schema:
|
||||
|
||||
Sysschema for MySQL old version
|
||||
--
|
||||
|
||||
```bash
|
||||
curl "https://codeload.github.com/mysql/mysql-sys/zip/master" > sysschema.zip
|
||||
# check zip file
|
||||
|
@ -143,18 +155,52 @@ cd mysql-sys-master
|
|||
mysql -uroot -p < sys_56.sql
|
||||
```
|
||||
|
||||
Optional Performance schema and Sysschema installation for MariaDB < 10.6
|
||||
Sysschema for MariaDB old version
|
||||
--
|
||||
|
||||
Sysschema is not installed by default under MariaDB prior to 10.6 [MariaDB sys](https://mariadb.com/kb/en/sys-schema/)
|
||||
```bash
|
||||
curl "https://github.com/FromDual/mariadb-sys/archive/refs/heads/master.zip" > sysschema.zip
|
||||
# check zip file
|
||||
unzip -l sysschema.zip
|
||||
unzip sysschema.zip
|
||||
cd mariadb-sys-master
|
||||
mysql -u root -p < ./sys_10.sql
|
||||
```
|
||||
|
||||
By default, on MariaDB, performance schema is disabled by default. consider activating performance schema across your my.cnf configuration file:
|
||||
Performance schema setup
|
||||
--
|
||||
|
||||
By default, performance_schema is enabled and sysschema is installed on latest version.
|
||||
|
||||
By default, on MariaDB, performance schema is disabled (MariaDB<10.6).
|
||||
|
||||
Consider activating performance schema across your my.cnf configuration file:
|
||||
|
||||
```ini
|
||||
[mysqld]
|
||||
performance_schema = on
|
||||
performance-schema-consumer-events-statements-history-long = ON
|
||||
performance-schema-consumer-events-statements-history = ON
|
||||
performance-schema-consumer-events-statements-current = ON
|
||||
performance-schema-consumer-events-stages-current=ON
|
||||
performance-schema-consumer-events-stages-history=ON
|
||||
performance-schema-consumer-events-stages-history-long=ON
|
||||
performance-schema-consumer-events-transactions-current=ON
|
||||
performance-schema-consumer-events-transactions-history=ON
|
||||
performance-schema-consumer-events-transactions-history-long=ON
|
||||
performance-schema-consumer-events-waits-current=ON
|
||||
performance-schema-consumer-events-waits-history=ON
|
||||
performance-schema-consumer-events-waits-history-long=ON
|
||||
performance-schema-instrument='%=ON'
|
||||
max-digest-length=2048
|
||||
performance-schema-max-digest-length=2018
|
||||
```
|
||||
|
||||
Sysschema installation for MariaDB < 10.6
|
||||
--
|
||||
|
||||
Sysschema is not installed by default under MariaDB prior to 10.6 [MariaDB sys](https://mariadb.com/kb/en/sys-schema/)
|
||||
|
||||
You can follow this command to create a new database sys containing a useful view on Performance schema:
|
||||
|
||||
```bash
|
||||
|
@ -167,13 +213,27 @@ mysql -u root -p < ./sys_10.sql
|
|||
```
|
||||
|
||||
Errors & solutions for performance schema installation
|
||||
--
|
||||
|
||||
|
||||
ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list'
|
||||
--
|
||||
|
||||
|
||||
This error can be safely ignored
|
||||
Consider using a recent MySQL/MariaDB version to avoid this kind of issue during sysschema installation
|
||||
|
||||
In recent versions, sysschema is installed and integrated by default as sys schema (SHOW DATABASES)
|
||||
|
||||
|
||||
|
||||
ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2
|
||||
Have a look at #452 solution given by @ericx
|
||||
|
||||
Fixing sysctl configuration (/etc/sysctl.conf)
|
||||
--
|
||||
|
||||
Fixing sysctl configuration (/etc/sysctl.conf)
|
||||
|
||||
--
|
||||
It is a system wide setting and not a database setting: [Linux FS Kernel settings](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/fs.html#id1)
|
||||
|
||||
You can check its values via:
|
||||
|
@ -252,6 +312,14 @@ perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/
|
|||
|
||||
__Important__: [Text::Template](https://metacpan.org/pod/Text::Template) module is mandatory for `--reportfile` and/or `--template` options, because this module is needed to generate appropriate output based on a text template.
|
||||
|
||||
|
||||
__Usage:__ Dumping all information_schema and sysschema views as csv file into results subdirectory
|
||||
|
||||
```bash
|
||||
perl mysqltuner.pl --verbose --dumpdir=./result
|
||||
```
|
||||
|
||||
|
||||
__Usage:__ Enable debugging information
|
||||
|
||||
```bash
|
||||
|
@ -315,7 +383,6 @@ Follow instructions from Github repo
|
|||
|
||||
[GitHub AHA main repository](https://github.com/theZiz/aha)
|
||||
|
||||
|
||||
**Using AHA Html report generation**
|
||||
|
||||
perl mysqltuner.pl --verbose --color > reports.txt
|
||||
|
@ -406,15 +473,22 @@ After which, `~/.mylogin.cnf` will be created with the appropriate access.
|
|||
|
||||
To get information about stored credentials, use the following command:
|
||||
|
||||
$mysql_config_editor print
|
||||
[client]
|
||||
user = someusername
|
||||
password = *****
|
||||
host = localhost
|
||||
```bash
|
||||
$mysql_config_editor print
|
||||
[client]
|
||||
user = someusername
|
||||
password = *****
|
||||
host = localhost
|
||||
```
|
||||
|
||||
**Question: What's minimum privileges needed by a specific mysqltuner user in database ?**
|
||||
|
||||
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,SHOW DATABASES,SHOW VIEW ON *.* TO 'mysqltuner'@'localhost' identified by pwd1234;
|
||||
```bash
|
||||
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,
|
||||
SHOW DATABASES,SHOW VIEW
|
||||
ON *.*
|
||||
TO 'mysqltuner'@'localhost' identified by pwd1234;
|
||||
```
|
||||
|
||||
**Question: It's not working on my OS! What gives?!**
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
[](https://www.buymeacoffee.com/jmrenouard)
|
||||
|
||||
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://opensource.box.com/badges)
|
||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||
|
@ -36,11 +35,11 @@ MySQLTuner нуждается в вас:
|
|||
|
||||
## Количество "звезд" по времени
|
||||
|
||||
[](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
|
||||
[](https://starchart.cc/major/MySQLTuner-perl)
|
||||
|
||||
Совместимость
|
||||
====
|
||||
Результаты тестов: [Travis CI/MySQLTuner-perl](https://travis-ci.org/major/MySQLTuner-perl)
|
||||
Результаты тестов:
|
||||
* MySQL 8 (полная поддержка, проверка пароля не работает)
|
||||
* MySQL 5.7 (полная поддержка)
|
||||
* MySQL 5.6 (полная поддержка)
|
||||
|
|
9
USAGE.md
9
USAGE.md
|
@ -1,6 +1,6 @@
|
|||
# NAME
|
||||
|
||||
MySQLTuner 2.5.2 - MySQL High Performance Tuning Script
|
||||
MySQLTuner 2.6.0 - MySQL High Performance Tuning Script
|
||||
|
||||
# IMPORTANT USAGE GUIDELINES
|
||||
|
||||
|
@ -44,15 +44,20 @@ You must provide the remote server's total memory when connecting to other serve
|
|||
--template <path> Path to a template file
|
||||
--dumpdir <path> Path to a directory where to dump information files
|
||||
--feature <feature> Run a specific feature (see FEATURES section)
|
||||
=head1 OUTPUT OPTIONS
|
||||
--dumpdir <path> information_schema tables and sys views are dumped in CSV in this path
|
||||
|
||||
# OUTPUT OPTIONS
|
||||
|
||||
--silent Don't output anything on screen
|
||||
--verbose Print out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
|
||||
--color Print output in color
|
||||
--nocolor Don't print output in color
|
||||
--nogood Remove OK responses
|
||||
--nobad Remove negative/suggestion responses
|
||||
--noinfo Remove informational responses
|
||||
--debug Print debug information
|
||||
--experimental Print experimental analysis (may fail)
|
||||
--nondedicated Consider server is not dedicated to Db server usage only
|
||||
--noprocess Consider no other process is running
|
||||
--dbstat Print database information
|
||||
--nodbstat Don't print database information
|
||||
|
|
11
build/publishtodockerhub.sh
Normal file
11
build/publishtodockerhub.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -f "./.env" ] && source ./.env
|
||||
[ -f "../.env" ] && source ../.env
|
||||
|
||||
VERSION=$1
|
||||
|
||||
docker login -u $DOCKER_USER_LOGIN -p $DOCKER_USER_PASSWORD
|
||||
docker tag jmrenouard/mysqltuner:latest jmrenouard/mysqltuner:$VERSION
|
||||
docker push jmrenouard/mysqltuner:latest
|
||||
docker push jmrenouard/mysqltuner:$VERSION
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
use warnings;
|
||||
use strict;
|
||||
use WWW::Mechanize::GZip;
|
||||
|
@ -74,6 +74,7 @@ foreach my $line (<CVE>) {
|
|||
}
|
||||
}
|
||||
close(CVE);
|
||||
chmod 0644, "./cve.csv", "../vulnerabilities.csv";
|
||||
#unlink ('cve.csv') if (-f 'cve.csv');
|
||||
|
||||
exit(0);
|
||||
|
|
158
mysqltuner.pl
158
mysqltuner.pl
|
@ -1,4 +1,5 @@
|
|||
# mysqltuner.pl - Version 2.5.2
|
||||
#!/usr/bin/env perl
|
||||
# mysqltuner.pl - Version 2.6.0
|
||||
# High Performance MySQL Tuning Script
|
||||
# Copyright (C) 2015-2023 Jean-Marie Renouard - jmrenouard@gmail.com
|
||||
# Copyright (C) 2006-2023 Major Hayden - major@mhtx.net
|
||||
|
@ -56,7 +57,7 @@ use Cwd 'abs_path';
|
|||
#use Env;
|
||||
|
||||
# Set up a few variables for use in the script
|
||||
my $tunerversion = "2.5.2";
|
||||
my $tunerversion = "2.6.0";
|
||||
my ( @adjvars, @generalrec );
|
||||
|
||||
# Set defaults
|
||||
|
@ -108,6 +109,8 @@ my %opt = (
|
|||
"prettyjson" => 0,
|
||||
"reportfile" => 0,
|
||||
"verbose" => 0,
|
||||
"experimental" => 0,
|
||||
"nondedicated" => 0,
|
||||
"defaults-file" => '',
|
||||
"defaults-extra-file" => '',
|
||||
"protocol" => '',
|
||||
|
@ -150,7 +153,8 @@ GetOptions(
|
|||
'server-log=s', 'protocol=s',
|
||||
'defaults-extra-file=s', 'dumpdir=s',
|
||||
'feature=s', 'dbgpattern=s',
|
||||
'defaultarch=i'
|
||||
'defaultarch=i', 'experimental',
|
||||
'nondedicated'
|
||||
)
|
||||
or pod2usage(
|
||||
-exitval => 1,
|
||||
|
@ -208,10 +212,15 @@ $basic_password_files = "/usr/share/mysqltuner/basic_passwords.txt"
|
|||
|
||||
$opt{dbgpattern} = '.*' if ( $opt{dbgpattern} eq '' );
|
||||
|
||||
# Activate debug variables
|
||||
#if ( $opt{debug} ne '' ) { $opt{debug} = 2; }
|
||||
# Activate experimental calculations and analysis
|
||||
#if ( $opt{experimental} ne '' ) { $opt{experimental} = 1; }
|
||||
|
||||
# check if we need to enable verbose mode
|
||||
if ( $opt{feature} ne '' ) { $opt{verbose} = 1; }
|
||||
if ( $opt{verbose} ) {
|
||||
$opt{checkversion} = 1; # Check for updates to MySQLTuner
|
||||
$opt{checkversion} = 0; # Check for updates to MySQLTuner
|
||||
$opt{dbstat} = 1; # Print database information
|
||||
$opt{tbstat} = 1; # Print database information
|
||||
$opt{idxstat} = 1; # Print index information
|
||||
|
@ -586,6 +595,8 @@ sub os_setup {
|
|||
chomp($physical_memory);
|
||||
chomp($swap_memory);
|
||||
chomp($os);
|
||||
$physical_memory = $opt{forcemem}
|
||||
if ( defined( $opt{forcemem} ) and $opt{forcemem} gt 0 );
|
||||
$result{'OS'}{'OS Type'} = $os;
|
||||
$result{'OS'}{'Physical Memory'}{'bytes'} = $physical_memory;
|
||||
$result{'OS'}{'Physical Memory'}{'pretty'} = hr_bytes($physical_memory);
|
||||
|
@ -763,9 +774,9 @@ sub mysql_setup {
|
|||
$mysqladmincmd = $opt{mysqladmin};
|
||||
}
|
||||
else {
|
||||
$mysqladmincmd = which( "mysqladmin", $ENV{'PATH'} );
|
||||
$mysqladmincmd = which( "mariadb-admin", $ENV{'PATH'} );
|
||||
if ( !-e $mysqladmincmd ) {
|
||||
$mysqladmincmd = which( "mariadb-admin", $ENV{'PATH'} );
|
||||
$mysqladmincmd = which( "mysqladmin", $ENV{'PATH'} );
|
||||
}
|
||||
}
|
||||
chomp($mysqladmincmd);
|
||||
|
@ -784,9 +795,9 @@ sub mysql_setup {
|
|||
$mysqlcmd = $opt{mysqlcmd};
|
||||
}
|
||||
else {
|
||||
$mysqlcmd = which( "mysql", $ENV{'PATH'} );
|
||||
$mysqlcmd = which( "mariadb", $ENV{'PATH'} );
|
||||
if ( !-e $mysqlcmd ) {
|
||||
$mysqlcmd = which( "mariadb", $ENV{'PATH'} );
|
||||
$mysqlcmd = which( "mysql", $ENV{'PATH'} );
|
||||
}
|
||||
}
|
||||
chomp($mysqlcmd);
|
||||
|
@ -1579,12 +1590,9 @@ sub log_file_recommendations {
|
|||
while ( my $logLi = <$fh> ) {
|
||||
chomp $logLi;
|
||||
$numLi++;
|
||||
debugprint "$numLi: $logLi"
|
||||
if $logLi =~ /warning|error/i and $logLi !~ /Logging to/;
|
||||
$nbErrLog++
|
||||
if $logLi =~ /error/i
|
||||
and $logLi !~ /(Logging to|\[Warning\].*ERROR_FOR_DIVISION_BY_ZERO)/;
|
||||
$nbWarnLog++ if $logLi =~ /warning/i;
|
||||
debugprint "$numLi: $logLi" if $logLi =~ /\[(warning|error)\]/i;
|
||||
$nbErrLog++ if $logLi =~ /\[error\]/i;
|
||||
$nbWarnLog++ if $logLi =~ /\[warning\]/i;
|
||||
push @lastShutdowns, $logLi
|
||||
if $logLi =~ /Shutdown complete/ and $logLi !~ /Innodb/i;
|
||||
push @lastStarts, $logLi if $logLi =~ /ready for connections/;
|
||||
|
@ -2045,17 +2053,28 @@ sub system_recommendations {
|
|||
infoprint "User process except mysqld used "
|
||||
. hr_bytes_rnd($omem) . " RAM.";
|
||||
if ( ( 0.15 * $physical_memory ) < $omem ) {
|
||||
badprint
|
||||
if ( $opt{nondedicated} ) {
|
||||
infoprint "No warning with --nondedicated option";
|
||||
infoprint
|
||||
"Other user process except mysqld used more than 15% of total physical memory "
|
||||
. percentage( $omem, $physical_memory ) . "% ("
|
||||
. hr_bytes_rnd($omem) . " / "
|
||||
. hr_bytes_rnd($physical_memory) . ")";
|
||||
push( @generalrec,
|
||||
. percentage( $omem, $physical_memory ) . "% ("
|
||||
. hr_bytes_rnd($omem) . " / "
|
||||
. hr_bytes_rnd($physical_memory) . ")";
|
||||
}
|
||||
else {
|
||||
|
||||
badprint
|
||||
"Other user process except mysqld used more than 15% of total physical memory "
|
||||
. percentage( $omem, $physical_memory ) . "% ("
|
||||
. hr_bytes_rnd($omem) . " / "
|
||||
. hr_bytes_rnd($physical_memory) . ")";
|
||||
push( @generalrec,
|
||||
"Consider stopping or dedicate server for additional process other than mysqld."
|
||||
);
|
||||
push( @adjvars,
|
||||
);
|
||||
push( @adjvars,
|
||||
"DON'T APPLY SETTINGS BECAUSE THERE ARE TOO MANY PROCESSES RUNNING ON THIS SERVER. OOM KILL CAN OCCUR!"
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
infoprint
|
||||
|
@ -2416,17 +2435,13 @@ sub validate_mysql_version {
|
|||
|
||||
prettyprint " ";
|
||||
|
||||
if ( mysql_version_eq(8)
|
||||
or mysql_version_eq( 5, 7 )
|
||||
or mysql_version_eq( 10, 3 )
|
||||
or mysql_version_eq( 10, 4 )
|
||||
if ( mysql_version_eq(9)
|
||||
or mysql_version_eq(8, 4)
|
||||
or mysql_version_eq(8, 0)
|
||||
or mysql_version_eq( 10, 5 )
|
||||
or mysql_version_eq( 10, 6 )
|
||||
or mysql_version_eq( 10, 7 )
|
||||
or mysql_version_eq( 10, 8 )
|
||||
or mysql_version_eq( 10, 9 )
|
||||
or mysql_version_eq( 10, 10 )
|
||||
or mysql_version_eq( 10, 11 ) )
|
||||
or mysql_version_eq( 10, 11 )
|
||||
or mysql_version_eq( 11, 4 ) )
|
||||
{
|
||||
goodprint "Currently running supported MySQL version "
|
||||
. $myvar{'version'} . "";
|
||||
|
@ -2529,7 +2544,7 @@ sub check_architecture {
|
|||
}
|
||||
elsif ( `uname` =~ /Darwin/ && `uname -m` =~ /x86_64/ ) {
|
||||
|
||||
# Darwin gibas.local 12.5.2 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
|
||||
# Darwin gibas.local 12.6.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
|
||||
$arch = 64;
|
||||
goodprint "Operating on 64-bit architecture";
|
||||
}
|
||||
|
@ -3164,10 +3179,16 @@ sub calculations {
|
|||
$myvar{"innodb_buffer_pool_instances"} = 1
|
||||
unless defined( $myvar{'innodb_buffer_pool_instances'} );
|
||||
if ( $myvar{'have_innodb'} eq "YES" ) {
|
||||
$mycalc{'innodb_log_size_pct'} =
|
||||
( $myvar{'innodb_log_file_size'} *
|
||||
$myvar{'innodb_log_files_in_group'} * 100 /
|
||||
$myvar{'innodb_buffer_pool_size'} );
|
||||
if ( defined $myvar{'innodb_redo_log_capacity'} ) {
|
||||
$mycalc{'innodb_log_size_pct'} =
|
||||
( $myvar{'innodb_redo_log_capacity'} /
|
||||
$myvar{'innodb_buffer_pool_size'} ) * 100;
|
||||
} else {
|
||||
$mycalc{'innodb_log_size_pct'} =
|
||||
( $myvar{'innodb_log_file_size'} *
|
||||
$myvar{'innodb_log_files_in_group'} * 100 /
|
||||
$myvar{'innodb_buffer_pool_size'} );
|
||||
}
|
||||
}
|
||||
if ( !defined $myvar{'innodb_buffer_pool_size'} ) {
|
||||
$mycalc{'innodb_log_size_pct'} = 0;
|
||||
|
@ -3214,11 +3235,13 @@ sub calculations {
|
|||
$mystat{'Innodb_buffer_pool_pages_total'}
|
||||
) if defined $mystat{'Innodb_buffer_pool_pages_total'};
|
||||
|
||||
$mycalc{'innodb_buffer_alloc_pct'} = select_one(
|
||||
"select round( 100* sum(allocated)/( select VARIABLE_VALUE "
|
||||
. "FROM performance_schema.global_variables "
|
||||
. "WHERE VARIABLE_NAME='innodb_buffer_pool_size' ) ,2)"
|
||||
. 'FROM sys.x\$innodb_buffer_stats_by_table;' );
|
||||
my $lreq =
|
||||
"select ROUND( 100* sum(allocated)/ "
|
||||
. $myvar{'innodb_buffer_pool_size'}
|
||||
. ',1) FROM sys.x\$innodb_buffer_stats_by_table;';
|
||||
debugprint("lreq: $lreq");
|
||||
$mycalc{'innodb_buffer_alloc_pct'} = select_one($lreq)
|
||||
if ( $opt{experimental} );
|
||||
|
||||
# Binlog Cache
|
||||
if ( $myvar{'log_bin'} ne 'OFF' ) {
|
||||
|
@ -3362,10 +3385,18 @@ sub mysql_stats {
|
|||
if ( $physical_memory <
|
||||
( $mycalc{'max_peak_memory'} + get_other_process_memory() ) )
|
||||
{
|
||||
badprint
|
||||
"Overall possible memory usage with other process exceeded memory";
|
||||
push( @generalrec,
|
||||
"Dedicate this server to your database for highest performance." );
|
||||
if ( $opt{nondedicated} ) {
|
||||
infoprint "No warning with --nondedicated option";
|
||||
infoprint
|
||||
"Overall possible memory usage with other process exceeded memory";
|
||||
}
|
||||
else {
|
||||
badprint
|
||||
"Overall possible memory usage with other process exceeded memory";
|
||||
push( @generalrec,
|
||||
"Dedicate this server to your database for highest performance."
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
goodprint
|
||||
|
@ -6366,18 +6397,27 @@ sub mysql_innodb {
|
|||
}
|
||||
|
||||
# select round( 100* sum(allocated)/( select VARIABLE_VALUE
|
||||
# FROM performance_schema.global_variables
|
||||
# FROM information_schema.global_variables
|
||||
# where VARIABLE_NAME='innodb_buffer_pool_size' )
|
||||
# ,2) as "PCT ALLOC/BUFFER POOL"
|
||||
#from sys.x$innodb_buffer_stats_by_table;
|
||||
|
||||
if ( $mycalc{innodb_buffer_alloc_pct} < 80 ) {
|
||||
badprint "Ratio Buffer Pool allocated / Buffer Pool Size: "
|
||||
. $mycalc{'innodb_buffer_alloc_pct'} . '%';
|
||||
}
|
||||
else {
|
||||
goodprint "Ratio Buffer Pool allocated / Buffer Pool Size: "
|
||||
. $mycalc{'innodb_buffer_alloc_pct'} . '%';
|
||||
if ( $opt{experimental} ) {
|
||||
debugprint( 'innodb_buffer_alloc_pct: "'
|
||||
. $mycalc{innodb_buffer_alloc_pct}
|
||||
. '"' );
|
||||
if ( defined $mycalc{innodb_buffer_alloc_pct}
|
||||
and $mycalc{innodb_buffer_alloc_pct} ne '' )
|
||||
{
|
||||
if ( $mycalc{innodb_buffer_alloc_pct} < 80 ) {
|
||||
badprint "Ratio Buffer Pool allocated / Buffer Pool Size: "
|
||||
. $mycalc{'innodb_buffer_alloc_pct'} . '%';
|
||||
}
|
||||
else {
|
||||
goodprint "Ratio Buffer Pool allocated / Buffer Pool Size: "
|
||||
. $mycalc{'innodb_buffer_alloc_pct'} . '%';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $mycalc{'innodb_log_size_pct'} < 20
|
||||
or $mycalc{'innodb_log_size_pct'} > 30 )
|
||||
|
@ -7198,6 +7238,8 @@ sub headerprint {
|
|||
. "\t * Major Hayden <major\@mhtx.net>\n"
|
||||
. " >> Bug reports, feature requests, and downloads at http://mysqltuner.pl/\n"
|
||||
. " >> Run with '--help' for additional options and output filtering";
|
||||
debugprint( "Debug: " . $opt{debug} );
|
||||
debugprint( "Experimental: " . $opt{experimental} );
|
||||
}
|
||||
|
||||
sub string2file {
|
||||
|
@ -7208,12 +7250,12 @@ sub string2file {
|
|||
"Unable to open $filename in write mode. Please check permissions for this file or directory";
|
||||
print $fh $content if defined($content);
|
||||
close $fh;
|
||||
debugprint $content if ( $opt{'debug'} );
|
||||
debugprint $content;
|
||||
}
|
||||
|
||||
sub file2array {
|
||||
my $filename = shift;
|
||||
debugprint "* reading $filename" if ( $opt{'debug'} );
|
||||
debugprint "* reading $filename";
|
||||
my $fh;
|
||||
open( $fh, q(<), "$filename" )
|
||||
or die "Couldn't open $filename for reading: $!\n";
|
||||
|
@ -7399,7 +7441,7 @@ __END__
|
|||
|
||||
=head1 NAME
|
||||
|
||||
MySQLTuner 2.5.2 - MySQL High Performance Tuning Script
|
||||
MySQLTuner 2.6.0 - MySQL High Performance Tuning Script
|
||||
|
||||
=head1 IMPORTANT USAGE GUIDELINES
|
||||
|
||||
|
@ -7443,6 +7485,8 @@ You must provide the remote server's total memory when connecting to other serve
|
|||
--template <path> Path to a template file
|
||||
--dumpdir <path> Path to a directory where to dump information files
|
||||
--feature <feature> Run a specific feature (see FEATURES section)
|
||||
--dumpdir <path> information_schema tables and sys views are dumped in CSV in this path
|
||||
|
||||
=head1 OUTPUT OPTIONS
|
||||
|
||||
--silent Don't output anything on screen
|
||||
|
@ -7453,6 +7497,8 @@ You must provide the remote server's total memory when connecting to other serve
|
|||
--nobad Remove negative/suggestion responses
|
||||
--noinfo Remove informational responses
|
||||
--debug Print debug information
|
||||
--experimental Print experimental analysis (may fail)
|
||||
--nondedicated Consider server is not dedicated to Db server usage only
|
||||
--noprocess Consider no other process is running
|
||||
--dbstat Print database information
|
||||
--nodbstat Don't print database information
|
||||
|
|
372
slim.report.json
Normal file
372
slim.report.json
Normal file
|
@ -0,0 +1,372 @@
|
|||
{
|
||||
"version": "1.1",
|
||||
"engine": "linux/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM",
|
||||
"containerized": false,
|
||||
"host_distro": {
|
||||
"name": "Ubuntu",
|
||||
"version": "24.04",
|
||||
"display_name": "Ubuntu 24.04 LTS"
|
||||
},
|
||||
"type": "build",
|
||||
"state": "done",
|
||||
"target_reference": "jmrenouard/mysqltuner:latest",
|
||||
"system": {
|
||||
"type": "Linux",
|
||||
"release": "5.15.153.1-microsoft-standard-WSL2",
|
||||
"distro": {
|
||||
"name": "Ubuntu",
|
||||
"version": "24.04",
|
||||
"display_name": "Ubuntu 24.04 LTS"
|
||||
}
|
||||
},
|
||||
"source_image": {
|
||||
"identity": {
|
||||
"id": "sha256:de54a9bc71612ce378cafe4d719064ae17578f7a5c202f08c2340cb4a5bd8fa9",
|
||||
"tags": [
|
||||
"2.5.4",
|
||||
"latest"
|
||||
],
|
||||
"names": [
|
||||
"jmrenouard/mysqltuner:2.5.4",
|
||||
"jmrenouard/mysqltuner:latest"
|
||||
]
|
||||
},
|
||||
"size": 210101762,
|
||||
"size_human": "210 MB",
|
||||
"create_time": "2024-07-15T20:57:18Z",
|
||||
"docker_version": "",
|
||||
"architecture": "amd64",
|
||||
"os": "linux",
|
||||
"labels": {
|
||||
"maintainer": "jmrenouard@gmail.com",
|
||||
"org.opencontainers.image.ref.name": "ubuntu",
|
||||
"org.opencontainers.image.version": "24.04"
|
||||
},
|
||||
"env_vars": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"DEBIAN_FRONTEND=noninteractive"
|
||||
],
|
||||
"container_entry": {
|
||||
"exe_path": ""
|
||||
}
|
||||
},
|
||||
"minified_image_size": 37270902,
|
||||
"minified_image_size_human": "37 MB",
|
||||
"minified_image": "jmrenouard/mysqltuner.slim",
|
||||
"minified_image_id": "sha256:cc97d204ab37932775e72b3d45523bac97c6a58f3fea9130c3e5a478655be815",
|
||||
"minified_image_digest": "sha256:025d34ffb0fa21690d6852e2d2d72ca6bf7892400a141dc1c750aa5b82ffc0a5",
|
||||
"minified_image_has_data": true,
|
||||
"minified_by": 5.637152596950833,
|
||||
"artifact_location": "/tmp/slim-state/.slim-state/images/de54a9bc71612ce378cafe4d719064ae17578f7a5c202f08c2340cb4a5bd8fa9/artifacts",
|
||||
"container_report_name": "creport.json",
|
||||
"seccomp_profile_name": "jmrenouard-mysqltuner-seccomp.json",
|
||||
"apparmor_profile_name": "jmrenouard-mysqltuner-apparmor-profile",
|
||||
"image_stack": [
|
||||
{
|
||||
"is_top_image": true,
|
||||
"id": "sha256:de54a9bc71612ce378cafe4d719064ae17578f7a5c202f08c2340cb4a5bd8fa9",
|
||||
"full_name": "jmrenouard/mysqltuner:2.5.4",
|
||||
"repo_name": "jmrenouard/mysqltuner",
|
||||
"version_tag": "2.5.4",
|
||||
"raw_tags": [
|
||||
"jmrenouard/mysqltuner:2.5.4",
|
||||
"jmrenouard/mysqltuner:latest"
|
||||
],
|
||||
"create_time": "2024-07-15T20:57:18Z",
|
||||
"new_size": 210101762,
|
||||
"new_size_human": "210 MB",
|
||||
"instructions": [
|
||||
{
|
||||
"type": "ARG",
|
||||
"time": "2024-06-07T12:00:06Z",
|
||||
"is_nop": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "RELEASE",
|
||||
"command_snippet": "ARG RELEASE",
|
||||
"command_all": "ARG RELEASE",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "ARG",
|
||||
"time": "2024-06-07T12:00:06Z",
|
||||
"is_nop": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "LAUNCHPAD_BUILD_ARCH",
|
||||
"command_snippet": "ARG LAUNCHPAD_BUILD_ARCH",
|
||||
"command_all": "ARG LAUNCHPAD_BUILD_ARCH",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "LABEL",
|
||||
"time": "2024-06-07T12:00:06Z",
|
||||
"is_nop": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "org.opencontainers.image.ref.name=ubuntu",
|
||||
"command_snippet": "LABEL org.opencontainers.image.ref.name=ubun...",
|
||||
"command_all": "LABEL org.opencontainers.image.ref.name=ubuntu",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "LABEL",
|
||||
"time": "2024-06-07T12:00:06Z",
|
||||
"is_nop": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "org.opencontainers.image.version=24.04",
|
||||
"command_snippet": "LABEL org.opencontainers.image.version=24.04",
|
||||
"command_all": "LABEL org.opencontainers.image.version=24.04",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "ADD",
|
||||
"time": "2024-06-07T12:00:08Z",
|
||||
"is_nop": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 78050118,
|
||||
"size_human": "78 MB",
|
||||
"params": "file:5601f441718b0d192d73394b35fd07675342837ec9089ddd52dd1dc0de79630e in /",
|
||||
"command_snippet": "ADD file:5601f441718b0d192d73394b35fd0767534...",
|
||||
"command_all": "ADD file:5601f441718b0d192d73394b35fd07675342837ec9089ddd52dd1dc0de79630e /",
|
||||
"target": "/",
|
||||
"source_type": "file",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "CMD",
|
||||
"time": "2024-06-07T12:00:09Z",
|
||||
"is_nop": true,
|
||||
"is_exec_form": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "[\"/bin/bash\"]\n",
|
||||
"command_snippet": "CMD [\"/bin/bash\"]\n",
|
||||
"command_all": "CMD [\"/bin/bash\"]\n",
|
||||
"inst_set_time_bucket": "2024-06-07T14:00:00+02:00",
|
||||
"inst_set_time_index": 0,
|
||||
"inst_set_time_reverse_index": 2
|
||||
},
|
||||
{
|
||||
"type": "LABEL",
|
||||
"time": "2024-07-15T20:30:50Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "maintainer=jmrenouard@gmail.com",
|
||||
"command_snippet": "LABEL maintainer=jmrenouard@gmail.com",
|
||||
"command_all": "LABEL maintainer=jmrenouard@gmail.com",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:30:00+02:00",
|
||||
"inst_set_time_index": 1,
|
||||
"inst_set_time_reverse_index": 1
|
||||
},
|
||||
{
|
||||
"type": "ENV",
|
||||
"time": "2024-07-15T20:30:50Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "DEBIAN_FRONTEND=noninteractive",
|
||||
"command_snippet": "ENV DEBIAN_FRONTEND=noninteractive",
|
||||
"command_all": "ENV DEBIAN_FRONTEND=noninteractive",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:30:00+02:00",
|
||||
"inst_set_time_index": 1,
|
||||
"inst_set_time_reverse_index": 1
|
||||
},
|
||||
{
|
||||
"type": "RUN",
|
||||
"time": "2024-07-15T20:30:50Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 129424033,
|
||||
"size_human": "129 MB",
|
||||
"command_snippet": "RUN apt-get update && \\\n\tapt upgrade -y && \\...",
|
||||
"command_all": "RUN apt-get update && \\\n\tapt upgrade -y && \\\n\tapt-get install -yq --no-install-recommends apt-utils curl wget perl perl-doc mysql-client libjson-perl libtext-template-perl && \\\n\tapt-get clean && \\\n\trm -rf /var/lib/apt/lists/* && \\\n\tmkdir -p /results",
|
||||
"system_commands": [
|
||||
"apt-get update",
|
||||
"apt upgrade -y",
|
||||
"apt-get install -yq --no-install-recommends apt-utils curl wget perl perl-doc mysql-client libjson-perl libtext-template-perl",
|
||||
"apt-get clean",
|
||||
"rm -rf /var/lib/apt/lists/*",
|
||||
"mkdir -p /results"
|
||||
],
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:30:00+02:00",
|
||||
"inst_set_time_index": 1,
|
||||
"inst_set_time_reverse_index": 1
|
||||
},
|
||||
{
|
||||
"type": "RUN",
|
||||
"time": "2024-07-15T20:57:17Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"command_snippet": "RUN apt clean all",
|
||||
"command_all": "RUN apt clean all",
|
||||
"system_commands": [
|
||||
"apt clean all"
|
||||
],
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "WORKDIR",
|
||||
"time": "2024-07-15T20:57:17Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "/",
|
||||
"command_snippet": "WORKDIR /",
|
||||
"command_all": "WORKDIR /",
|
||||
"system_commands": [
|
||||
"mkdir -p /"
|
||||
],
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "COPY",
|
||||
"time": "2024-07-15T20:57:17Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 264380,
|
||||
"size_human": "264 kB",
|
||||
"params": "./mysqltuner.pl /mysqltuner.pl",
|
||||
"command_snippet": "COPY ./mysqltuner.pl /mysqltuner.pl",
|
||||
"command_all": "COPY ./mysqltuner.pl /mysqltuner.pl",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "COPY",
|
||||
"time": "2024-07-15T20:57:18Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 2355059,
|
||||
"size_human": "2.4 MB",
|
||||
"params": "./vulnerabilities.csv /vulnerabilities.txt",
|
||||
"command_snippet": "COPY ./vulnerabilities.csv /vulnerabilities....",
|
||||
"command_all": "COPY ./vulnerabilities.csv /vulnerabilities.txt",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "COPY",
|
||||
"time": "2024-07-15T20:57:18Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 3988,
|
||||
"size_human": "4.0 kB",
|
||||
"params": "./basic_passwords.txt /basic_passwords.txt",
|
||||
"command_snippet": "COPY ./basic_passwords.txt /basic_passwords....",
|
||||
"command_all": "COPY ./basic_passwords.txt /basic_passwords.txt",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "COPY",
|
||||
"time": "2024-07-15T20:57:18Z",
|
||||
"is_nop": false,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 4184,
|
||||
"size_human": "4.2 kB",
|
||||
"params": "./template_example.tpl /template.tpl",
|
||||
"command_snippet": "COPY ./template_example.tpl /template.tpl",
|
||||
"command_all": "COPY ./template_example.tpl /template.tpl",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "ENTRYPOINT",
|
||||
"time": "2024-07-15T20:57:18Z",
|
||||
"is_nop": false,
|
||||
"is_exec_form": true,
|
||||
"local_image_exists": false,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "[\"perl\",\"/mysqltuner.pl\",\"--passwordfile\",\"/basic_passwords.txt\",\"--cvefile\",\"/vulnerabilities.txt\",\"--nosysstat\",\"--defaults-file\",\"/defaults.cnf\",\"--dumpdir\",\"/results\",\"--outputfile\",\"/results/mysqltuner.txt\",\"--template\",\"/template.tpl\",\"--reportfile\",\"/results/mysqltuner.html\"]\n",
|
||||
"command_snippet": "ENTRYPOINT [\"perl\",\"/mysqltuner.pl\",\"--passw...",
|
||||
"command_all": "ENTRYPOINT [\"perl\",\"/mysqltuner.pl\",\"--passwordfile\",\"/basic_passwords.txt\",\"--cvefile\",\"/vulnerabilities.txt\",\"--nosysstat\",\"--defaults-file\",\"/defaults.cnf\",\"--dumpdir\",\"/results\",\"--outputfile\",\"/results/mysqltuner.txt\",\"--template\",\"/template.tpl\",\"--reportfile\",\"/results/mysqltuner.html\"]\n",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
},
|
||||
{
|
||||
"type": "CMD",
|
||||
"time": "2024-07-15T20:57:18Z",
|
||||
"is_last_instruction": true,
|
||||
"is_nop": false,
|
||||
"is_exec_form": true,
|
||||
"local_image_exists": true,
|
||||
"layer_index": 0,
|
||||
"size": 0,
|
||||
"params": "[\"--verbose\"]\n",
|
||||
"command_snippet": "CMD [\"--verbose\"]\n",
|
||||
"command_all": "CMD [\"--verbose\"]\n",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"raw_tags": [
|
||||
"jmrenouard/mysqltuner:2.5.4",
|
||||
"jmrenouard/mysqltuner:latest"
|
||||
],
|
||||
"is_buildkit_instruction": true,
|
||||
"inst_set_time_bucket": "2024-07-15T22:45:00+02:00",
|
||||
"inst_set_time_index": 2,
|
||||
"inst_set_time_reverse_index": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"image_created": true,
|
||||
"image_build_engine": "internal"
|
||||
}
|
Loading…
Reference in a new issue