当前位置:首页>Linux>Linux高级命令大全(80个)

Linux高级命令大全(80个)

  • 2026-07-04 02:36:09
Linux高级命令大全(80个)

从进阶到精通,掌握最专业的高级工具


今天,我分享整理80个最强大的高级命令,按技术领域分类,每个都有详细说明(和之前分享的文章命令稍微有重合)。

看完你将掌握

  • • ✅ 性能分析(20个命令)
  • • ✅ 系统追踪(20个命令)
  • • ✅ 网络分析(20个命令)
  • • ✅ 容器相关(20个命令)

📋 目录

  • • 一、性能分析(20个命令)
  • • 二、系统追踪(20个命令)
  • • 三、网络分析(20个命令)
  • • 四、容器相关(20个命令)
  • • 高级技巧
  • • 实战案例

一、性能分析(20个命令)

1. perf - 性能分析之王

功能:Linux性能分析工具,基于硬件性能计数器

安装

yum install perf  # CentOSapt install linux-tools-common  # Ubuntu

核心子命令

perf top      # 实时显示热点函数perf record   # 记录性能数据perf report   # 分析性能数据perf stat# 统计性能事件perf list     # 列出所有事件perf trace    # 追踪系统调用perf annotate # 注释源代码perf bench    # 性能基准测试

实战案例

# 案例1:实时查看热点函数$ perf topSamples: 10K of event 'cycles', 4000 Hz, Event count (approx.): 2345678901Overhead  Shared Object       Symbol  45.23%  [kernel]            [k] _raw_spin_lock  12.34%  libc-2.17.so        [.] __memcpy_sse2   8.76%  [kernel]            [k] copy_user_generic_string   5.43%  mysqld              [.] row_search_mvcc# 案例2:记录性能数据$ perf record -g -p 1234# -g: 记录调用栈# -p: 指定进程# Ctrl+C停止# 案例3:分析性能数据$ perf report# 显示详细的性能报告,可以展开调用栈# 案例4:统计性能事件$ perf stat -p 1234Performance counter stats for process id'1234':      12345.678901      task-clock (msec)         #    0.987 CPUs utilized             1,234      context-switches          #    0.100 K/sec                12      cpu-migrations            #    0.001 K/sec             2,345      page-faults               #    0.190 K/sec    45,678,901,234      cycles                    #    3.700 GHz    23,456,789,012      instructions              #    0.51  insn per cycle     5,678,901,234      branches                  #  460.123 M/sec       123,456,789      branch-misses             #    2.17% of all branches# 案例5:生成火焰图$ perf record -F 99 -a -g -- sleep 60$ perf script > out.perf$ ./stackcollapse-perf.pl out.perf > out.folded$ ./flamegraph.pl out.folded > flamegraph.svg# 案例6:追踪系统调用$ perf trace -p 1234# 类似strace但性能更好# 案例7:只记录用户态$ perf record -e cycles:u -p 1234# 案例8:只记录内核态$ perf record -e cycles:k -p 1234# 案例9:记录特定事件$ perf record -e cache-misses -p 1234# 案例10:性能基准测试$ perf bench sched messaging$ perf bench mem memcpy

常用事件

cycles: CPU周期instructions: 指令数cache-references: 缓存引用cache-misses: 缓存未命中branch-instructions: 分支指令branch-misses: 分支预测失败page-faults: 页错误context-switches: 上下文切换

2-10. perf工具集(精简版)

2. perf-tools - perf脚本集合

# Brendan Gregg的perf工具集$ git clone https://github.com/brendangregg/perf-tools# 常用工具$ ./execsnoop          # 追踪进程执行$ ./opensnoop          # 追踪文件打开$ ./funccount          # 统计函数调用$ ./funclatency        # 函数延迟分布$ ./iolatency          # IO延迟分布$ ./tcpretrans         # TCP重传追踪

3. flamegraph - 火焰图

# 生成火焰图$ git clone https://github.com/brendangregg/FlameGraph$ perf record -F 99 -a -g -- sleep 60$ perf script | ./stackcollapse-perf.pl | ./flamegraph.pl > flame.svg# 查看火焰图$ firefox flame.svg

4. bpftrace - eBPF追踪语言

# 安装$ yum install bpftrace  # CentOS 8+$ apt install bpftrace  # Ubuntu 20.04+# 追踪系统调用$ bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'# 追踪函数$ bpftrace -e 'kprobe:do_sys_open { printf("%s\n", str(arg1)); }'# 统计$ bpftrace -e 'tracepoint:syscalls:sys_enter_* { @[probe] = count(); }'# 延迟分布$ bpftrace -e 'kprobe:vfs_read { @start[tid] = nsecs; }               kretprobe:vfs_read /@start[tid]/ { @ns = hist(nsecs - @start[tid]); delete(@start[tid]); }'

5. bcc-tools - eBPF工具集

# 安装$ yum install bcc-tools  # CentOS$ apt install bpfcc-tools  # Ubuntu# 常用工具$ execsnoop-bpfcc      # 追踪进程执行$ opensnoop-bpfcc      # 追踪文件打开$ biosnoop-bpfcc       # 追踪块IO$ tcpconnect-bpfcc     # 追踪TCP连接$ tcpaccept-bpfcc      # 追踪TCP接受$ tcpretrans-bpfcc     # 追踪TCP重传$ runqlat-bpfcc        # CPU运行队列延迟$ profile-bpfcc        # CPU性能分析

6. funccount - 函数调用统计

# 统计函数调用次数$ funccount 'vfs_*'$ funccount 'tcp_*'$ funccount -p 1234 'malloc'

7. funclatency - 函数延迟

# 函数延迟分布$ funclatency vfs_read$ funclatency -p 1234 malloc

8. stackcount - 调用栈统计

# 统计调用栈$ stackcount-bpfcc -p 1234 -U 'malloc'$ stackcount-bpfcc 'ip_output'

9. trace - 动态追踪

# 追踪函数$ trace 'do_sys_open "%s", arg2'$ trace -p 1234 'malloc'

10. argdist - 参数分布

# 参数分布统计$ argdist-bpfcc -H 'r::__kmalloc():int:$retval'$ argdist-bpfcc -C 'p::do_sys_open(char *filename):char*:filename'

11-20. 性能分析其他命令(精简版)

11. sar - 系统活动报告

$ sar -u 1 10          # CPU使用率$ sar -r 1 10          # 内存使用$ sar -b 1 10          # IO统计$ sar -n DEV 1 10      # 网络统计$ sar -q 1 10          # 队列长度和负载

12. vmstat - 虚拟内存统计

$ vmstat 1             # 每秒刷新$ vmstat -s            # 统计信息$ vmstat -d            # 磁盘统计

13. iostat - IO统计

$ iostat -x 1          # 扩展统计$ iostat -d 1          # 只显示设备$ iostat -c 1          # 只显示CPU

14. mpstat - 多处理器统计

$ mpstat -P ALL 1      # 所有CPU$ mpstat -I SUM 1      # 中断统计

15. pidstat - 进程统计

$ pidstat -u 1         # CPU统计$ pidstat -r 1         # 内存统计$ pidstat -d 1         # IO统计$ pidstat -w 1         # 上下文切换

16. dstat - 综合统计

$ dstat -cdnm 1        # CPU、磁盘、网络、内存$ dstat --top-cpu      # CPU占用最高的进程$ dstat --top-io       # IO占用最高的进程

17. atop - 全能监控

$ atop 5               # 每5秒刷新$ atop -w file 60 1440 # 记录24小时$ atop -r file         # 回放历史

18. sysdig - 系统探测

$ sysdig                           # 捕获所有事件$ sysdig proc.name=nginx           # 过滤nginx进程$ sysdig -w capture.scap           # 保存到文件$ sysdig -r capture.scap           # 读取文件$ sysdig -c topprocs_cpu           # CPU占用排序

19. SystemTap - 动态追踪

# 编写stap脚本cat > hello.stp <<EOFprobe begin {    printf("Hello, SystemTap!\n")    exit()}EOF$ stap hello.stp# 追踪系统调用$ stap -e 'probe syscall.open { printf("%s: %s\n", execname(), filename) }'

20. dtrace - 动态追踪(Solaris/BSD)

# Linux上使用dtrace4linux$ dtrace -n 'syscall:::entry { @[execname] = count(); }'$ dtrace -n 'profile-997 { @[ustack()] = count(); }'

二、系统追踪(20个命令)

21. strace - 系统调用追踪

功能:追踪进程的系统调用和信号

语法

strace [选项] 命令strace [选项] -p PID

常用选项

  • • -p PID:追踪已运行的进程
  • • -f:追踪子进程
  • • -e SYSCALL:只追踪指定系统调用
  • • -c:统计系统调用
  • • -t:显示时间戳
  • • -T:显示系统调用耗时
  • • -o FILE:输出到文件
  • • -s SIZE:字符串最大长度

实战案例

# 案例1:追踪命令$ strace lsexecve("/bin/ls", ["ls"], 0x7ffd...) = 0brk(NULL)                               = 0x55a123456000access("/etc/ld.so.preload", R_OK)      = -1 ENOENTopenat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3...# 案例2:追踪进程$ strace -p 1234select(6, [3 4 5], NULL, NULL, {tv_sec=1, tv_usec=0}) = 1read(3, "GET / HTTP/1.1\r\n", 8192) = 16write(3, "HTTP/1.1 200 OK\r\n", 17) = 17...# 案例3:只追踪文件操作$ strace -e open,read,write ls# 案例4:统计系统调用$ strace -c lstime     seconds  usecs/call     calls    errors syscall------ ----------- ----------- --------- --------- ---------------- 45.23    0.000123           5        25           read 23.45    0.000064           4        16           write 12.34    0.000034           3        11           open...# 案例5:追踪网络调用$ strace -e socket,connect,send,recv -p 1234# 案例6:显示时间戳和耗时$ strace -tt -T -p 123410:30:15.123456 read(3, "data", 4096) = 4 <0.000123>10:30:15.234567 write(4, "data", 4) = 4 <0.000045># 案例7:追踪子进程$ strace -f ./parent_process# 案例8:输出到文件$ strace -o trace.log -p 1234# 案例9:追踪特定错误$ strace -e open ls /nonexistent 2>&1 | grep ENOENT# 案例10:追踪信号$ strace -e signal -p 1234

常用系统调用

文件:open, read, write, close, stat, lstat进程:fork, exec, wait, exit, kill网络:socket, connect, accept, send, recv内存:mmap, munmap, brk信号:signal, sigaction, kill

22-30. 系统追踪其他命令(精简版)

22. ltrace - 库函数追踪

$ ltrace ls# 追踪库函数调用$ ltrace -p 1234               # 追踪进程$ ltrace -c ls# 统计$ ltrace -e malloc ls# 只追踪malloc

23. ftrace - 内核函数追踪

# 启用ftracecd /sys/kernel/debug/tracingechofunction > current_tracerecho 1 > tracing_oncat trace# 追踪特定函数echo do_sys_open > set_ftrace_filtercat trace

24. trace-cmd - ftrace前端

$ trace-cmd record -p function_graph -F ls$ trace-cmd report

25. gdb - 程序调试

$ gdb program                  # 调试程序$ gdb program core             # 调试core文件$ gdb -p 1234                  # 附加到进程# 常用命令(gdb) run                      # 运行(gdb) break main               # 设置断点(gdb) continue# 继续(gdb) next                     # 下一行(gdb) step                     # 进入函数(gdb) print var                # 打印变量(gdb) backtrace                # 调用栈(gdb) info threads             # 线程信息

26. crash - 内核崩溃分析

$ crash /usr/lib/debug/vmlinux /var/crash/vmcorecrash> bt                      # 调用栈crash> ps                      # 进程列表crash> log# 内核日志crash> files                   # 打开文件

27. kgdb - 内核调试

# 内核配置CONFIG_KGDB=yCONFIG_KGDB_SERIAL_CONSOLE=y# 启动参数kgdboc=ttyS0,115200 kgdbwait# 使用gdb连接$ gdb vmlinux(gdb) target remote /dev/ttyS0

28. kdump - 内核转储

# 配置kdump$ systemctl enable kdump$ systemctl start kdump# 触发崩溃(测试)echo c > /proc/sysrq-trigger# 分析vmcore$ crash /usr/lib/debug/vmlinux /var/crash/*/vmcore

29. makedumpfile - 转储文件压缩

$ makedumpfile -c -d 31 /proc/vmcore vmcore.compressed

30. valgrind - 内存调试

$ valgrind --leak-check=full ./program$ valgrind --tool=cachegrind ./program$ valgrind --tool=callgrind ./program$ valgrind --tool=massif ./program$ valgrind --tool=helgrind ./program

31-40. 系统追踪高级命令(精简版)

31. ldd - 动态库依赖

$ ldd /bin/ls$ ldd program | grep "not found"

32. nm - 符号表

$ nm program                   # 查看符号表$ nm -D /lib/libc.so.6         # 动态符号$ nm -C program                # C++符号解码

33. objdump - 对象文件分析

$ objdump -d program           # 反汇编$ objdump -h program           # 段信息$ objdump -t program           # 符号表$ objdump -x program           # 所有头信息

34. readelf - ELF文件分析

$ readelf -h program           # ELF头$ readelf -S program           # 段头$ readelf -s program           # 符号表$ readelf -d program           # 动态段

35. strings - 提取字符串

$ strings program$ strings -n 10 program        # 最小长度10$ strings program | grep "error"

36. hexdump - 十六进制查看

$ hexdump -C file$ hexdump -n 100 file          # 只看前100字节

37. xxd - 十六进制编辑

$ xxd file                     # 十六进制查看$ xxd -r hexfile > binfile     # 转换回二进制

38. od - 八进制查看

od file                      # 八进制od -x file                   # 十六进制od -c file                   # 字符

39. file - 文件类型识别

$ file program$ file -i file.txt             # MIME类型$ file -b file.txt             # 简洁输出

40. lsof - 打开文件列表

$ lsof -p 1234                 # 进程打开的文件$ lsof /path/to/file           # 文件被哪些进程打开$ lsof -i :80                  # 端口占用$ lsof -u user                 # 用户打开的文件$ lsof +D /data                # 目录下打开的文件

三、网络分析(20个命令)

41. tcpdump - 抓包分析

功能:网络数据包捕获和分析

语法

tcpdump [选项] [过滤表达式]

常用选项

  • • -i INTERFACE:指定网卡
  • • -n:不解析域名
  • • -nn:不解析域名和端口
  • • -c N:捕获N个包后退出
  • • -w FILE:写入文件
  • • -r FILE:读取文件
  • • -A:以ASCII显示
  • • -X:以十六进制和ASCII显示
  • • -s N:捕获N字节(0=全部)
  • • -v/-vv/-vvv:详细程度

实战案例

# 案例1:捕获所有包$ tcpdump -i eth0# 案例2:捕获特定主机$ tcpdump -i eth0 host 192.168.1.100# 案例3:捕获特定端口$ tcpdump -i eth0 port 80# 案例4:捕获TCP流量$ tcpdump -i eth0 tcp# 案例5:保存到文件$ tcpdump -i eth0 -w capture.pcap# 案例6:读取文件$ tcpdump -r capture.pcap# 案例7:显示详细内容$ tcpdump -i eth0 -A port 80# 案例8:复杂过滤$ tcpdump -i eth0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'# 案例9:捕获SYN包$ tcpdump -i eth0 'tcp[tcpflags] & (tcp-syn) != 0'# 案例10:捕获特定网段$ tcpdump -i eth0 net 192.168.1.0/24

过滤表达式

# 主机host 192.168.1.100src host 192.168.1.100dst host 192.168.1.100# 网络net 192.168.1.0/24# 端口port 80src port 80dst port 80portrange 1-1024# 协议tcp, udp, icmp, ip, ip6# 逻辑运算and (&&), or (||), not (!)# 组合tcp and port 80host 192.168.1.100 and not port 22

42-50. 网络分析其他命令(精简版)

42. tshark - Wireshark命令行版

$ tshark -i eth0                       # 捕获$ tshark -r capture.pcap               # 读取$ tshark -i eth0 -f "port 80"# 过滤$ tshark -i eth0 -w capture.pcap       # 保存$ tshark -r capture.pcap -Y "http"# 显示过滤

43. ngrep - 网络grep

$ ngrep -d eth0 "GET" port 80          # 匹配HTTP GET$ ngrep -d eth0 "error" port 3306      # 匹配MySQL错误$ ngrep -d eth0 -W byline port 80      # 按行显示

44. tcpflow - TCP流重组

$ tcpflow -i eth0 port 80              # 捕获HTTP流$ tcpflow -r capture.pcap              # 从文件读取$ tcpflow -i eth0 -o output/ port 80   # 输出到目录

45. tcpreplay - 流量重放

$ tcpreplay -i eth0 capture.pcap       # 重放流量$ tcpreplay -t -i eth0 capture.pcap    # 快速重放$ tcpreplay -M 10 -i eth0 capture.pcap # 10Mbps速率

46. iperf/iperf3 - 网络性能测试

# 服务器端$ iperf3 -s# 客户端$ iperf3 -c 192.168.1.100              # TCP测试$ iperf3 -c 192.168.1.100 -u -b 100M   # UDP测试$ iperf3 -c 192.168.1.100 -P 10        # 10个并发$ iperf3 -c 192.168.1.100 -R           # 反向测试

47. netperf - 网络性能测试

# 服务器端$ netserver# 客户端$ netperf -H 192.168.1.100             # TCP_STREAM$ netperf -H 192.168.1.100 -t TCP_RR   # TCP请求响应$ netperf -H 192.168.1.100 -t UDP_STREAM  # UDP流

48. ab - Apache性能测试

$ ab -n 1000 -c 10 http://example.com/  # 1000请求,10并发$ ab -t 60 -c 10 http://example.com/    # 60秒测试$ ab -n 1000 -c 10 -H "Authorization: Bearer token" http://api.com/

49. wrk - HTTP性能测试

$ wrk -t 4 -c 100 -d 30s http://example.com/# 4线程,100连接,30秒$ wrk -t 4 -c 100 -d 30s --latency http://example.com/# 显示延迟分布# 使用Lua脚本$ wrk -t 4 -c 100 -d 30s -s post.lua http://api.com/

50. siege - HTTP负载测试

$ siege -c 100 -t 1M http://example.com/  # 100并发,1分钟$ siege -c 100 -r 10 http://example.com/  # 100并发,10次$ siege -f urls.txt -c 50 -t 2M           # 从文件读取URL

51-60. 网络分析高级命令(精简版)

51. hping - 数据包生成

$ hping3 -S -p 80 192.168.1.100        # SYN扫描$ hping3 -1 192.168.1.100              # ICMP ping$ hping3 --flood -S -p 80 192.168.1.100  # SYN flood(测试)

52. nmap - 网络扫描

$ nmap 192.168.1.100                   # 端口扫描$ nmap -sS 192.168.1.100               # SYN扫描$ nmap -sV 192.168.1.100               # 版本检测$ nmap -O 192.168.1.100                # OS检测$ nmap -A 192.168.1.100                # 全面扫描$ nmap -p 1-65535 192.168.1.100        # 全端口扫描$ nmap 192.168.1.0/24                  # 网段扫描

53. masscan - 快速端口扫描

$ masscan -p1-65535 192.168.1.0/24 --rate=10000$ masscan -p80,443 0.0.0.0/0 --rate=100000

54. socat - 多功能网络工具

$ socat TCP-LISTEN:8080,fork TCP:192.168.1.100:80  # 端口转发$ socat - TCP:192.168.1.100:80                     # 连接测试$ socat UDP-LISTEN:514 -                           # UDP监听

55. nc (netcat) - 网络瑞士军刀

$ nc -zv 192.168.1.100 80              # 端口测试$ nc -l 8080                           # 监听端口$ nc 192.168.1.100 8080 < file.txt     # 发送文件$ nc -l 8080 > file.txt                # 接收文件

56. ss - Socket统计(高级用法)

$ ss -s                                # 统计信息$ ss -tan state established            # 已建立的TCP连接$ ss -tan '( dport = :80 or sport = :80 )'# 80端口$ ss -tan dst 192.168.1.100            # 目标IP$ ss -o state established '( dport = :ssh or sport = :ssh )'# SSH连接

57. ip - 网络配置(高级用法)

$ ip -s link show                      # 网卡统计$ ip route get 8.8.8.8                 # 路由查询$ ip neigh show                        # ARP表$ ip netns list                        # 网络命名空间$ ip netns exec ns1 ip addr            # 在命名空间执行

58. ethtool - 网卡工具(高级用法)

$ ethtool -S eth0                      # 统计信息$ ethtool -g eth0                      # ring buffer$ ethtool -k eth0                      # offload特性$ ethtool -c eth0                      # 中断合并$ ethtool -G eth0 rx 4096 tx 4096      # 设置ring buffer$ ethtool -K eth0 tso on gso on gro on # 启用offload

59. tc - 流量控制

# 限速$ tc qdisc add dev eth0 root tbf rate 1mbit burst 32kbit latency 400ms# 延迟$ tc qdisc add dev eth0 root netem delay 100ms# 丢包$ tc qdisc add dev eth0 root netem loss 10%# 删除规则$ tc qdisc del dev eth0 root

60. iptables - 防火墙(高级用法)

# 端口转发$ iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080# 限速$ iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT# 连接追踪$ iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT# 日志$ iptables -A INPUT -j LOG --log-prefix "IPTables-Dropped: "

四、容器相关(20个命令)

61-70. Docker命令(精简版)

61. docker run - 运行容器

$ docker run -d nginx                  # 后台运行$ docker run -it ubuntu bash           # 交互式$ docker run -p 8080:80 nginx          # 端口映射$ docker run -v /data:/data nginx      # 挂载卷$ docker run --name web nginx          # 指定名称$ docker run --rm nginx                # 退出后删除$ docker run -e KEY=value nginx        # 环境变量$ docker run --network=host nginx      # 主机网络

62. docker exec - 执行命令

$ docker exec -it container_id bash    # 进入容器$ docker exec container_id ls /data    # 执行命令$ docker exec -u root container_id bash  # 指定用户

63. docker ps - 容器列表

$ docker ps                            # 运行中的容器$ docker ps -a                         # 所有容器$ docker ps -q                         # 只显示ID$ docker ps --filter "status=exited"# 过滤

64. docker images - 镜像列表

$ docker images                        # 所有镜像$ docker images -q                     # 只显示ID$ docker images --filter "dangling=true"# 悬空镜像

65. docker pull/push - 镜像操作

$ docker pull nginx:latest             # 拉取镜像$ docker push myimage:tag              # 推送镜像$ docker tag image:tag newimage:tag    # 打标签

66. docker build - 构建镜像

$ docker build -t myimage:tag .        # 构建镜像$ docker build -f Dockerfile.prod .    # 指定Dockerfile$ docker build --no-cache .            # 不使用缓存

67. docker network - 网络管理

$ docker network ls# 网络列表$ docker network create mynet          # 创建网络$ docker network connect mynet container  # 连接网络$ docker network inspect mynet         # 查看网络

68. docker volume - 卷管理

$ docker volume ls# 卷列表$ docker volume create myvolume        # 创建卷$ docker volume inspect myvolume       # 查看卷$ docker volume rm myvolume            # 删除卷

69. docker logs - 日志查看

$ docker logs container_id             # 查看日志$ docker logs -f container_id          # 实时跟踪$ docker logs --tail 100 container_id  # 最后100行$ docker logs --since 1h container_id  # 最近1小时

70. docker-compose - 编排工具

$ docker-compose up -d                 # 启动服务$ docker-compose down                  # 停止服务$ docker-compose ps                    # 服务列表$ docker-compose logs -f               # 查看日志$ docker-compose exec service bash     # 进入服务

71-80. Kubernetes命令(精简版)

71. kubectl get - 获取资源

$ kubectl get pods                     # Pod列表$ kubectl get pods -o wide             # 详细信息$ kubectl get pods -n namespace        # 指定命名空间$ kubectl get pods --all-namespaces    # 所有命名空间$ kubectl get pods -l app=nginx        # 标签过滤

72. kubectl describe - 资源详情

$ kubectl describe pod pod-name        # Pod详情$ kubectl describe node node-name      # 节点详情$ kubectl describe svc service-name    # 服务详情

73. kubectl logs - 日志查看

$ kubectl logs pod-name                # 查看日志$ kubectl logs -f pod-name             # 实时跟踪$ kubectl logs pod-name -c container   # 指定容器$ kubectl logs --tail=100 pod-name     # 最后100行$ kubectl logs --since=1h pod-name     # 最近1小时

74. kubectl exec - 执行命令

$ kubectl exec -it pod-name -- bash    # 进入Pod$ kubectl exec pod-name -- ls /data    # 执行命令$ kubectl exec -it pod-name -c container -- bash  # 指定容器

75. kubectl port-forward - 端口转发

$ kubectl port-forward pod-name 8080:80  # 端口转发$ kubectl port-forward svc/service 8080:80  # 服务转发

76. kubectl apply - 应用配置

$ kubectl apply -f deployment.yaml     # 应用配置$ kubectl apply -f .                   # 应用目录$ kubectl apply -k kustomization/      # Kustomize

77. kubectl delete - 删除资源

$ kubectl delete pod pod-name          # 删除Pod$ kubectl delete -f deployment.yaml    # 删除配置$ kubectl delete pods --all            # 删除所有Pod

78. kubectl scale - 扩缩容

$ kubectl scale deployment nginx --replicas=3  # 扩展到3个副本$ kubectl autoscale deployment nginx --min=2 --max=10 --cpu-percent=80  # 自动扩缩容

79. kubectl top - 资源使用

$ kubectl top nodes                    # 节点资源使用$ kubectl top pods                     # Pod资源使用$ kubectl top pods -n namespace        # 指定命名空间

80. kubectl debug - 调试

$ kubectl debug pod-name -it --image=busybox  # 调试Pod$ kubectl debug node/node-name -it --image=ubuntu  # 调试节点

🎯 高级技巧

1. eBPF编程

# bpftrace一行脚本$ bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'# 统计系统调用$ bpftrace -e 'tracepoint:syscalls:sys_enter_* { @[probe] = count(); }'# 延迟分布$ bpftrace -e 'kprobe:vfs_read { @start[tid] = nsecs; }               kretprobe:vfs_read /@start[tid]/ { @ns = hist(nsecs - @start[tid]); delete(@start[tid]); }'# CPU采样$ bpftrace -e 'profile:hz:99 { @[kstack] = count(); }'

2. 性能分析流程

# 1. 快速检查uptime && vmstat 1 5 && iostat -x 1 5# 2. CPU分析$ perf top$ perf record -g -a -- sleep 60$ perf report# 3. 内存分析$ free -h$ vmstat 1$ slabtop# 4. IO分析$ iostat -x 1$ iotop -o$ biosnoop-bpfcc# 5. 网络分析$ ss -s$ iftop -i eth0$ tcpdump -i eth0 -w capture.pcap

3. 火焰图生成

# CPU火焰图$ perf record -F 99 -a -g -- sleep 60$ perf script | ./stackcollapse-perf.pl | ./flamegraph.pl > cpu.svg# Off-CPU火焰图$ ./offcputime-bpfcc -df -p $(pgrep -nx mysqld) 60 > out.stacks$ ./flamegraph.pl --color=io --title="Off-CPU Time" --countname=us < out.stacks > offcpu.svg# 内存火焰图$ ./memleak-bpfcc -p $(pgrep -nx java) -a -f 60 > out.stacks$ ./flamegraph.pl --title="Memory Leak" --colors=mem < out.stacks > mem.svg

4. 容器性能分析

# 容器资源使用$ docker stats# 容器进程$ docker top container_id# 容器网络$ docker exec container_id netstat -ant# 容器文件系统$ docker exec container_id df -h# 进入容器调试$ docker exec -it container_id bash$ nsenter -t $(docker inspect -f '{{.State.Pid}}' container_id) -n -m -u -i -p

5. Kubernetes性能分析

# 节点资源$ kubectl top nodes# Pod资源$ kubectl top pods --all-namespaces# 事件查看$ kubectl get events --sort-by='.lastTimestamp'# 日志分析$ kubectl logs -f pod-name | grep -i error# 进入Pod调试$ kubectl exec -it pod-name -- bash$ kubectl debug pod-name -it --image=nicolaka/netshoot

📚 实战案例

案例1:CPU性能问题排查

# 1. 发现问题uptimeload average: 16.5, 15.2, 14.8  # 8核CPU,负载过高# 2. 找出占用CPU的进程$ top# 或$ ps aux --sort=-%cpu | head -10# 3. 分析热点函数$ perf top -p 1234# 发现_raw_spin_lock占用45%# 4. 记录性能数据$ perf record -g -p 1234 -- sleep 60# 5. 分析报告$ perf report# 展开调用栈,找到具体函数# 6. 生成火焰图$ perf script | ./stackcollapse-perf.pl | ./flamegraph.pl > flame.svg# 7. 追踪系统调用$ strace -c -p 1234# 发现futex调用过多,可能是锁竞争# 8. 使用eBPF深入分析$ funclatency-bpfcc -p 1234 'pthread_mutex_lock'# 分析锁延迟分布

案例2:内存泄漏排查

# 1. 发现内存持续增长$ free -h$ watch -n 1 'free -h'# 2. 找出占用内存的进程$ ps aux --sort=-%mem | head -10# 3. 查看进程内存映射$ pmap -x 1234cat /proc/1234/smaps# 4. 使用valgrind检测(开发环境)$ valgrind --leak-check=full --show-leak-kinds=all ./program# 5. 使用eBPF追踪(生产环境)$ memleak-bpfcc -p 1234 -a# 显示内存分配调用栈# 6. 分析堆内存$ gdb -p 1234(gdb) info proc mappings(gdb) dump memory heap.dump 0x... 0x...# 7. 生成内存火焰图$ ./memleak-bpfcc -p 1234 -a -f 60 > out.stacks$ ./flamegraph.pl --title="Memory Leak" --colors=mem < out.stacks > mem.svg

案例3:网络性能问题排查

# 1. 测试网络连通性$ ping -c 100 目标IP# 发现丢包率5%# 2. 追踪路由$ mtr -r -c 100 目标IP# 发现某一跳丢包严重# 3. 抓包分析$ tcpdump -i eth0 -w capture.pcap host 目标IP$ tshark -r capture.pcap -Y "tcp.analysis.retransmission"# 发现大量重传# 4. 查看网络统计$ netstat -s | grep retrans$ ss -s# 5. 使用eBPF追踪$ tcpretrans-bpfcc# 实时显示TCP重传# 6. 分析网卡统计$ ethtool -S eth0 | grep error# 发现硬件错误# 7. 测试带宽$ iperf3 -c 目标IP# 带宽正常,排除带宽问题# 8. 检查防火墙和路由$ iptables -L -n -v$ ip route show

案例4:容器性能问题排查

# 1. 查看容器资源使用$ docker stats container_id# 发现CPU 100%# 2. 查看容器进程$ docker top container_id# 找到占用CPU的进程# 3. 进入容器调试$ docker exec -it container_id bash$ top$ ps aux# 4. 查看容器日志$ docker logs --tail 1000 container_id | grep -i error# 5. 使用perf分析容器进程$ docker inspect -f '{{.State.Pid}}' container_id$ perf top -p <pid># 6. 网络分析$ docker exec container_id netstat -ant$ nsenter -t <pid> -n tcpdump -i eth0# 7. 文件系统分析$ docker exec container_id df -h$ docker exec container_id du -sh /*# 8. 检查资源限制$ docker inspect container_id | grep -A 10 "HostConfig"

🎉 总结

这80个高级命令覆盖了Linux高级技术的核心领域:

✅ 性能分析(20个)- perf, eBPF, 火焰图✅ 系统追踪(20个)- strace, gdb, valgrind✅ 网络分析(20个)- tcpdump, iperf, nmap✅ 容器相关(20个)- Docker, Kubernetes

学习路径

  1. 1. 掌握perf基础(top, record, report)
  2. 2. 学习eBPF工具(bcc-tools, bpftrace)
  3. 3. 深入系统追踪(strace, ltrace, gdb)
  4. 4. 精通网络分析(tcpdump, wireshark)
  5. 5. 容器技术(Docker, Kubernetes)

觉得有用?点个赞👍,转发给更多需要的人!

#Linux #高级命令 #性能优化 #技术进阶

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 11:03:26 HTTP/2.0 GET : https://f.mffb.com.cn/a/488000.html
  2. 运行时间 : 0.128181s [ 吞吐率:7.80req/s ] 内存消耗:4,767.95kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=ed4b4a3c598d803bb611b5fab30c815a
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000753s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001043s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000361s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000316s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000736s ]
  6. SELECT * FROM `set` [ RunTime:0.000249s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000745s ]
  8. SELECT * FROM `article` WHERE `id` = 488000 LIMIT 1 [ RunTime:0.003937s ]
  9. UPDATE `article` SET `lasttime` = 1783134206 WHERE `id` = 488000 [ RunTime:0.008222s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000404s ]
  11. SELECT * FROM `article` WHERE `id` < 488000 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000841s ]
  12. SELECT * FROM `article` WHERE `id` > 488000 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000659s ]
  13. SELECT * FROM `article` WHERE `id` < 488000 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.004504s ]
  14. SELECT * FROM `article` WHERE `id` < 488000 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.016668s ]
  15. SELECT * FROM `article` WHERE `id` < 488000 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.014677s ]
0.129748s