-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
50 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 启动 jupyter notebook 服务 | ||
jupyter notebook | ||
# 启动 jupyter notebook 服务,并制定端口号 | ||
jupyter notebook --port <port> | ||
# 将 ipynb 转为 html 格式 | ||
jupyter nbconvert <filename>.ipynb | ||
# 将 ipynb 转为 html 格式,并指定输出目录 | ||
jupyter nbconvert <filename>.ipynb --output-dir=<dirname> | ||
# 将 ipynb 转为 html 格式,并指定输出名称 | ||
jupyter nbconvert <filename>.ipynb --output=<filename> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 查询 processlist | ||
show processlist; | ||
# 查询 processlist | ||
select * from information_schema.processlist; | ||
# 按客户端 IP 分组,看哪个客户端的链接数最多 | ||
select client_ip,count(client_ip) as client_num from (select substring_index(host,':' ,1) as client_ip from information_schema.processlist ) as connect_info group by client_ip order by client_num desc; | ||
# 查看正在执行的线程,并按 Time 倒排序,看看有没有执行时间特别长的线程 | ||
select * from information_schema.processlist where Command != 'Sleep' order by Time desc; | ||
# 找出所有执行时间超过 5 分钟的线程,拼凑出 kill 语句 | ||
select concat('kill ', id, ';') from information_schema.processlist where Command != 'Sleep' and Time > 300 order by Time desc; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters