熟悉Spring Boot、Spring Cloud等框架
熟悉MySQL、Oracle、ES、Redis等数据库
nginx负载均衡算法,及其差异
1.轮询
2.ip_hash
3.加权
4.
5.
6.
mysql或oracle查看数据库正在执行的sql的思路或方法
SELECT SE.SID,
OPNAME,
TRUNC(SOFAR / TOTALWORK * 100, 2) || '%' AS PCT_WORK,
ELAPSED_SECONDS ELAPSED,
ROUND(ELAPSED_SECONDS * (TOTALWORK - SOFAR) / SOFAR) REMAIN_TIME,
SQL_TEXT
FROM V$SESSION_LONGOPS SL, V$SQLAREA SA, V$SESSION SE
WHERE SL.SQL_HASH_VALUE = SA.HASH_VALUE
AND SL.SID = SE.SID
AND SOFAR != TOTALWORK
ORDER BY START_TIME;
方法一:使用processlist
show processlist;
或者:
select * from information_schema.`PROCESSLIST` where info is not null;
方法二:开启日志模式
-- 1、设置
-- SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'ON';
-- SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'OFF';
-- 2、查询
SELECT * from mysql.general_log ORDER BY event_time DESC
-- 3、清空表(delete对于这个表,不允许使用,只能用truncate)
-- truncate table mysql.general_log;
停止sql
mysqladmin -uroot -p kill [id]
查询a表和b表中age大于25,weight较大的前3人
造数据:
-- insert into tablea (id,name,age) values (11,'王0',22);
insert into tableb (id,ip,weight) values (15,'sa',59);
查结果:
SELECT
a.id,
a.`name`,
a.age,
b.weight
FROM
tablea a
LEFT JOIN tableb b ON a.id = b.id
WHERE
a.age > 25
ORDER BY
b.weight DESC
LIMIT 3
(1+3)*5/2 -18 + 42/(5*9)想到了哪种数据结构
linux环境下查看java的进程监听的端口号有哪些方法
查看java进程端口号:
netstat -anptu|grep java
修改/data/server.xml内所有字符串port,改为transport的命令有哪些(https://baijiahao.baidu.com/s?id=1588552298343207312&wfr=spider&for=pc)
FrameworkServlet 'springMvc': initialization completed in 1364 ms
[root@buerguo tmp]# sed 's/1363 ms/1364 ms/g' /var/tmp/PPMS.log.2019-08-13.log
保存修改结果:
FrameworkServlet 'springMvc': initialization completed in 1363 ms
[root@buerguo tmp]# sed -i 's/1363 ms/1364 ms/g' /var/tmp/PPMS.log.2019-08-13.log
[root@buerguo tmp]# cat PPMS.log.2019-08-13.log
统计/tmp/info.log的行数(下面命令过滤了空行)
[root@buerguo tmp]# find /var/tmp/PPMS.log.2019-08-13.log |xargs cat|grep -v ^$|wc -l
6522