上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 66 下一页
摘要: title: libvirt让普通用户能用kvm date: 2022-04-17 20:31:48 tags: 有些发行版中,普通用户可能没法用KVM: virsh capabilities | grep domain <domain type='qemu'/> <domain type='qem 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(0) 评论(0) 推荐(0) 编辑
摘要: title: centos8编译安装libvirt 7.6 date: 2021-08-11 21:50:07 官方编译教程:https://libvirt.org/compiling.html 源码下载:<https://libvirt.org/sources/> 先进root用户(用sudo好像 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(6) 评论(0) 推荐(0) 编辑
摘要: title: Deepin osinfo-query os command not found date: 2022-01-08 23:37:15 tags: sudo apt install libosinfo-bin 来源:https://command-not-found.com/osinfo 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(0) 评论(0) 推荐(0) 编辑
摘要: title: 重定向正在运行的进程的输出 date: 2022-04-17 16:08:00 tags: 用reredirect可以实现:https://github.com/jerome-pouiller/reredirect/ 基础用法: reredirect -m FILE PID 然后进程的 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(4) 评论(0) 推荐(0) 编辑
摘要: title: 解决shell脚本中kill -2对后台进程不起作用 date: 2021-10-04 23:04:07 问题 kill -2就是发送SIGINT信号。我们期望的行为是,进程接收到SIGINT信号后就停止运行。例如: yes >/dev/null & pid=$! echo $pid 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(1) 评论(0) 推荐(0) 编辑
摘要: title: linux获取进程的用户时间 系统时间等 date: 2021-08-17 15:53:46 在/proc/[pid]/stat里有该进程的详细信息。其内容的解释可以在man 5 proc里查看(搜/stat) 相关部分如下: (14) utime%lu Amount of time 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(1) 评论(0) 推荐(0) 编辑
摘要: title: linux shell暂停前台作业 date: 2020-08-03 14:21:53 tags: 参考:https://www.169it.com/tech-qa-linux/article-12409335996555240730.html ctrl+C是向前台进程组发送SIGIN 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(0) 评论(0) 推荐(0) 编辑
摘要: title: ctrl+c杀死脚本中的timeout命令 date: 2022-07-20 17:45:15 tags: timeout命令默认运行在单独的进程组中,而终端的ctrl+c的SIGINT信号只发送给脚本,timeout命令接收不到。而脚本被timeout进程给阻塞了,要在timeout 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(1) 评论(0) 推荐(0) 编辑
摘要: title: Linux杀死所有子进程 date: 2022-06-08 21:49:51 tags: 杀死某一进程的所有子进程: pkill -P <PID> 杀死当前进程的所有子进程: pkill -P $$ 如果要在脚本退出前杀死所有子进程,只需要: trap "pkill -P $$" EX 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(26) 评论(0) 推荐(0) 编辑
摘要: title: Linux将进程从当前终端detach date: 2022-09-07 13:19:22 tags: 场景 ssh到服务器,开了进程,然后想把进程转移到后台执行,然后关掉ssh连接。相当于实现nohup xxx &的效果。 方法 ctrl+z,给进程发送SIGTSTP信号,让进程暂停 阅读全文
posted @ 2024-09-28 14:13 寻找繁星 阅读(1) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 66 下一页