摘要: 查看CPU核数 cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l 笔记本关闭盖子不休眠 /etc/systemd/logind.conf HandleLidSwitch=ignore systemctl restart syst 阅读全文
posted @ 2021-03-25 09:34 Xuperior 阅读(73) 评论(0) 推荐(0) 编辑
摘要: import subprocess def core_run_info(): out_bytes = subprocess.check_output("pgrep 'your exe comand' | xargs", shell=True) out_text = out_bytes.decode( 阅读全文
posted @ 2021-03-23 16:43 Xuperior 阅读(729) 评论(0) 推荐(0) 编辑
摘要: PATH : 执行LIBRARY_PATH : 编译LD_LIBRARY_PATH : 运行 Makefile : 函数说明 firstword : subst:替换字符串$(subst <string>,<target>,<text>) : 把 text 中的 string 替换成 target 阅读全文
posted @ 2021-03-19 15:38 Xuperior 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 第一步:获取源码 git clone https://github.com/google/googletest.git 第二步:安装cmake工具 yum install cmake 第三步:配置 cd googletest 配置工程:cmake . 编译:生成静态库 [root@xuperior- 阅读全文
posted @ 2021-03-18 21:39 Xuperior 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Shell $? : 获取函数返回值或者上一个命令的退出状态 常用检查程序执行结果,或者脚本上一步执行是否出错。 $0 : 当前脚本的文件名, 配合dirname, readlink获取当前文件目录; $n : 传递给脚本或函数的参数。n 是一个数字,表示第几个参数。例如,第一个参数是$1,第二个参 阅读全文
posted @ 2021-01-29 23:08 Xuperior 阅读(489) 评论(0) 推荐(0) 编辑
摘要: Command Line Substitutions Both the Run text box, and the Dir text box can contain meta-characters that cause the following items to be substituted in 阅读全文
posted @ 2021-01-05 18:36 Xuperior 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 安装依赖: sudo apt install g++ make flex bison libssl-dev libelf-dev bc 下载内核源码: linux-5.4.86.tar.xz 解压: tar xvf linux-5.4.86.tar.xz cd linux-5.4.86/ 准备配置K 阅读全文
posted @ 2021-01-01 07:20 Xuperior 阅读(2271) 评论(0) 推荐(0) 编辑
摘要: 基于 OS 内核的数据传输有什么弊端 1、中断处理:当网络中大量数据包到来时,会产生频繁的硬件中断请求,这些硬件中断可以打断之前较低优先级的软中断或者系统调用的执行过程,如果这种打断频繁的话,将会产生较高的性能开销。 2、内存拷贝:正常情况下,一个网络数据包从网卡到应用程序需要经过如下的过程:数据从 阅读全文
posted @ 2020-08-31 20:39 Xuperior 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 书单未整理,简单记录,稍后慢慢整改 Using the GNU Compiler Collection (GCC) https://gcc.gnu.org/onlinedocs/gcc/Debugging with GDB https://sourceware.org/gdb/onlinedocs/ 阅读全文
posted @ 2020-07-21 14:59 Xuperior 阅读(394) 评论(0) 推荐(0) 编辑