linux——内存泄露检测工具

  • Post author:
  • Post category:linux

文章目录 内存泄漏检查工具 Valgrind mtrace 内存泄漏检查工具 测试代码(包含mtrace部分): $ cat test.c #include <stdio.h> #include <malloc.h> #include <mcheck.h> int main() { mtrace(); int *n = (int*)malloc(sizeof(i…

继续阅读 linux——内存泄露检测工具

Linux下Bash脚本编写

  • Post author:
  • Post category:linux

变量 定义 a=test 使用 a 或 a或 a 或 {a} 定义环境变量 export IP=12356 定义只读变量 readonly ip 删除 unset 基本知识sh $n $1,$2可以获得传递的参数 也称为位置参数 ${10} 位置变量是从1开始的 #! 一个约定的标记,告诉系统这个脚本需要什么解释器执行 预先定义变量 $0 脚本名 这个是包括路径的 $*,$@ 所有的参数 #*以一…

继续阅读 Linux下Bash脚本编写

linux查看cpu温度,安装lm_sensors工具

  • Post author:
  • Post category:linux

linux查看cpu温度,安装lm_sensors工具 安装lm_sensors工具即可查看温度了 www.2cto.com yum -y install lm_sensors rpm -qa|grep coretemp 看一下有没有kmod-coretemp,没有的话需要安装这个 x86和x64的系统直接wget http://www.pperry.f2s.com/linux/coretemp/…

继续阅读 linux查看cpu温度,安装lm_sensors工具

手把手带你linux部署清华大学大模型最新版 chaglm2-6b

  • Post author:
  • Post category:linux

准备工作: # 下载项目源代码 git clone https://github.com/THUDM/ChatGLM2-6B # 切换到项目根目录 cd ChatGLM2-6B # 安装依赖 pip install -r requirements.txt # 安装web依赖 pip install gradio 如果安装出现问题,可尝试手动分别安装torch 1 # 1第一步安装虚拟环境并激活环境…

继续阅读 手把手带你linux部署清华大学大模型最新版 chaglm2-6b

linux进程优先级、进程nice值(转载)

  • Post author:
  • Post category:linux

网络收集,自学自用~ 进程cpu资源分配就是指进程的优先权(priority)。优先权高的进程有优先执行权利。配置进程优先权对多任务环境的linux很有用,可以改善系统性能。还可以把进程运行到指定的CPU上,这样一来,把不重要的进程安排到某个CPU,可以大大改善系统整体性能。 一、先看系统进程: 首先,我想用一个简单的命令来引起这个议题。 无论在linux或者unix系统中,用ps –l命令则会类…

继续阅读 linux进程优先级、进程nice值(转载)

No.108-HackTheBox-Linux-Charon-Walkthrough渗透学习

  • Post author:
  • Post category:linux

** HackTheBox-Linux-Charon-Walkthrough ** 靶机地址:https://www.hackthebox.eu/home/machines/profile/42 靶机难度:中级(3.5/10) 靶机发布日期:2017年10月7日 靶机描述: Charon is definitely one of the more challenging machines on H…

继续阅读 No.108-HackTheBox-Linux-Charon-Walkthrough渗透学习

flock用法详解 linux_linux-flock文件锁之实际运用

  • Post author:
  • Post category:linux

vi test.sh #! /bin/bashecho "Hello World" sleep 10 touch test.lock#随便命名 [root@localhost ~]# flock -xn ./test.lock -c "sh /root/test.sh" 运行中... 开启另外一个bash窗口运行 [root@localhost ~]# flock -xn ./test.lock …

继续阅读 flock用法详解 linux_linux-flock文件锁之实际运用

linux kvm bridge

  • Post author:
  • Post category:linux

物理主机上有5台kvm虚拟机,需要通过网桥的方式使其与外界通信。为了达到这个目的,需要将5台虚拟机的虚拟网卡(vnet0-vnet4)以及物理主机对外通信的物理网卡(这里为eth0)连接到同一个网桥(br0)上。物理主机操作系统为rhel6.3,虚拟机操作系统为rhel5.6。下面将记录如何通过创建网桥的方式来使kvm虚拟机与外界通信。 注意: 以下的操作可能导致网络中断,请在物理主机操作。 vh…

继续阅读 linux kvm bridge