命令
Operating Systems / Linux · 27 notes
- 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;
- 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
- 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
- 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
- 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
- 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
- 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
- pidstathistorical
Usage Output every 1 second. Output Explanation Time User ID Process PID Read throughput Write throughput
- 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
- 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
- freehistorical
1. Usage 2. Result 3. Explanation free / total 100% 70% means memory is sufficient; <20% means memory is insufficient.
- iftophistorical
References Learn iftop Traffic Monitoring from Scratch (Find the IP and Port Consuming the Most Server Traffic) CNBlogs
- 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
- perfhistorical
- 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:
- pstreehistorical
1. Usage 2. Output 3. Explanation Output processes in tree form The p parameter outputs process IDs
- systemdhistorical
[toc] Systemd Beginner Tutorial: Practical Guide Ruan Yifeng's Weblog Systemd Beginner Tutorial: Commands Ruan Yifeng's Weblog
- 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