摘要:
参考 BuildYourOwnKernel https://wiki.ubuntu.com/KernelTeam/KernelMaintenance https://wiki.ubuntu.org.cn/UbuntuHelp:Kernel/Compile Ubuntu下获取内核源码 解压: cd /
阅读全文
posted @ 2022-05-01 10:18
dolinux
阅读(134)
推荐(0)
摘要:
参考 https://openanolis.cn/sig/pmem Linux挂载持久化内存(PMEM) Linux文件系统与持久性内存介绍:块设备、闪存(NAND/NOR)、NVDIMM(非易失性内存)、PMEM(PMDK)- ndctl Linux Kernel中AEP的现状和发展
阅读全文
posted @ 2022-05-01 00:14
dolinux
阅读(190)
推荐(0)
摘要:
参考 https://developer.aliyun.com/article/807824 https://openanolis.cn/video/447397858019557785 内核功能与接口
阅读全文
posted @ 2022-05-01 00:08
dolinux
阅读(68)
推荐(0)
摘要:
参考 https://gitee.com/anolis/tracing-ssar/blob/master/Reference_zh-CN.md https://gitee.com/anolis/tracing-ssar
阅读全文
posted @ 2022-05-01 00:05
dolinux
阅读(71)
推荐(0)
摘要:
参考 https://gitee.com/anolis/sysak sysAK(青囊)系统运维工具集:如何实现高效自动化运维? 系统运维工具 SysAK的云上应用性能诊断 阿里sysAK工具简析
阅读全文
posted @ 2022-05-01 00:02
dolinux
阅读(91)
推荐(0)
摘要:
参考 https://github.com/facebookincubator/oomd https://engineering.fb.com/2018/07/19/production-engineering/oomd/ https://lwn.net/Articles/511731/ https
阅读全文
posted @ 2022-05-01 00:00
dolinux
阅读(230)
推荐(0)
摘要:
参考 https://openanolis.cn/video/528538652696158417 https://www.kernel.org/doc/html/latest/vm/damon/index.html https://gitee.com/anolis/data-profile-too
阅读全文
posted @ 2022-04-30 23:54
dolinux
阅读(56)
推荐(0)
摘要:
在遍历task_group的时候,需要会调用到walk_tg_tree_from函数,从函数注释看,这个函数的流程是: 以from为根节点,当进入一个节点时调用down回调函数,当离开一个节点时调用up函数。这个函数 采用的是深度遍历。 下面用一张图来说明: /* * Iterate task_gr
阅读全文
posted @ 2022-04-24 17:23
dolinux
阅读(152)
推荐(0)
摘要:
参考: https://www.freedesktop.org/wiki/Software/systemd/ Which Service Owns Which Processes? Tips & Tricks Diagnosing Boot Problems Predictable Network
阅读全文
posted @ 2022-04-16 10:55
dolinux
阅读(59)
推荐(0)
摘要:
参考:Control Groups vs. Control Groups systemd的源码链接:https://github.com/systemd/systemd ubuntu系统开机后,可以看到已经挂载了很多文件系统,其中有些是systemd在代码里自动挂载的,比如cgroup。 /dev/
阅读全文
posted @ 2022-04-15 20:28
dolinux
阅读(1416)
推荐(0)
摘要:
内核版本:5.14 ubuntu版本:20.04 参考: Linux_schedule_cgroup.pdf 在开机时,会自动挂载cgroup文件系统,可以通过cat /proc/cgroups来查看当前在用的cgroup子系统。 root@ubuntu-vm:~# cat /proc/cgroup
阅读全文
posted @ 2022-04-15 15:34
dolinux
阅读(651)
推荐(0)
摘要:
参考: https://blog.csdn.net/zhoudawei/article/details/86669868 源码路径:fs/kernfs
阅读全文
posted @ 2022-04-14 20:45
dolinux
阅读(443)
推荐(0)
摘要:
内核版本:Linux-5.14 在linux内核执行fork完毕后,原先父进程中可写的区域在父子进程中都被设置为了CoW,即将pte中可写的比特清除了。 下面是调用流程:[kernel/fork.c] sys_fork -> kernel_clone -> copy_process -> copy_
阅读全文
posted @ 2022-04-11 20:07
dolinux
阅读(168)
推荐(0)
摘要:
参考 双向循环链表 list_head 相关文件: include/linux/list.h 数据结构: struct list_head { struct list_head *next, *prev; }; 接口 static inline void INIT_LIST_HEAD(struct
阅读全文
posted @ 2022-04-07 16:06
dolinux
阅读(374)
推荐(0)
摘要:
参考:https://crash-utility.github.io/help_pages/sys.html 用法: 显示基本的系统信息,比如系统版本,cpu型号,内存容量以及panic信息等 sys 查看系统调用表 显示所有的系统调用信息: sys -c 根据系统调用号找到对应的系统调用信息: s
阅读全文
posted @ 2022-03-27 20:32
dolinux
阅读(219)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/ps.html 用法 显示所有进程的pid、task_struct、cpu以及运行状态等信息 ps MEM列:使用物理内存的百分比 VSZ列:虚拟地址空间大小,单位KB RSS列:实际使用的物理内存大小,单
阅读全文
posted @ 2022-03-27 20:29
dolinux
阅读(874)
推荐(0)
摘要:
参考: linux中在进程之间传递文件描述符的实现方式 用法: 显示每个cpu的rq中的任务信息(pid,task_struct以及进程名字) runq 显示每个cpu的rq的时间戳信息 runq -t 显示每个cpu上正在运行的任务已经运行了多长时间,格式是 天-时-分-秒-毫秒 runq -m
阅读全文
posted @ 2022-03-27 20:27
dolinux
阅读(679)
推荐(0)
摘要:
参考:https://crash-utility.github.io/help_pages/tree.html 用法: 指定要搜索的树的类型,如果不指定,默认是红黑树类型 tree -t <树类型> | 树类型 | 简写 | 含义 | | : : | : : | : : | | radix | ra
阅读全文
posted @ 2022-03-27 20:23
dolinux
阅读(432)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/files.html 用法: 查看进程当前打开的文件的信息,被打开的文件的file,dentry以及inode files <pid> 或者 files <进程task_struct> 根据dentry的地
阅读全文
posted @ 2022-03-27 20:22
dolinux
阅读(400)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/task.html 用法: 显示指定进程的task_struct信息 task <进程pid> 或者 task <进程的task_struct地址> // 可以通过ps或者task <pid>或者进程的ta
阅读全文
posted @ 2022-03-27 20:18
dolinux
阅读(333)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/kmem.html 常用方法: 查看page flags的定义 kmem -g 将指定的数字翻译为page的flags kmem -g 0x201 查看指定page的信息 kmem -p <page *>
阅读全文
posted @ 2022-03-27 20:18
dolinux
阅读(2403)
推荐(0)
posted @ 2022-03-27 20:17
dolinux
阅读(290)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/vm.html 用法: 查看进程的用户虚拟内存信息(mm_struct地址,vma等) 查看当前进程: vm 查看指定进程: vm <进程pid> 或者 vm <进程的task_struct> 查看进程的用
阅读全文
posted @ 2022-03-27 20:16
dolinux
阅读(509)
推荐(0)
摘要:
内核版本:5.14 代码路径: kernel/locking/rwsem.c include/linux/rwsem.h 概述 读写信号量具有如下特点: 是一种睡眠锁 可以有多个read持有读信号量 只允许一个write持有持有写信号量 read和write之间互斥 write和write之间互斥
阅读全文
posted @ 2022-03-26 09:52
dolinux
阅读(483)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/list.html crash中使用list遍历结构体 说明 头节点是A_head: struct A_head { // -h: 内嵌了list_head的结构体的地址 ... // -O: list_h
阅读全文
posted @ 2022-03-23 19:29
dolinux
阅读(1579)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/dis.html 常用命令 反汇编指定函数 dis -x <function name>/<addr> 反汇编指定偏移 dis -x <function+0xXX> 反汇编从函数开始到指定偏移量之间的代码
阅读全文
posted @ 2022-03-23 19:29
dolinux
阅读(945)
推荐(0)
摘要:
参考: https://crash-utility.github.io/help_pages/bt.html 常用命令 查看调用栈(默认查看的导致crash的进程的调用栈) bt 查看调用栈,显示返回地址在函数内的偏移 bt -sx 查看调用栈中函数的返回地址对应的代码行 bt -l 查看详细的调用
阅读全文
posted @ 2022-03-23 19:29
dolinux
阅读(2253)
推荐(0)
摘要:
编译linux内核时,如果选上了CONFIG_DEBUG_INFO_BTF,那么需要安装pahole,用于生成.tmp_vmlinux.btf. 对于ubuntu系统可以用下面的办法: 安装命令: sudo apt install dwarves 对于Centos系统,如果无法安装dwarves的话
阅读全文
posted @ 2022-03-19 17:46
dolinux
阅读(3314)
推荐(0)
摘要:
https://developer.aliyun.com/mirror/centos centos7: https://mirrors.aliyun.com/centos-vault/7.9.2009/os/Source/SPackages/ centos8: https://mirrors.ali
阅读全文
posted @ 2022-03-17 11:24
dolinux
阅读(496)
推荐(0)
摘要:
参考: https://blog.csdn.net/Kajima_/article/details/111415651 在静态编译tig时,遇到如下问题: LDFLAGS static ./configure --prefix=`pwd`/install make V=1 log如下: ... gc
阅读全文
posted @ 2022-03-10 16:31
dolinux
阅读(1267)
推荐(0)
摘要:
概述 在编译linux内核时,linux会检查当前使用的gcc的版本,如果太老的话,就无法编译linux。 问题 执行命令make ARCH=x86_64 defconfig时,提示如下错误: *** Default configuration is based on 'x86_64_defconf
阅读全文
posted @ 2022-03-08 16:57
dolinux
阅读(2118)
推荐(0)
摘要:
参考: https://blog.csdn.net/qq_43279371/article/details/107622819 https://www.jianshu.com/p/27a8187af0e9 《Kubernetes权威指南》第2章 问题: 参考第一个链接的话,不需要给docker设置h
阅读全文
posted @ 2022-02-27 09:12
dolinux
阅读(119)
推荐(0)
摘要:
参考: https://jingyan.baidu.com/article/f0062228fff083bad2f0c873.html https://www.cnblogs.com/heqiuyu/p/14268937.html 上面从 http://mirrors.aliyun.com/repo
阅读全文
posted @ 2022-02-24 16:22
dolinux
阅读(253)
推荐(0)
摘要:
参考 Multiple ways to access QEMU Machine Protocol (QMP) qmp-intro.txt http://wiki.qemu.org/QMP https://www.humblec.com/qmp-qemu-monitor-protocol-and-di
阅读全文
posted @ 2021-12-22 23:33
dolinux
阅读(765)
推荐(0)
摘要:

阅读全文
posted @ 2021-12-21 14:48
dolinux
阅读(53)
推荐(0)
摘要:
转载:https://blogs.oracle.com/linux/post/extracting-kernel-stack-function-arguments-from-linux-x86-64-kernel-crash-dumps Introduction It's common, when
阅读全文
posted @ 2021-12-07 22:04
dolinux
阅读(437)
推荐(0)
摘要:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html https://docs.cilium.io/en/latest/bpf/#bpf-and-xdp-reference-guide
阅读全文
posted @ 2021-12-04 21:46
dolinux
阅读(143)
推荐(0)
摘要:
Debugging the kernel is not necessarily rocket science; in fact it can be achieved using very simple and straight forward techniques and some time, pa
阅读全文
posted @ 2021-12-04 13:04
dolinux
阅读(122)
推荐(0)
摘要:
https://wiki.ubuntu.com/Kernel/Debugging KernelDebuggingTricks DebuggingKernelOops kernel-version-map Systemtap DebuggingKernelWithQEMU QMP kernelnewb
阅读全文
posted @ 2021-12-04 12:24
dolinux
阅读(157)
推荐(0)
摘要:
目录参考Ftrace经典用法function_graphtrace_event时间延迟标志histtrace_optionperf-toolstrace-cmd参考事件列举函数图示跟踪函数跟踪事件跟踪远程kernelsharkkprobeuprobeeBPFbpftraceplyBCCsimplep
阅读全文
posted @ 2021-11-10 14:16
dolinux
阅读(3332)
推荐(0)