1. Linuxhistorical

    1. Using Linux 1.1. Common Commands Common Linux Commands 2. Linux Process Management Threads Processes 3. Linux I/O I/O 4. Linux Memory Management Memory Management 5. Linux System Calls System Calls 6. Linux Virtualization Linux AUFS Linux Namespac

  2. Threadhistorical

    1. What Is a Thread? An execution flow within a process. A thread is an execution flow of a process. Multithreading means that a process has multiple execution flows. If threads are implemented at user level, they are called user space threads. If th

  3. Processhistorical

    [toc] 1. Process A process can be viewed as a running program. Use ps aux to view processes. A new process can be created using the fork call. The created child process and parent process share all segments, such as text, stack, heap, etc. Only when

  4. Memory Managementhistorical

    [toc] 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 for later use. 2. References caching What is the difference between buffer vs cache memory in Linu

  5. System Callshistorical

    1. What Is a System Call? Call APIs provided by the operating system in a way similar to a function call. 2. System Call vs Function Call System Call Function Call CPU mode Kernel mode User mode Calling method Integer number Function name Parameter p

  6. I/O Modelshistorical

    [toc] 1. Synchronous vs Asynchronous When an application invokes a system call, who handles the process? In the former, I ask you Synchronous means the application handles it itself. In the latter, you notify me Asynchronous means the operating syste

  7. select, poll, epollhistorical

    1. select Several major disadvantages of select: Every time select is called, the fd set needs to be copied from user space to kernel space. This overhead becomes large when there are many fds. At the same time, each select call requires the kernel t

  8. I/Ohistorical

    1. What Is a File? A file consists of a sequence of bytes. Under Linux, everything is a file. All I/O devices are files. /dev/sda2 (/usr disk partition) /dev/tty2 (terminal) The kernel is also a file. /boot/vmlinuz 3.13.0 55 generic (kernel image) /p

  9. Zero-Copy Mechanismhistorical

    [toc] 1. Traditional I/O The normal data processing flow is: 1. Use DMA copy (CPU participation is not required) to copy data from disk to the disk buffer. 2. Use CPU copy to copy data from the disk buffer to user space. 3. Process it in user space.

  10. CPU Tuninghistorical

    1. CPU Performance Metrics 1.1. CPU Utilization The percentage of non idle time out of total CPU time. Depending on the tasks running on the CPU, it is further divided into user CPU, system CPU, I/O wait CPU, soft interrupts, hard interrupts, etc. Us

  11. tophistorical

    1. Usage Press h to view the help menu. View the CPU usage of a process. 2. Output 3. Explanation top 13:57:40 up 1:47, 0 users, 13:57:40: current system time; it can be obtained with date. up 1:47: how long this system has been running continuously;

  12. Memory Tuninghistorical

    1. Memory Performance Metrics 1.1. System Memory Usage 1.1.1. Used Memory Memory that has already been used. 1.1.2. Remaining Memory Memory that has not yet been used. 1.1.3. Shared Memory The amount of memory used by tmpfs; it is also a kind of cach

  13. vmstathistorical

    1. Usage 2. Result 3. Explanation buffer and cache: different from buffer and cache in the traditional sense. Memory Management buffer: file metadata. cache: file data. procs r: number of processes running and waiting for CPU time slices. Generally n

  14. Disk Tuninghistorical

    1. Disk Performance Metrics 1.1. Filesystem I/O Performance Metrics 1.1.1. Storage Space Usage Capacity, used amount, remaining space, etc. 1.1.2. Cache Usage Page cache, directory entry cache, inode cache, and caches for specific filesystems (such a

  15. Network Tuninghistorical

    1. Network Performance Metrics 1.1. Network Layer It is mainly responsible for network packet encapsulation, addressing, routing, sending, and receiving. Performance metric: Number of network packets that can be processed per second, PPS. The kernel'

  16. iostathistorical

    1. Usage By default, the output is not the current I/O state, but the state since the system started. 2. Output 3. Explanation avg cpu %user: CPU time spent in user mode, generally <60%. %nice: CPU time used by user processes whose priority has been

  17. Linux Performance Tuninghistorical

    1. CPU CPU Tuning 2. Memory Memory Tuning 3. Disk Disk Tuning 4. Network Network Tuning

  18. Flame Graphhistorical

    1. perf Command It is a performance analysis tool natively provided by Linux. It returns the function name currently being executed by the CPU and the call stack (stack). 1.1. Usage perf record means record. F 99 means 99 times per second. If all 99

  19. ulimithistorical

    You can set resources for all processes of the current user in the current shell . ulimit has soft limits and hard limits: Soft limit: any process can modify the soft limit, but the soft limit cannot exceed the hard limit. Hard limit: ordinary proces

  20. tcpdumphistorical

    1. Usage 1.1. Get the Network Interface Name tcpdump D ifconfig 1.2. Capture Packets Basic usage Advanced syntax Type keywords: host, port. Specify transmission direction: src, dst. Protocol keywords: tcp, udp. Logical operators: and, or. 1.3. Export

  21. Common Linux Commandshistorical

    [toc] 1. Processes 1.1. top top 1.2. vmstat vmstat 1.3. ps ps 1.4. pstree pstree 1.5. ulimit ulimit 1.6. systemd systemd 1.7. pidstat pidstat 1.8. perf perf 2. Memory 2.1. free free 3. Disk 3.1. df df 3.2. iostat iostat 3.3. lsof lsof 3.4. strace str

  22. sarhistorical

    1. Usage Output once per second. 2. Output 3. Explanation IFACE: network interface. rxpck/s: number of packets received per second. txpck/s: number of packets sent per second. rxkB/s: amount of data received per second, in KB. txkB/s: amount of data

  23. pidstathistorical

    Usage Output every 1 second. Output Explanation Time User ID Process PID Read throughput Write throughput

  24. stracehistorical

    Usage View a process's system calls. Output

  25. Linux Namespacehistorical

    1. History of Linux Namespace Linux kernel version 2.4 supported mount namespace. Linux kernel version 2.6 supported most namespaces, such as IPC, Network, PID, and UTS. Linux kernel version 3.8 supported User namespace. 2. What Is Linux Namespace? l

  26. Linux cgrouphistorical

    1. History of Linux cgroup Google engineers developed process containers, which were later renamed control groups. Linux kernel version 2.6 supported cgroup. 2. What Is Linux cgroup? limits how much you can use A Linux kernel feature that limits proc

  27. chroothistorical

    1. What Is chroot? A chroot in a Linux system is used to change the root directory. In a Linux system, the default directory structure begins with / ; chroot uses a specified location as the / location. 2. Why chroot Is Needed 2.1. Security Restrict

  28. NeoVimhistorical

    1. Install NeoVim 2. vim Shortcuts vim.md 3. References Neovim ArchWiki

  29. aria2historical

    1. Download 2. Configuration vim /etc/aria2c.conf 3. Background Service vim /.config/systemd/user/aria2.service Start 4. References aria2 \ ArchWiki GitHub sjh0020/aria2: A convenience bundle, based on Zhihu references Aria2 & YAAW Usage Instructions

  30. Backuphistorical

    1. Linux 1.1. timeshift 2. Windows 3. References What Is the Difference Between Full Backup, Incremental Backup, and Differential Backup? Zhihu Best Windows System Backup Software in 2021 Wondershare Recoverit What Good Backup Software Is Available f

  31. bcchistorical

    1. Installation 2. References Install bcc on ArchLinux Nan Xiao's Blog

  32. Clipboardhistorical

    Clipboard

  33. duktohistorical

    Install dukto

  34. fcitxhistorical

    1. Install fcitx 2. Configure fcitx vim /.pam environment Troubleshooting 3. References Fcitx5 (Simplified Chinese) ArchWiki)

  35. fsearchhistorical

    1. Install fsearch 2. Configuration References Listary Alternatives for Linux AlternativeTo

  36. Image Toolhistorical

    1. Browsing 2. Compression Free Compression! Use This Handy Tool to Compress Images on Windows! UISDC Linux Batch Image Compression Tool ImageMagick Ant.Master's Blog 3. Screenshots References FastStone Image Viewer Alternatives for Linux Alternative

  37. Manjarohistorical

    1. Dual Boot System Time System time (Simplified Chinese) ArchWiki?utm source=pocket mylist) System time (Simplified Chinese) ArchWiki?utm source=pocket mylist) 2. Essential Software image tool.md office.md pdf.md vnote.md vscode.md smplayer.md synct

  38. Officehistorical

    WPS References WPS Office (Simplified Chinese) ArchWiki)

  39. PDFhistorical

    foxitreader References SumatraPDF Alternatives for Linux AlternativeTo

  40. smplayerhistorical

    1. Install smplayer 2. Configuration smplayer

  41. sshfshistorical

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

  42. syncthinghistorical

    1. Install syncthing 2. References 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 applica

  43. Translatehistorical

    Youdao Dictionary

  44. ugethistorical

    1. Install uget 2. Browser Extension uGet Integration – Get this Extension for 🦊 Firefox (en US) uGet Integration Chrome Web Store

  45. vimhistorical

    1. vim Modes normal insert: i insert before the cursor I insert at the beginning of the line a insert after the cursor A insert at the end of the line o insert on the next line O insert on the previous line insert normal: ESC normal< visual: v normal

  46. vnotehistorical

    Install vnote2 Release Fix macOS · vnotex/vnote

  47. vscodehistorical

    Installation References Visual Studio Code (Simplified Chinese) ArchWiki)

  48. WeChathistorical

    1. Install WeChat 2. Configure Resolution 3. Configure Missing Fonts 4. References ArchLinux WeChat/TIM Installation and Garbled Text Fix Juejin

  49. zshhistorical

    1. Install oh my zsh 2. Plugin Configuration vim /.zsh 3. Apply 4. References Which Command Line Programs Can Be Called Essential Tools? Zhihu

  50. dfhistorical

    1. Usage 2. Result 3. Explanation Nothing much to say.

  51. dighistorical

    Usage Output Explanation nslookup obtains an IP from the DNS server cache, while dig obtains the IP from the authoritative server. It is divided into several parts: What is being queried What the result is What the authoritative server is Information

  52. freehistorical

    1. Usage 2. Result 3. Explanation free / total 100% 70% means memory is sufficient; <20% means memory is insufficient.

  53. ifconfighistorical

    1. Usage 2. Output 3. Explanation wifi0: network interface name

  54. ifstathistorical

    1. Usage 2. Result 3. Explanation

  55. iftophistorical

    References Learn iftop Traffic Monitoring from Scratch (Find the IP and Port Consuming the Most Server Traffic) CNBlogs

  56. lsofhistorical

    Usage Output Explanation

  57. nethogshistorical

    Usage Output Explanation View network speed.

  58. netstathistorical

    1. View TCP Connections 2. Count TCP Connection States and Their Numbers

  59. nslookuphistorical

    Usage Output Explanation Server+Address: address and port of the DNS server Non : non authoritative answer from the DNS server cache The canonical name of baidu.com is www.a.shifen.com There are two addresses, 39 and 38

  60. perfhistorical
  61. pshistorical

    1. Usage Normal usage Show threads Show thread count 2. Output 3. Explanation USER: user running the process PID: process ID %CPU: percentage of CPU used %MEM: percentage of memory used VSZ: virtual memory used, KB RSS: physical memory used, KB TTY:

  62. pstreehistorical

    1. Usage 2. Output 3. Explanation Output processes in tree form The p parameter outputs process IDs

  63. rsynchistorical

    1. Usage 2. References rsync: A Better Alternative to scp on Linux – Gooney

  64. scphistorical

    Linux scp Command Runoob

  65. systemdhistorical

    [toc] Systemd Beginner Tutorial: Practical Guide Ruan Yifeng's Weblog Systemd Beginner Tutorial: Commands Ruan Yifeng's Weblog

  66. traceroutehistorical

    Usage Output Explanation Every hop on the path to the destination is printed. Sequence number Round trip time of the first packet Round trip time of the second packet Round trip time of the third packet Address of this hop Why is traceroute slower th

  67. Linux AUFShistorical

    1. History of Linux AUFS Because UnionFS had poor reliability and performance, AUFS is effectively a rewrite of UnionFS. 2. What Is Linux AUFS? Advanced multi layered unification filesystem is an implementation of union mount for the Linux filesystem