Since a basic introduction to myperf last time, the response is good. I am going to explain the three modes of myperf separately. As mentioned earlier, myperf has three modes: top, snap, and report. The first mode is relatively independent, and the last two modes complement each other. Today, I will introduce myperf first.
Since a basic introduction to myperf last time, the response is good. I am going to explain the three modes of myperf separately. As mentioned earlier, myperf has three modes: top, snap, and report. The first mode is relatively independent, and the last two modes complement each other. Today, I will introduce myperf first.
Since a basic introduction to myperf last time, the response is good. I am going to explain the three modes of myperf separately.
As mentioned earlier, myperf has three modes: top, snap, and report. The first mode is relatively independent, and the last two modes complement each other. Today, we will introduce the first mode of myperf: "top ".
To put it simply, "top" mode is actually the same as the most commonly used Basic Performance query program top in Linux/Unix, real-time refresh shows some important performance indicators of the database.
Myperf is the "top" mode by default. We can execute "myperf-h" to check the Help content of the program:
Almost every parameter of myperf can be recorded in the configuration file. The only exception is that when the configuration file is used, we also need a parameter to inform the location of the configuration file.
The "top" mode must be able to connect to the database to obtain some real-time performance data in the database. You can specify database connection parameters by using command line parameters or configuration files:
- Command line parameters:
Myperf-u username-p password-H host-I interval-m mode
If the connection port is not 3306, you must use the-P parameter to specify the database listening port.
Note: by default, the SQL content being executed is not displayed. You can enable this function using the-s parameter. If MySQL5.5 is used, you can use the-e parameter option to enable some event information.
- Configuration file method:
Myperf-c configfile
If you choose to use the configuration file, you can use the-c parameter to specify the location of the configuration file and record other parameters in the configuration file for execution.
Note: The parameter names in the configuration file all use long names.
BTW: after two weeks, does it mean that you have no time or just the latest inertia?
Original article address: "top" of myperf function introduction. Thank you for sharing it with me.