Compare commits

...

69 commits

Author SHA1 Message Date
Jean-Marie Renouard
70750a4855
Merge pull request #801 from remc010/master
714 # fix calculation of innodb_log_size_pct
2024-09-13 10:45:24 +02:00
remc010
1b9c8e588e
714 # fix calculation of innodb_log_size_pct when using innodb_redo_log_capacity, instead of innodb_log_files_in_group and innodb_log_file_size 2024-09-12 09:49:37 +02:00
Jean-Marie Renouard
00ae2c9ddb
Merge pull request #798 from jesusbagpuss/issue-797
Improve regexes for log-file error and warning counts (fixed #797)
2024-09-06 12:23:06 +02:00
Jean-Marie Renouard
66fdb9339d
Merge pull request #799 from gggeek/gg/readme-typo
readme typo
2024-09-06 12:20:54 +02:00
gggeek
e519313752 fix typo in readme 2024-09-04 17:23:17 +00:00
gggeek
14b295ec92 remove dupe line in .dockerignore 2024-09-04 17:23:06 +00:00
John Salter
197e4729b0
Improve regexes for log-file error and warning counts 2024-09-02 18:27:59 +01:00
Jean-Marie Renouard
13ec5072fb
Merge pull request #795 from jmrenouard/master
Generate 2.6.0 minor version at 2024-08-06T10:43:15+02:00
2024-08-06 10:49:21 +02:00
Jean-Marie Renouard
07fd5df5d1 Generate 2.6.0 minor version at 2024-08-06T10:43:15+02:00 2024-08-06 10:43:15 +02:00
Jean-Marie Renouard
763ba10872
Merge pull request #787 from devenbj/MariaDB-Version-Updates
Update Versions for MariaDB
2024-07-15 23:34:08 +02:00
Jean-Marie Renouard
fd31cc84ce
Merge pull request #789 from jmrenouard/master
Bug fix on makefile
2024-07-15 23:33:51 +02:00
Jean-Marie Renouard
d45dd77f6d Bug fix on makefile 2024-07-15 23:32:39 +02:00
Jean-Marie Renouard
56b7415198
Merge pull request #788 from jmrenouard/master
MErge back
2024-07-15 23:24:46 +02:00
Jean-Marie Renouard
aba69e1d4e
Merge branch 'master' into master 2024-07-15 23:24:38 +02:00
Jean-Marie Renouard
4bb70413be Last updates for MySQLTuner getting is own Docker images jmrenouard/mysqltuner 2024-07-15 23:21:21 +02:00
Jean-Marie Renouard
1c1c4638af Generate 2.5.4 sub version at 2024-07-15T22:42:31+02:00 2024-07-15 22:42:31 +02:00
Jean-Marie Renouard
13d2783348 Indenting mysqltuner at 2024-07-15T22:41:49+02:00 2024-07-15 22:41:54 +02:00
Brian Devendorf
828f25d828
Update Versions for MariaDB
This addresses #707 and #786. Added versiond 11.1, 11.2, and 11.4 to supported list. Removed 10.3, 10.4, 10.7, 10.8, 10.9, and 10.10 (all listed as no longer mintained on the mariadb website). Fix for the deprecation notice from @jadeops.
2024-07-14 23:59:03 -05:00
Jean-Marie Renouard
099d38b11d
Merge pull request #785 from tomvlk/patch-1
Update README.md, remove double 'by default' in some sentences.
2024-07-08 22:46:43 +02:00
Tom Valk
adda63da26
Update README.md, remove double 'by default' in some sentences. 2024-07-08 23:30:46 +03:00
Jean-Marie Renouard
198e0d5a0d
Merge pull request #780 from vlatan/physical-memory
Fix wrong physical memory
2024-07-02 11:00:12 +02:00
Jean-Marie Renouard
a76ec6a051
Merge pull request #778 from vlatan/fix-fork-link
Fix broken link
2024-04-24 19:40:01 +02:00
vlatan
0dc9caaf95 Remove repeated assigmnent 2024-04-24 00:46:42 +02:00
vlatan
1843cf1f4f Fix the fork link 2024-04-24 00:06:25 +02:00
Jean-Marie Renouard
b2c11b2d81
Merge pull request #775 from jmrenouard/master
Docker staff for MySQLtuner
2024-03-15 12:46:35 +01:00
Jean-Marie Renouard
def7f81455 Changing filemode 2024-03-07 19:19:52 +01:00
Jean-Marie RENOUARD
1286af5fd5 Dockerfile integration (part 2) 2024-02-16 19:04:53 +01:00
Jean-Marie Renouard
4a7d0e07a9
Merge pull request #773 from jmrenouard/master
Dockerfile for MySQLtuner
2024-02-16 18:16:33 +01:00
Jean-Marie RENOUARD
936843fb1b Adding Dockerfile features(part 1) 2024-02-16 18:15:50 +01:00
Jean-Marie Renouard
ac43eee969
Merge pull request #769 from chenrui333/remove-travis-refs
chore: remove travis config
2024-02-12 13:07:45 +01:00
Jean-Marie Renouard
0111b1118d
Merge pull request #772 from ravage84/may-failed
Grammar
2024-02-12 13:05:01 +01:00
marc.wuerth
f86232b95c Grammar 2024-02-12 12:25:48 +01:00
Jean-Marie Renouard
6ce7155199
Merge pull request #768 from chenrui333/fix-starchart
fix: update starchart url
2024-02-12 09:59:20 +01:00
Rui Chen
2fb1ba00d5
chore: remove travis config
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-02-10 10:14:02 +01:00
Rui Chen
2542954305
fix: update starchart url
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-02-10 10:08:21 +01:00
Jean-Marie Renouard
9437fb1aab
Merge pull request #767 from FabioPedretti/master
fix perl shebang
2024-02-09 15:03:00 +01:00
Jean-Marie Renouard
aa8de299c4
Update mysqltuner.pl
Co-authored-by: Rui Chen <rui@chenrui.dev>
2024-02-09 15:02:54 +01:00
Fabio Pedretti
86ccfb2fcc fix perl shebang
Current shebang gives this error:
$ ./mysqltuner.pl
-bash: ./mysqltuner.pl: cannot execute: required file not found

Also fixes #766.
2024-02-09 10:24:40 +01:00
Jean-Marie Renouard
5d66f40e06 Removing unused files 2024-02-09 09:18:07 +01:00
Jean-Marie Renouard
f0848b8489
Merge pull request #765 from jmrenouard/master
New CLI-Option "nondedicated" for non-dedicated servers #748
2024-02-09 00:44:28 +01:00
Jean-Marie Renouard
a14d551a3f New CLI-Option "nondedicated" for non-dedicated servers #748 2024-02-09 00:42:58 +01:00
Jean-Marie Renouard
cb3fd87f09 Generate USAGE.md at 2024-02-09T00:21:26+01:00 2024-02-09 00:21:26 +01:00
Jean-Marie Renouard
c29168ccaf Adding nondedicated option usage 2024-02-09 00:12:34 +01:00
Jean-Marie Renouard
8899f10756
Merge pull request #764 from jmrenouard/master
Check against performance_schema.global_variables fails (Table not fo…
2024-02-08 23:57:20 +01:00
Jean-Marie Renouard
e03ba82187 Check against performance_schema.global_variables fails (Table not found) #759 2024-02-08 23:56:35 +01:00
Jean-Marie Renouard
5c48a8a0a9
Merge pull request #763 from jmrenouard/master
Mysqltuner activates --checkversion if running with --verbose #760
2024-02-08 23:28:41 +01:00
Jean-Marie Renouard
876c374bef Mysqltuner activates --checkversion if running with --verbose #760 2024-02-08 23:23:00 +01:00
Jean-Marie Renouard
df93ddc45c
Merge pull request #757 from chenrui333/update-shebang
chore: update shebang
2024-02-08 23:20:09 +01:00
Jean-Marie Renouard
2f2b7680bd
Merge branch 'master' into update-shebang 2024-02-08 23:18:22 +01:00
Jean-Marie Renouard
216d8f9d19
Merge pull request #762 from jmrenouard/master
Adding experimental option avoiding runtime errors
2024-02-08 23:17:35 +01:00
Jean-Marie Renouard
da90482071
Merge branch 'master' into master 2024-02-08 23:17:04 +01:00
Jean-Marie Renouard
5c38853a05
Merge pull request #758 from FabioPedretti/master
fix perl shebang
2024-02-08 23:13:47 +01:00
Jean-Marie Renouard
ffd7aca201 Adding eperimental feature with --experiemental 2024-02-08 23:11:20 +01:00
Jean-Marie Renouard
30e61d917b Generate 2.5.3 sub version at 2024-02-08T22:15:50+01:00 2024-02-08 22:15:50 +01:00
Fabio Pedretti
c2140d79f7 fix perl shebang
Previously at least on Debian it broke with:
$ ./mysqltuner.pl
-bash: ./mysqltuner.pl: /bin/env: bad interpreter: No such file or directory
2024-02-07 10:57:48 +01:00
Rui Chen
d15426bfef
chore: update shebang
For me the `env` points to `/usr/bin/env`, and it is more common to specify as it is.

Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-02-07 08:26:36 +01:00
Jean-Marie Renouard
235cc4e0f9
Merge pull request #756 from jmrenouard/master
Refactoring format
2024-02-07 01:11:00 +01:00
Jean-Marie Renouard
9e243c4d63 REfactoring format 2024-02-07 01:09:53 +01:00
Jean-Marie Renouard
54df506b36 Refactoring format 2024-02-07 01:05:05 +01:00
Jean-Marie Renouard
62eefc8dfa Merge branch 'master' of github.com:jmrenouard/MySQLTuner-perl 2024-02-07 00:08:50 +01:00
Jean-Marie Renouard
34dcfd05c9 Adding secure check when missing value 2024-02-07 00:07:41 +01:00
Jean-Marie Renouard
cbb2534577
Merge pull request #755 from jmrenouard/master
Adding specific MariaDB sysschema installer
2024-02-06 21:58:37 +01:00
Jean-Marie Renouard
d9ccab2bf7 Adding specific MariaDB sysschema installer 2024-02-06 21:57:27 +01:00
Jean-Marie Renouard
6cc7ff252a
Merge pull request #754 from jmrenouard/master
Merge doc
2024-02-06 19:14:15 +01:00
Jean-Marie Renouard
cf4e6b47b7 Adding informations about csv dump options 2024-02-06 19:12:28 +01:00
Jean-Marie Renouard
c1d00b994a Format fixing 2024-02-06 19:07:08 +01:00
Jean-Marie Renouard
2c6bdbb0db Updates README + # 747 2024-02-06 19:03:13 +01:00
Jean-Marie Renouard
4d82fbaa56
Merge pull request #752 from jmrenouard/master
Adding shebang comment for auto execution #751
2024-02-06 18:37:53 +01:00
Jean-Marie Renouard
ca10ec7411 Adding shebang comment for auto execution 2024-02-06 18:35:38 +01:00
16 changed files with 678 additions and 168 deletions

6
.dockerignore Normal file
View file

@ -0,0 +1,6 @@
*.md
build/**
Makefile
.perltidy
*.json
*.png

2
.gitignore vendored
View file

@ -18,3 +18,5 @@ result_*
sql/*.sql
sql/*.csv
cve.csv
default*.cnf
.env

View file

@ -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)"

View file

@ -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
View file

@ -0,0 +1 @@
2.5.4

31
Dockerfile Normal file
View 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" ]

View file

@ -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

View file

@ -2,7 +2,6 @@
[!["Buy Us A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)
[![Build Status - Master](https://travis-ci.org/major/MySQLTuner-perl.svg?branch=master)](https://travis-ci.org/major/MySQLTuner-perl)
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
[![Project Status](http://opensource.box.com/badges/maintenance.svg)](http://opensource.box.com/badges)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/major/MySQLTuner-perl.svg)](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")

View file

@ -2,7 +2,6 @@
[!["Buy Us A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)
[![Build Status - Master](https://travis-ci.org/major/MySQLTuner-perl.svg?branch=master)](https://travis-ci.org/major/MySQLTuner-perl)
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
[![Project Status](http://opensource.box.com/badges/maintenance.svg)](http://opensource.box.com/badges)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/major/MySQLTuner-perl.svg)](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")

126
README.md
View file

@ -34,26 +34,29 @@ MySQLTuner needs you
## Stargazers over time
[![Stargazers over time](https://starcharts.herokuapp.com/major/MySQLTuner-perl.svg)](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
[![Stargazers over time](https://starchart.cc/major/MySQLTuner-perl.svg)](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?!**

View file

@ -2,7 +2,6 @@
[!["Buy Us A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)
[![Build Status - Master](https://travis-ci.org/major/MySQLTuner-perl.svg?branch=master)](https://travis-ci.org/major/MySQLTuner-perl)
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
[![Project Status](http://opensource.box.com/badges/maintenance.svg)](http://opensource.box.com/badges)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/major/MySQLTuner-perl.svg)](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
@ -36,11 +35,11 @@ MySQLTuner нуждается в вас:
## Количество "звезд" по времени
[![Stargazers over time](https://starcharts.herokuapp.com/major/MySQLTuner-perl.svg)](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
[![Stargazers over time](https://starchart.cc/major/MySQLTuner-perl.svg)](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 (полная поддержка)

View file

@ -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

View 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

View file

@ -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);

View file

@ -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
View 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"
}