Enable slow Log
There are two ways to enable:
1, in MY.CNF through Log-slow-queries[=file_name]
2, when the mysqld process is started, specify the--log-slow-queries[=file_name] option
Five common tools for comparisonMysqldumpslow, Mysqlsla, Myprofi, Mysql-explain-slow-
Log tools for monitoring CPU and memory
Linux Tools:
Download Address: Get_cpu_mem_info_sh.rar
How to use:
Download the file and upload it to the/tmp directory after decompression.
Run CD switch to/tmp directory.
Perform:
Nohup Bash get_cpu_mem_info.sh
The tool generates a log file in the/tmp directory that
-----------------------------------------------------Author: Zhang baichuan (Network Ranger)Website: http://www.youxia.orgYou are welcome to reprint it, but please indicate the source. Thank you!-----------------------------------------------------With the rapid development of information technology, more and more devices are in the network. We gradually find that a traditional method is used to analyze a device (such as routers, switches, firewalls, servers, databases, and middleware) the
) {//propertyconfigurator.configure ("f:/config/log4j.properties");Logger.debug ("-----"); }}Note: It is not a good choice to put the log4j.properties file in the Src/main/java folder in the actual project. So at the very beginning of the program, you can configure the location of the log4j.properties using the log4j's own configurator propertyconfigurator. The part that is commented out in the code above. The Configurator overrides the default path and throws an exception if the Configurator pa
machine.10.34 Linux system logsAfter the configuration file/etc/rsyncd.conf change the port to 8730, execute the following commandSpecify port to run command after changing port10.34 Linux system logsWhen some services do not start up, in addition to see its error, but also to look at its log,Ls/var/log/messages* viewing the Cut files10.35 screen tool (virtual terminal)Specify terminal-S custom name Test_s
The slow log in mysql is a log tool used to record SQL statements that have been executed for a long time (beyond long_query_time seconds.
Enable slow log
Set in my. cnf
[mysqld]
slow_query_log=on
slow_query_log_file=mysql-slow
Restart the MySQL service.Five common tools
Mysqldumpslow
The
Add slf4j-api-1.6.1,slf4j-log4j12-1.6.1,log4j-1.2.15 three jar packages to the Lib folder to use the log4j log file. Specifically configured in the Log4j.properties file. Different configurations of the file can be modified to achieve different functions. For example Log4j.rootlogger=warn, stdout modified to Log4j.rootlogger=error, stdout. Only errors are displayed. Specific as followsDebug Debugging InformationInfo General InformationWarn warningErro
. You can delete all entries for a user name in the Utmp/wtmp/lastlog log file. However, if the Linux system needs to manually modify its source code, set the location of the log file.Bindshell the shell service on a port, the default port is 12497. Provides shell services for remote attackers.(4) NetcatThis is a simple and useful tool that can read and write data by using a network connection that uses a T
In the process of development. We often use log to output logs to help us debug the programBut sometimes it is not enough to satisfy our needs, for example, I want to know which package this log message comes from. Which classSo we encapsulate a log class. Convenient for our useImport Android.util.log;import cn.edu.sdnu.i.smartsdnu.config;/** * This is a
After attacking the Linux system, many intruders often get lost. Another reason is that the technical requirements are higher. Next, let's take a look at some common classic tools.
1. Extend from here: backdoors and connection tools
1) Httptunnel
Tunnel is a Tunnel. Generally, HTTPTunnel is called an HTTP channel. Its principle is to disguise data as HTTP data to pass through the firewall. In fact, it creat
service to use. Remote code hosting uses a free "code cloud" platform (Oschina, which has to choose a domestic platform due to awkward network conditions):Cloud services use the free version of Kii Cloud:Only plug-ins are used for 14 of them. This is where I like unity best, and the Asset store has built a complete ecosystem where you can build your own game with the power of the community, if you have ideas, even if you don't make music, do not build, or even program. This time has been differ
Linux Learning Log: details of the use of virtualization management tools, linux details
Virtualization management tools
Reason for Virtualization: the power consumption of computer computing is too high, virtualization can greatly reduce the power consumption of Enterprises
(Parallel operations in the kernel during virtualization)
Key File: cat/proc/cpuinfo | gr
-downloadonly:yum-y install Yum-downloadonlyuse:yum-y install--downloadonly--downloaddir=/tmp/firefox 3. Install Firefox and download dependent componentsNote: RPM-IVH may report a software conflict or a dependency, if the use of RPM-E--nodeps Force assistance after installation, may appear rpm, yum commands such as abnormal or unable to connect xftp tools. You can only use Linux rescue mode for recovery. If you want to upgrade the relevant RPM pack
, some tools will display errors that are not found in the specified version of the framework after the installation is complete. Global tools has yet to be improved in terms of compatibility.It's not difficult to create a global tools yourself.Because global tools is actually a console application, the first is the ne
Tags: rsync+inotify-tools+ssh implement mysql-bin log file real-time backup1, Environment: two CentOS computer direct connection, its server A's IP address is 192.168.1.124, Server B's IP address is 192.168.1.121.2. Requirement Software Installation (SSH system is installed by default):Server A:Yum Install rsync Inotify-toolsServer B:Yum Install rsync3. Set up user (Backup execution user)Build Users: Userad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.