1. 1.2 Linuxhistorical

    1. Linux使用 1.1. 常用命令 Linux常用命令.md 2. Linux进程管理 线程.md 进程.md 3. Linux IO IO.md 4. Linux内存管理 内存管理.md 5. Linux系统调用 系统调用.md 6. Linux虚拟化 Linux AUFS.md Linux

  2. 2.1 线程historical

    1. 什么是线程 进程内的执行流 线程是进程的执行流。多线程指进程有多个执行流。 如果线程是在user level实现的,那么叫做用户态线程。如果是在kernel level实现的,那么叫做内核级线程。区别在于前者内核无法感知到线程的运行。 在Linux中,用的是内核级线程(LWP)。每个线程在内核

  3. 2.2 进程historical

    1. 进程 进程可以看作一个执行中的程序 使用ps aux可以查看进程 使用fork调用可以创建一个新的进程。创建出来的child进程和parent进程共享所有的segment:如text、stack、heap等,当child进程修改stack或heap的时候才会复制独有的一份stack和heap

  4. 3.1 内存管理historical

    1. buffer vs cache - A buffer is something that has yet to be "written" to disk. - A cache is something that has been "read" from the disk and stored

  5. 4.1 系统调用historical

    1. 系统调用是什么 使用类似函数调用的方式调用操作系统提供的API 2. 系统调用 vs 函数调用 系统调用 函数调用 ------- ----------------------------------------------- ------- CPU态 内核态 用户态 调用方式 整型编号 函数

  6. 4.2 IO模型historical

    1. 同步 vs 异步 - 应用程序调用系统调用,过程由谁处理 - 前者是我来询问你 同步是由应用程序自己处理 - 后者是你来通知我 异步是由操作系统处理,完成之后通过回调或者事件通知 2. 阻塞 vs 非阻塞 - 应用程序调用系统调用,没有结果怎么办? - 阻塞是应用程序会等待 - 非阻塞是应用程

  7. 4.3 select、poll、epollhistorical

    1. select - select的几大缺点: - 每次调用select,都需要把fd集合从用户态拷贝到内核态,这个开销在fd很多时会很大 - 同时每次调用select都需要在内核遍历传递进来的所有fd,这个开销在fd很多时也很大 - select支持的文件描述符数量太小了,默认是1024 - 2

  8. 4.4 IOhistorical

    1. 什么是文件 文件是由字节序列组成的,在Linux下一切皆文件 所有的IO设备都是文件 - /dev/sda2 (/usr disk partition) - /dev/tty2 (terminal) 内核也是文件 - /boot/vmlinuz-3.13.0-55-generic (kerne

  9. 4.5 零拷贝机制historical

    1. 传统IO 正常的数据处理流程是这样的: 1. 使用DMA copy(不需要cpu参与)把磁盘中的数据copy到磁盘缓冲区 2. 使用cpu copy把磁盘缓冲区的数据复制到用户区 3. 用户区进行处理 4. 使用cpu copy把 用户区的数据拷贝到Socket缓冲区 5. 使用DMA cop

  10. 5.1 CPU调优historical

    1. CPU性能指标 1.1. CPU使用率 非空闲时间占总 CPU 时间的百分比。 根据 CPU 上运行任务的不同,又被分为用户 CPU、系统 CPU、等待 I/O CPU、软中断和硬中断等 - 用户CPU:应用程序 - 系统CPU:内核(不包括中断) - 等待IO CPU:系统与硬件设备交互 -

  11. 5.2 tophistorical

    1. 使用 - 敲下h查询帮助菜单 - - 查看某进程CPU使用率 2. 输出 3. 解析 - top - 13:57:40 up 1:47, 0 users, - 13:57:40:当前系统时间,可以用date获取 - up 1:47:此系统已经连续运行的时间,可以用last reboot获取系统

  12. 5.3 内存调优historical

    1. 内存性能指标 1.1. 系统内存使用情况 1.1.1. 已用内存 已经使用的内存 1.1.2. 剩余内存 还未使用的内存 1.1.3. 共享内存 tmpfs使用的内存大小,其实也是一种缓存 1.1.4. 可用内存 剩余内存+缓存和缓冲区 1.1.5. 缓存和缓冲区 缓存分为两部分 - 磁盘读取

  13. 5.4 vmstathistorical

    1. 使用 2. 结果 3. 解析 - buffer和cache:跟传统意义上的buffer和cache不同。内存管理.md - buffer:文件元数据 - cache:文件数据 - procs - r:运行和等待CPU时间片的进程数。一般不超过cpu总核数的两倍 - b:等待资源的进程数,比如等

  14. 5.5 磁盘调优historical

    1. 磁盘性能指标 1.1. 文件系统 I/O 性能指标 1.1.1. 存储空间使用情况 容量、使用量以及剩余空间等 1.1.2. 缓存使用情况 页缓存、目录项缓存、索引节点缓存以及各个具体文件系统(如 ext4、XFS 等)的缓存 1.2. 磁盘 I/O 性能指标 1.2.1. 使用率 磁盘忙处理

  15. 5.6 网络调优historical

    1. 网络性能指标 1.1. 网络层 - 它们主要负责网络包的封装、寻址、路由,以及发送和接收 - 性能指标: - 每秒可处理的网络包数 PPS。 - 可以用内核自带的发包工具 pktgen 测试 1.2. 传输层 - 它们主要负责网络传输 - 性能指标: - 吞吐量(BPS) - 连接数以及延迟

  16. 5.7 iostathistorical

    1. 使用 - 默认输出的不是当前IO状态,而是系统启动以来的 2. 输出 - 3. 解释 - avg-cpu - %user:用户模式花费的CPU时间 一般<60% - %nice:用户进程改变过优先级的进程占用的CPU时间 - %system:内核进程所花费的CPU时间。一般sy+us<80%

  17. 5.8 Linux性能调优historical

    1. CPU CPU调优.md 2. 内存 内存调优.md 3. 磁盘 磁盘调优.md 4. 网络 网络调优.md

  18. 5.9 火焰图historical

    1. perf命令 是 Linux 系统原生提供的性能分析工具,会返回 CPU 正在执行的函数名以及调用栈(stack) 1.1. 使用 - perf record表示记录 - -F 99表示每秒99次。如果99次都返回同一个函数名,那就说明 CPU 这一秒钟都在执行同一个函数,可能存在性能问题 -

  19. 5.10 ulimithistorical

    可以设置 当前shell 的 当前用户 的 所有进程 的资源 ulimit 有软限制和硬限制之分: - 软限制:任何进程都可以修改软限制,但是软限制不能超过硬限制; - 硬限制:普通进程可以降低硬限制,只有 root 进程可以提高硬限制;

  20. 5.11 tcpdumphistorical

    1. 使用 1.1. 获取网卡名 - tcpdump -D - ifconfig 1.2. 抓包 - 简单使用 - 高级语法 - 类型关键字:host port - 确认传输方向:src dst - 协议关键字:tcp、udp - 逻辑运算符:and or 1.3. 导出 1.4. 使用wiresh

  21. 5.12 Linux常用命令historical

    1. 进程 1.1. top - top.md 1.2. vmstat - vmstat.md 1.3. ps - ps.md 1.4. pstree - pstree.md 1.5. ulimit - ulimit.md 1.6. systemd - systemd.md 1.7. pidstat

  22. 5.13 sarhistorical

    1. 使用 每秒输出一次 2. 输出 3. 解析 - IFACE:网卡接口 - rxpck/s:每秒接收的包数目 - txpck/s:每秒发送的包数目 - rxkB/s:每秒接收的数据量,单位KB - txkB/s:每秒发送的数据量,单位KB

  23. 5.14 pidstathistorical

    使用 每个1秒输出 输出 解析 - 时间 - 用户id - 进程pid - 读吞吐 - 写吞吐

  24. 5.15 stracehistorical

    使用 查看进程的系统调用 输出

  25. 6.1 Linux Namespacehistorical

    1. Linux Namespace历史 - Linux 内核 2.4版本支持mount namespace - Linux 内核 2.6版本支持了大多数的namespace,比如 IPC、Network、PID、和 UTS - Linux 内核 3.8版本支持User namespace 2. 什

  26. 6.2 Linux cgrouphistorical

    1. Linux cgroup历史 - Google的工程师开发了process containers,之后重命名为control group - Linux 内核 2.6版本支持了cgroup 2. 什么是Linux cgroup limits how much you can use Linux

  27. 6.3 chroothistorical

    1. 什么是chroot Linux系统中的一个chroot,用于修改根目录 Linux系统中,默认的目录结构是以/开始,以指定的位置作为 / 位置 2. 为什么需要chroot 2.1. 安全 限制用户的权力 2.2. 隔离 建立一个与原系统隔离的系统目录结构,方便用户的开发: 3. 如何使用ch

  28. NeoVimhistorical

    1. NeoVim安装 2. vim快捷键 vim.md 3. 参考 Neovim ArchWiki

  29. aria2historical

    1. 下载 2. 配置 vim /etc/aria2c.conf 3. 后台服务 vim /.config/systemd/user/aria2.service 启动 4. 参考 aria2 \ ArchWiki GitHub \ sjh0020/aria2: 这是一个懒人合集包,参考自知乎 Aria2 & YAAW 使用说明

  30. backuphistorical

    1. Linux 1.1. timeshift 2. Windows 3. 参考 完全备份、增量备份和差异备份的区别在哪里? \ 知乎 2021年最佳Windows系统备份软件\ 万兴恢复专家 Windows 10 系统有什么好用的备份软件? \ 知乎

  31. bcchistorical

    1. 安装 2. 参考 Install bcc on ArchLinux \ Nan Xiao's Blog

  32. clipboardhistorical

    剪切板

  33. duktohistorical

    dukto安装

  34. fcitxhistorical

    1. fcitx安装 2. fcitx配置 vim /.pam environment 问题诊断 3. 参考 Fcitx5 (简体中文) ArchWiki)

  35. fsearchhistorical

    1. fsearch安装 2. 配置 参考 Listary Alternatives for Linux AlternativeTo

  36. image toolhistorical

    1. 浏览 2. 压缩 免费压缩!Window 想压缩图片就用这个利器! \ 优设网 \ UISDC Linux 图片批量压缩工具 ImageMagick \ Ant\.Master's Blog 3. 截图 参考 FastStone Image Viewer Alternatives for Linux AlternativeTo

  37. manjarohistorical

    1. 双系统时间 System time (简体中文) ArchWiki?utm source=pocket mylist) System time (简体中文) ArchWiki?utm source=pocket mylist) 2. 必备软件 image tool.md office.md pdf.md vnote.md vscode.md smplayer.md syncthing.md translate.md uget.md wechat.md zsh.md NeoVim.md ar

  38. officehistorical

    WPS 参考 WPS Office (简体中文) ArchWiki)

  39. pdfhistorical

    foxitreader 参考 SumatraPDF Alternatives for Linux AlternativeTo

  40. smplayerhistorical

    1. smplayer安装 2. 配置 smplayer

  41. sshfshistorical

    SSHFS: How to Mount Remote File Systems Over SSH phoenixNAP KB

  42. syncthinghistorical

    1. syncthing安装 2. 参考 sieren/QSyncthingTray: ATT: NO LONGER ACTIVELY MAINTAINED, NEEDS NEW OWNER \ \ A OS X / Windows / Linux Tray App for Syncthing written in C\+\+ Syncthing Releases · canton7/SyncTrayzor Martchus/syncthingtray: Tray application and

  43. translatehistorical

    有道词典

  44. ugethistorical

    1. uget安装 2. 浏览器扩展 uGet Integration – Get this Extension for 🦊 Firefox (en US) uGet Integration Chrome 网上应用店

  45. vimhistorical

    1. vim模式 normal insert: i 光标前插入 I 行首插入 a 光标后插入 A 行尾插入 o 下一行插入 O 上一行插入 insert normal: ESC normal< visual: v normal 命令: : 比如15会跳转到15行 2. 光标移动 上下左右: hjkl 15G 跳到15行 5J 往下跳5行 行内: f 往后查找字符, F 往前查找字符 配合; 下一个和,上一个 单词: w 下一个单词首部, e 下一个单词尾部, b 上一个单词开头 行首行尾: ^

  46. vnotehistorical

    vnote2安装 Release Fix macOS · vnotex/vnote

  47. vscodehistorical

    安装 参考 Visual Studio Code (简体中文) ArchWiki)

  48. wechathistorical

    1. 微信安装 2. 配置分辨率 3. 配置缺失字体 4. 参考 ArchLinux微信、TIM安装与乱码解决方法 掘金

  49. zshhistorical

    1. oh my zsh安装 2. 插件配置 vim /.zsh 3. 生效 4. 参考 有哪些命令行的软件堪称神器? 知乎

  50. dfhistorical

    1. 使用 2. 结果 3. 解析 没啥好说的

  51. dighistorical

    使用 输出 解析 nslookup是从DNS服务器缓存中获取ip,而dig是从权威服务器获取ip 分为几部分 查询的是什么 结果是什么 权威服务器是什么 权威服务器的信息 响应时间 CNAME类型: A执行IPv4 AAAA指向IPv6 NS指向权威域名服务器

  52. freehistorical

    1. 使用 2. 结果 3. 解析 free / total 100% 70% 说明内存充足,<20%说明内存不够

  53. ifconfighistorical

    1. 使用 2. 输出 3. 解析 wifi0:网卡名

  54. ifstathistorical

    1. 使用 2. 结果 3. 解析

  55. iftophistorical

    参考 从零开始学习iftop流量监控(找出服务器耗费流量最多的ip和端口) \ 雪山飞猪 \ 博客园

  56. lsofhistorical

    使用 输出 解析

  57. nethogshistorical

    使用 输出 解析 查看网速

  58. netstathistorical

    1. 查看TCP连接 2. 统计TCP连接状态及其数量

  59. nslookuphistorical

    使用 输出 解析 Server+Address:DNS 服务器的地址和端口 Non :DNS 服务器缓存中的非权威应答 baidu.com 的权威名是www.a.shifen.com 有两个地址 39 和 38

  60. perfhistorical
  61. pshistorical

    1. 使用 正常使用 显示线程 显示线程数 2. 输出 3. 解析 USER:运行进程的用户 PID:进程号 %CPU:占用的CPU百分比 %MEM:占用的内存百分比 VSZ:占用的虚拟内存,KB RSS:占用的物理内存,KB TTY:运行在哪个终端上,如果跟终端无关,那么显示? tty1 tty6是本机登录,pts/0等等是网络登录 STAT:状态 R:运行中 S:休眠 T:暂停。比如ctrl+Z Z:僵尸 D:不可中断 附加 s:多进程 l:多线程 +:前台 <:高优先级 N:低优先级 ST

  62. pstreehistorical

    1. 使用 2. 输出 3. 解析 以tree的形式输出进程 p参数是输出进程号

  63. rsynchistorical

    1. 使用 2. 参考 rsync:Linux下scp的更优替代品 – Gooney小站

  64. scphistorical

    Linux scp命令 \ 菜鸟教程

  65. systemdhistorical

    [toc] Systemd 入门教程:实战篇 \ 阮一峰的网络日志 Systemd 入门教程:命令篇 \ 阮一峰的网络日志

  66. traceroutehistorical

    使用 输出 解析 打到目的地的每一跳都打印出来 序号 第一个包往返时间 第二个包往返时间 第三个包往返时间 这一跳的地址 为什么traceroute比ping慢,只有第10跳的时间才是和ping的时间相同 参考 networking \ Why does traceroute take much longer than ping? \ Server Fault Traceroute命令简介\ 哔哩哔哩\ bilibili

  67. Linux AUFShistorical

    1. Linux AUFS历史 由于UnionFS可靠性和性能不高,AUFS相当于是UnionFS的重写版 2. 什么是Linux AUFS advanced multi layered unification filesystem,是Linux文件系统union mount的一种实现。 所谓的union mount就是将多个目录组合成一个目录的方法,这个目录对外表现为包含了所有目录的内容 3. 为什么需要Linux AUFS 4. 如何使用Linux AUFS 1. 创建目录和文件 2. 挂载