MySQL-undo log
参考文献
undo log
MySQL-sys
参考文献
千金良方: MySQL性能优化金字塔法则
sys系统库使用基础环境
因为sys系统库提供了一些代替直接访问performance_schema的视图,所以必须启用performance_schema(将performance_schema系统参数设置为ON),sys系统库的大部分功能才能正常使用
要完全访问sys系统库,用户必须具有以下权限.
对所有sys表和视图具有SELECT权限.
对所有sys存储过程和函数具有EXECUTE权限.
对sys_config表具有INSERT、UPDATE权限.
对某些特定的sys系统库存储过程和函数需要额外权限,如ps_setup_save()存储过程,需要与临时表相关的权限.
还要有与被sys系统库执行访问的对象相关的权限.
任何被sys系统库访问的performance_schema表都需要有SELECT权限,如果要使用sys系统库对performance_schema相关表执行更新,则需要有performance_schema相关表的UPDATE权限.
INFORMATION_SCHEMA.INNODB_BUF ...
MySQL-performance_schema
参考文献
千金良方: MySQL性能优化金字塔法则
performance_schema
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117mysql> show tables ;+------------------------------------------------------+| Tables_in_performance_schema |+------------------------------------------------------+| accounts ...
Linux工具-fuser
参考文献
fuser
123456789101112131415161718192021222324252627# fuser -hUsage: fuser [-fIMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME... fuser -l fuser -VShow which processes use the named files, sockets, or filesystems. -a,--all display unused files too -i,--interactive ask before killing (ignored without -k) -I,--inode use always inodes to compare files -k,--kill kill processes accessing the named file -l,--list ...
Linux工具-nc
参考文献
nc
12345678910111213141516171819202122232425262728293031323334353637383940414243# nc -hOpenBSD netcat (Debian patchlevel 1.187-1ubuntu0.1)usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl] [-m minttl] [-O length] [-P proxy_username] [-p source_port] [-q seconds] [-s source] [-T keyword] [-V rtable] [-W recvlimit] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [destination] [port] Command Summary: -4 Use IPv4 -6 Use IPv6 -b Allow broadcast -C Sen ...
Linux工具-lsof
参考文献
https://wangchujiang.com/linux-command/c/lsof.html
lsof
lsof命令 用于查看你进程打开的文件,打开文件的进程,进程打开的端口(TCP、UDP).找回/恢复删除的文件.是十分方便的系统监视工具,因为lsof命令需要访问核心内存和各种文件,所以需要root用户执行.
在Linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件.所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等,系统在后台都为该应用程序分配了一个文件描述符,无论这个文件的本质如何,该文件描述符为应用程序与基础操作系统之间的交互提供了通用接口.因为应用程序打开文件的描述符列表提供了大量关于这个应用程序本身的信息,因此通过sof工具能够查看这个列表对系统监测以及排错将是很有帮助的.
基础用法
12345678910111213141516171819202122232425262728293031323334353637lsof [选项]lsof 4.89 latest revision: ...
Linux工具-netstat
参考文献
netstat
12345678910111213[root@linux ~]# netstat -[rn] <==与路由有关的参数 [root@linux ~]# netstat -[antulpc] <==与网络接口有关的参数 参数: 与路由(route) 有关的参数说明: -r : 列出路由表(route table),功能如同 route 这个指令;-n : 不使用主机名称与服务名称,使用 IP 与 port number ,如同 route -n 与网络接口有关的参数: -a : 列出所有的联机状态,包括 tcp/udp/unix socket 等; -t : 仅列出 TCP 封包的联机;-u : 仅列出 UDP 封包的联机;-l : 仅列出有在 Listen(监听) 的服务之网络状态; -p : 列出 PID 与 Program 的檔名;-c : 可以设定几秒钟后自动更新一次,例如 -c 5 每五秒更新一次网络状态的显示;
-i展示网络接口信息
1234567891011121314151617181920212223 ...
知识点-ZIP格式
参考文献
ZIP文件结构解析
Java-Cron表达式
参考文献
Spring cron
123456789101112131415161718192021例子: # 每月的最后1天 @Scheduled(cron = "0 0 18 28-31 * ?") public void doAtLastDayOfMonth() { final Calendar calendar = Calendar.getInstance(); if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)) { // do something here... } } 说明: Java(Spring) * * * * * * - - - - - - | | | | | | | | | | | +-- ...
MyBatis-遇到的问题
参考文献
多表关联+多表多条件查询+分页的问题
表结构
123456789101112131415161718192021222324252627282930313233343536373839404142mysql> desc sys_user;+--------------------+--------------+------+-----+-------------------+-------------------+| Field | Type | Null | Key | Default | Extra |+--------------------+--------------+------+-----+-------------------+-------------------+| id | bigint | NO | PRI | NULL | auto_increment || user_id ...