会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Leonardo-li
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
10
11
12
13
14
15
16
17
18
···
28
下一页
2022年11月1日
swap分区创建与删除
摘要: #创建swap分区 1、创建一个swap文件 cd /var mkdir swap dd if=/dev/zero of=swapfile bs=1024 count=2000000 #count代表创建2G大小,一般swap内存是物理内存的1.5倍。 2、把文件转换为swap文件 #在var目录执
阅读全文
posted @ 2022-11-01 11:05 Leonardo-li
阅读(579)
评论(0)
推荐(0)
2022年10月31日
mysql备份脚本
摘要: 1.mysql备份脚本#说明:此备份脚本是mysql部署在宿主机上,然后直接使用mysql命令备份。 #!/bin/bash #mysql_backup#### dbuser="root" dbpassword="123443" dbserver="172.16.33.52" dbname="ope
阅读全文
posted @ 2022-10-31 14:43 Leonardo-li
阅读(2163)
评论(0)
推荐(0)
2022年10月26日
mysql主从复制
摘要: 1.主数据库配置添加 cat /etc/my.cnf 添加: [mysqld] server-id=1 log-bin=master-bin log-slave-updates=true #需要重启mysql服务 docker restart mysql 2.主数据库设置从库复制权限 grant r
阅读全文
posted @ 2022-10-26 11:19 Leonardo-li
阅读(56)
评论(0)
推荐(0)
2022年10月24日
vscode不能补全三方库
摘要: #解决vscode不能补全三方库 https://zhuanlan.zhihu.com/p/549452162
阅读全文
posted @ 2022-10-24 16:02 Leonardo-li
阅读(74)
评论(0)
推荐(0)
2022年10月18日
You appear to be running an X server; please exit X before installing. For further details
摘要: 1.安装nvidia驱动报错: You appear to be running an X server; please exit X before installing. For further details 2.原因 主要是由于安装远程控制lightgm 导致X-server启动 3.修复 .
阅读全文
posted @ 2022-10-18 16:43 Leonardo-li
阅读(9189)
评论(0)
推荐(0)
nginx下websocket的长连接问题
摘要: 1.浏览器报错 2.解决问题 (1) 在nginx http中添加 http { map $http_upgrade $connection_upgrade { default upgrade; '' close; } } #在nginx的websocket中添加以下行 location /ws/
阅读全文
posted @ 2022-10-18 11:13 Leonardo-li
阅读(388)
评论(0)
推荐(0)
2022年10月17日
在宿主机上执行docker容器内部的命令
摘要: docker exec -it ai-server /bin/bash -c "rm -f /home/nvidia/aibox/aibox-ai-server/bin/core*"
阅读全文
posted @ 2022-10-17 17:47 Leonardo-li
阅读(198)
评论(0)
推荐(0)
shell脚本计算执行时间
摘要: #!/bin/bash startTime=`date +%Y%m%d-%H:%M:%S` startTime_s=`date +%s` sleep 15 endTime=`date +%Y%m%d-%H:%M:%S` endTime_s=`date +%s` sumTime=$[ $endTime
阅读全文
posted @ 2022-10-17 15:34 Leonardo-li
阅读(375)
评论(0)
推荐(0)
2022年10月12日
shell脚本设置日志格式
摘要: 1.封装函数 #!/bin/bash function log() { echo "$@" } //测试: log "this is a test..." log "today is `date '+%Y-%m-%d'` " 2.设置时间日志 #!/bin/bash function log() {
阅读全文
posted @ 2022-10-12 16:09 Leonardo-li
阅读(347)
评论(0)
推荐(0)
2022年10月2日
flask获取硬件资源信息
摘要: 1.获取gpu信息 [root@ks-devops python]# cat gpu_info.py import pynvml UNIT = 1024 * 1024 def GpuInfo(): pynvml.nvmlInit() #初始化 gpuDeriveInfo = pynvml.nvmlS
阅读全文
posted @ 2022-10-02 10:37 Leonardo-li
阅读(162)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
15
16
17
18
···
28
下一页
公告