当前位置:首页>Linux>深入理解Linux进程管理:systemd vs传统init系统对比

深入理解Linux进程管理:systemd vs传统init系统对比

  • 2026-07-01 01:25:32
深入理解Linux进程管理:systemd vs传统init系统对比

深入理解Linux进程管理:systemd vs传统init系统对比

本文基于2026年最新systemd 256版本,深入剖析现代Linux进程管理机制与传统SysVinit的核心差异,为运维工程师提供从理论到实践的完整指南。


一、概述

1.1 背景介绍

Linux系统的进程管理经历了从SysVinit到Upstart再到systemd的演进历程。SysVinit作为Unix System V的遗产,自1983年起服务Linux社区近30年,其串行启动机制和shell脚本管理方式在现代多核服务器环境下逐渐显露疲态。

2010年,Lennart Poettering和Kay Sievers发起systemd项目,旨在解决传统init系统的根本性缺陷。经过十余年发展,systemd已成为RHEL、Debian、Ubuntu、Arch Linux等主流发行版的标准init系统。截至2026年,systemd 256版本引入了更强大的资源控制能力、改进的容器支持以及增强的安全特性。

理解systemd与传统init系统的差异,对于现代Linux运维工程师而言是必备技能。无论是系统启动优化、服务依赖管理,还是故障排查与性能调优,都需要深入掌握这两种进程管理机制的工作原理。

1.2 技术特点

特性维度
SysVinit
systemd
启动方式
串行执行,按运行级别顺序启动
并行启动,基于依赖关系动态调度
配置格式
Shell脚本(/etc/init.d/)
声明式Unit文件(INI格式)
依赖管理
数字前缀隐式排序
显式声明After/Before/Requires/Wants
进程追踪
PID文件,易丢失
cgroups精确追踪所有子进程
日志系统
分散的文本日志
journald二进制结构化日志
资源控制
无原生支持
完整cgroups v2集成
Socket激活
需借助xinetd
原生支持按需启动
启动速度
通常60-120秒
通常10-30秒

systemd核心优势:

  • 并行化启动:通过依赖关系图实现最大化并行,显著缩短启动时间
  • 按需激活:Socket/D-Bus/Path/Timer多种激活机制,资源利用更高效
  • 统一管理接口:systemctl提供服务、挂载点、设备、定时器的一致性操作
  • 精确进程控制:基于cgroups的进程隔离与资源限制
  • 事务性操作:服务启停具备原子性,失败自动回滚
  • 丰富的安全特性:命名空间隔离、能力限制、系统调用过滤

1.3 适用场景

systemd最佳应用场景:

  • 云原生服务器:需要快速启动、弹性伸缩的云主机环境
  • 容器宿主机:与Docker/Podman深度集成,管理容器化服务
  • 微服务架构:大量服务的依赖管理与健康检查
  • 高可用集群:服务自动重启、故障自愈能力
  • 安全敏感环境:需要进程隔离与权限最小化

SysVinit仍有价值的场景:

  • 嵌入式系统:资源受限设备,systemd开销过大
  • 遗留系统维护:老旧发行版的兼容性需求
  • 极简主义环境:追求系统简洁性的特殊用途服务器
  • 调试学习目的:理解Unix进程管理基础原理

1.4 环境要求

组件
版本要求
说明
Linux内核
4.15+(推荐5.15 LTS或6.x)
cgroups v2需要4.15+,完整特性需5.x+
systemd
250+(当前稳定版256)
本文示例基于256版本
glibc
2.28+
systemd编译依赖
发行版
RHEL 8+/Debian 11+/Ubuntu 20.04+
主流发行版默认集成
内存
最低512MB,推荐2GB+
systemd本身占用约50-100MB
存储
/var/log预留2GB+
journald日志存储空间

二、详细步骤

2.1 准备工作

2.1.1 系统环境检查

确认当前系统的init系统类型与版本信息:

# 检查init系统类型
ps -p 1 -o comm=
# 输出 systemd 表示使用systemd,输出 init 可能是SysVinit

# 查看systemd版本
systemctl --version
# systemd 256 (256.2-1)
# +PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT...

# 检查cgroups版本
cat /sys/fs/cgroup/cgroup.controllers
# cpuset cpu io memory hugetlb pids rdma misc
# 有输出表示cgroups v2已启用

# 确认内核版本
uname -r
# 6.5.0-44-generic

2.1.2 SysVinit环境准备(对比测试用)

在需要对比测试的环境中,可通过容器模拟传统init系统:

# 使用Docker运行SysVinit环境(Devuan发行版保留SysVinit)
docker run -d --name sysvinit-test \
    --privileged \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    dyne/devuan:chimaera /sbin/init

# 进入容器验证
docker exec -it sysvinit-test /bin/bash
ps -p 1 -o comm=
# init

2.1.3 工具安装

# RHEL/CentOS系统
sudo dnf install -y systemd-analyze systemd-container procps-ng

# Debian/Ubuntu系统
sudo apt install -y systemd-analyze systemd-container procps

# 安装性能分析工具
sudo apt install -y bootchart2 python3-systemd

2.2 核心概念对比

2.2.1 运行级别 vs Target

SysVinit运行级别(Runlevel):

传统init系统使用0-6的数字表示系统运行状态:

# 查看当前运行级别
runlevel
# N 3

# 运行级别定义
# 0 - 关机
# 1 - 单用户模式(维护)
# 2 - 多用户模式(无网络,Debian特有)
# 3 - 多用户模式(命令行)
# 4 - 未定义(用户自定义)
# 5 - 图形界面模式
# 6 - 重启

# 切换运行级别
sudo init 3
sudo telinit 5

systemd Target单元:

systemd使用target替代运行级别,提供更灵活的状态定义:

# 查看当前target
systemctl get-default
# multi-user.target

# 列出所有target
systemctl list-units --type=target

# target与运行级别对应关系
# runlevel0.target -> poweroff.target
# runlevel1.target -> rescue.target
# runlevel2.target -> multi-user.target
# runlevel3.target -> multi-user.target
# runlevel4.target -> multi-user.target
# runlevel5.target -> graphical.target
# runlevel6.target -> reboot.target

# 切换target
sudo systemctl isolate multi-user.target
sudo systemctl isolate graphical.target

# 设置默认target
sudo systemctl set-default multi-user.target

Target依赖关系可视化:

# 查看target依赖树
systemctl list-dependencies graphical.target

# 输出示例:
# graphical.target
# ├─display-manager.service
# ├─multi-user.target
# │ ├─dbus.service
# │ ├─NetworkManager.service
# │ ├─sshd.service
# │ └─...
# └─...

2.2.2 启动脚本 vs Unit文件

SysVinit启动脚本结构:

#!/bin/bash
# /etc/init.d/myservice
# chkconfig: 2345 90 10
# description: My Custom Service

### BEGIN INIT INFO
# Provides:          myservice
# Required-Start:    $network $syslog
# Required-Stop:     $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: My Service
# Description:       This is my custom service
### END INIT INFO

DAEMON=/usr/local/bin/myservice
PIDFILE=/var/run/myservice.pid
NAME=myservice

case"$1"in
    start)
echo"Starting $NAME..."
if [ -f $PIDFILE ]; then
echo"$NAME is already running."
exit 1
fi
$DAEMON &
echo $! > $PIDFILE
        ;;
    stop)
echo"Stopping $NAME..."
if [ -f $PIDFILE ]; then
kill $(cat $PIDFILE)
            rm -f $PIDFILE
else
echo"$NAME is not running."
fi
        ;;
    restart)
$0 stop
        sleep 2
$0 start
        ;;
    status)
if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE) 2>/dev/null; then
echo"$NAME is running (PID: $(cat $PIDFILE))"
else
echo"$NAME is not running"
exit 1
fi
        ;;
    *)
echo"Usage: $0 {start|stop|restart|status}"
exit 1
        ;;
esac
exit 0

systemd Unit文件结构:

# /etc/systemd/system/myservice.service
[Unit]
Description=My Custom Service
Documentation=https://example.com/docs
After=network.target syslog.target
Wants=network-online.target
Before=multi-user.target

[Service]
Type=simple
ExecStart=/usr/local/bin/myservice
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
Restart=on-failure
RestartSec=5
TimeoutStartSec=30
TimeoutStopSec=30

# 安全加固
User=myservice
Group=myservice
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes

[Install]
WantedBy=multi-user.target

对比分析:

维度
SysVinit脚本
systemd Unit
代码量
50-200行Shell
20-50行声明式配置
可读性
需理解Shell逻辑
直观的键值对
错误处理
手动编写
框架自动处理
依赖声明
LSB注释块
显式After/Requires
进程追踪
PID文件
cgroups自动追踪
重启策略
手动实现
Restart=配置

2.2.3 进程追踪机制对比

SysVinit的PID文件困境:

# 传统PID文件管理存在的问题
cat /var/run/nginx.pid
# 1234

# 问题1:PID重用导致误判
# 进程1234已死亡,但PID被新进程复用
ps -p 1234 -o comm=
# python3  (不是nginx!)

# 问题2:fork后PID文件未更新
# 守护进程double-fork后,PID文件记录的是中间进程

# 问题3:异常退出PID文件残留
ls -la /var/run/*.pid
# 存在大量僵尸PID文件

systemd的cgroups追踪:

# 查看服务的cgroup层级
systemctl status nginx.service
# CGroup: /system.slice/nginx.service
#         ├─1234 nginx: master process
#         ├─1235 nginx: worker process
#         └─1236 nginx: worker process

# 精确列出服务所有进程
systemd-cgls -u nginx.service

# 查看cgroup资源使用
systemctl show nginx.service -p MemoryCurrent -p CPUUsageNSec
# MemoryCurrent=52428800
# CPUUsageNSec=1234567890

# cgroups v2路径
ls /sys/fs/cgroup/system.slice/nginx.service/
# cgroup.controllers  cgroup.events  memory.current  pids.current

2.3 启动流程深度对比

2.3.1 SysVinit串行启动流程

# SysVinit启动顺序(/etc/rc3.d/目录)
ls -la /etc/rc3.d/
# S01networking
# S02dbus
# S03rsyslog
# S10ssh
# S20nginx
# S90myapp

# 启动顺序由S后的数字决定,严格串行执行
# 总启动时间 = Σ(每个服务启动时间)

启动时间分析:

# 模拟SysVinit启动耗时(假设环境)
# networking: 5s
# dbus: 2s
# rsyslog: 3s
# ssh: 4s
# nginx: 3s
# myapp: 5s
# 总计: 22s(串行)

2.3.2 systemd并行启动流程

# 分析systemd启动时间
systemd-analyze
# Startup finished in 2.5s (kernel) + 4.8s (initrd) + 12.3s (userspace) = 19.6s

# 查看启动时间详情
systemd-analyze blame
# 5.234s NetworkManager-wait-online.service
# 2.123s docker.service
# 1.456s nginx.service
# 0.892s ssh.service
# ...

# 生成启动时序SVG图
systemd-analyze plot > /tmp/boot-timeline.svg

关键路径分析:

# 查看启动关键路径
systemd-analyze critical-chain
# graphical.target @12.3s
# └─multi-user.target @12.3s
#   └─nginx.service @10.8s +1.5s
#     └─network-online.target @10.7s
#       └─NetworkManager-wait-online.service @5.4s +5.3s
#         └─NetworkManager.service @5.2s +0.2s
#           └─dbus.service @5.0s +0.1s

2.3.3 依赖关系管理

systemd依赖类型详解:

依赖类型
作用
示例
Requires=
强依赖,依赖失败则本服务失败
Requires=postgresql.service
Wants=
弱依赖,依赖失败不影响本服务
Wants=redis.service
After=
启动顺序,在指定服务后启动
After=network.target
Before=
启动顺序,在指定服务前启动
Before=multi-user.target
BindsTo=
绑定依赖,依赖停止则本服务停止
BindsTo=docker.service
PartOf=
部分依赖,随依赖一起重启/停止
PartOf=nginx.service
Conflicts=
冲突关系,不能同时运行
Conflicts=sendmail.service
# 查看服务依赖关系
systemctl list-dependencies nginx.service

# 反向查看被谁依赖
systemctl list-dependencies --reverse nginx.service

# 验证Unit文件语法
systemd-analyze verify /etc/systemd/system/myservice.service

三、示例代码和配置

3.1 完整配置示例

3.1.1 生产级Web服务Unit文件

# /etc/systemd/system/webapp.service
[Unit]
Description=Production Web Application Server
Documentation=https://docs.example.com/webapp
After=network-online.target postgresql.service redis.service
Wants=network-online.target
Requires=postgresql.service
BindsTo=redis.service

# 条件检查
ConditionPathExists=/opt/webapp/bin/server
ConditionPathIsDirectory=/opt/webapp/data

[Service]
Type=notify
User=webapp
Group=webapp
WorkingDirectory=/opt/webapp

# 环境配置
Environment=NODE_ENV=production
Environment=PORT=8080
EnvironmentFile=-/opt/webapp/.env

# 启动命令
ExecStartPre=/opt/webapp/bin/pre-start.sh
ExecStart=/opt/webapp/bin/server --config /opt/webapp/config.yaml
ExecStartPost=/opt/webapp/bin/post-start.sh
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/opt/webapp/bin/graceful-stop.sh

# 重启策略
Restart=on-failure
RestartSec=10
StartLimitIntervalSec=300
StartLimitBurst=5

# 超时设置
TimeoutStartSec=60
TimeoutStopSec=30
WatchdogSec=30

# 资源限制
MemoryMax=2G
MemoryHigh=1.5G
CPUQuota=200%
TasksMax=512
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

3.1.2 安全加固配置模板

# /etc/systemd/system/secure-app.service
[Unit]
Description=Security Hardened Application
After=network.target

[Service]
Type=simple
ExecStart=/opt/secure-app/bin/app
User=secapp
Group=secapp

# 文件系统保护
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
ReadWritePaths=/var/lib/secure-app
ReadOnlyPaths=/etc/secure-app

# 网络隔离
PrivateNetwork=no
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX

# 权限限制
NoNewPrivileges=yes
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE

# 系统调用过滤
SystemCallFilter=@system-service
SystemCallArchitectures=native

# 命名空间隔离
PrivateDevices=yes
PrivateUsers=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes

[Install]
WantedBy=multi-user.target

3.1.3 Socket激活配置

# /etc/systemd/system/myapp.socket
[Unit]
Description=MyApp Socket Activation

[Socket]
ListenStream=8080
Accept=no
ReusePort=yes

[Install]
WantedBy=sockets.target
# /etc/systemd/system/myapp.service
[Unit]
Description=MyApp Service
Requires=myapp.socket

[Service]
Type=simple
ExecStart=/opt/myapp/bin/server
StandardInput=socket

[Install]
WantedBy=multi-user.target

3.2 实际应用案例

案例一:微服务架构服务管理

场景描述:电商平台包含订单服务、库存服务、支付服务,需要统一管理启动顺序和依赖关系。

实现方案

# /etc/systemd/system/ecommerce.target
[Unit]
Description=E-Commerce Platform Services
Requires=order.service inventory.service payment.service
After=network-online.target postgresql.service

[Install]
WantedBy=multi-user.target
# 启动整个平台
sudo systemctl start ecommerce.target

# 查看平台状态
sudo systemctl status ecommerce.target

案例二:定时任务从cron迁移到systemd Timer

场景描述:将传统crontab定时备份任务迁移到systemd timer,获得更好的日志和依赖管理。

原cron配置

# /etc/crontab
0 2 * * * root /opt/backup/daily-backup.sh

systemd Timer实现

# /etc/systemd/system/daily-backup.timer
[Unit]
Description=Daily Backup Timer

[Timer]
OnCalendar=*-*-* 02:00:00
Persistent=true
RandomizedDelaySec=300

[Install]
WantedBy=timers.target
# /etc/systemd/system/daily-backup.service
[Unit]
Description=Daily Backup Service
After=network-online.target

[Service]
Type=oneshot
ExecStart=/opt/backup/daily-backup.sh
User=backup
Group=backup
# 启用定时器
sudo systemctl enable --now daily-backup.timer

# 查看定时器状态
systemctl list-timers --all

四、最佳实践和注意事项

4.1 最佳实践

4.1.1 性能优化

启动时间优化策略

# 识别启动瓶颈
systemd-analyze blame | head -20

# 禁用不必要的服务
sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl mask plymouth-quit-wait.service

# 使用socket激活延迟启动
sudo systemctl enable myapp.socket
sudo systemctl disable myapp.service

资源限制配置

# 内存限制
MemoryMax=2G
MemoryHigh=1.5G

# CPU限制
CPUQuota=150%
CPUWeight=100

# IO限制
IOWeight=100
IOReadBandwidthMax=/dev/sda 100M

4.1.2 安全加固

安全配置检查工具

# 分析服务安全评分
systemd-analyze security nginx.service
# nginx.service: 6.5 MEDIUM

# 查看详细安全建议
systemd-analyze security nginx.service --no-pager

安全加固清单

配置项
作用
推荐值
NoNewPrivileges
禁止提权
yes
ProtectSystem
保护系统目录
strict
ProtectHome
保护用户目录
yes
PrivateTmp
独立临时目录
yes
PrivateDevices
限制设备访问
yes

4.1.3 高可用配置

# 自动重启配置
Restart=on-failure
RestartSec=10
StartLimitIntervalSec=300
StartLimitBurst=5

# 看门狗配置
WatchdogSec=30

4.2 注意事项

4.2.1 配置注意事项

⚠️ 警告:修改systemd配置后必须执行daemon-reload

  • ❗ 修改Unit文件后执行:sudo systemctl daemon-reload
  • ❗ 避免直接编辑/usr/lib/systemd/目录下的文件
  • ❗ 使用drop-in目录覆盖配置:/etc/systemd/system/xxx.service.d/

4.2.2 常见错误

错误现象
原因分析
解决方案
服务启动超时
ExecStart阻塞或Type配置错误
检查Type类型,使用forking或notify
依赖循环
After/Requires形成环路
使用systemd-analyze verify检查
权限拒绝
SELinux或文件权限问题
检查audit日志,调整权限

五、故障排查和监控

5.1 故障排查

5.1.1 日志查看

# 查看服务日志
sudo journalctl -u nginx.service -f

# 查看启动失败原因
sudo journalctl -u nginx.service -b --no-pager

# 按时间范围查询
sudo journalctl -u nginx.service --since "2026-01-01" --until "2026-01-02"

5.1.2 常见问题排查

问题一:服务启动失败

# 诊断命令
systemctl status nginx.service
journalctl -xe -u nginx.service

解决方案

  1. 检查ExecStart路径是否正确
  2. 验证配置文件语法
  3. 确认用户权限

问题二:服务频繁重启

# 查看重启次数
systemctl show nginx.service -p NRestarts

解决方案:调整StartLimitBurst和RestartSec参数

5.2 性能监控

5.2.1 关键指标监控

# 查看服务资源使用
systemctl show nginx.service -p MemoryCurrent -p CPUUsageNSec

# 查看cgroup统计
cat /sys/fs/cgroup/system.slice/nginx.service/memory.current

5.2.2 监控指标说明

指标名称
正常范围
告警阈值
说明
MemoryCurrent
<80%限制
>90%限制
当前内存使用
CPUUsageNSec
视业务而定
持续高位
CPU累计使用时间
NRestarts
0
>3次/小时
服务重启次数

六、总结

6.1 技术要点回顾

  • ✅ 架构差异:systemd采用并行启动和依赖图,SysVinit采用串行脚本执行
  • ✅ 配置方式:Unit文件声明式配置优于Shell脚本命令式编程
  • ✅ 进程追踪:cgroups精确追踪替代易失的PID文件机制
  • ✅ 安全特性:systemd提供命名空间隔离、能力限制等原生安全加固

6.2 进阶学习方向

  1. 容器集成:systemd-nspawn与Podman集成
  2. 集群管理:结合Kubernetes理解容器编排

6.3 参考资料

  • systemd官方文档 - 权威技术参考
  • Freedesktop规范 - 标准定义

附录

A. 命令速查表

# 服务管理
systemctl start/stop/restart/status <service>
systemctl enable/disable <service>
systemctl daemon-reload

# 日志查看
journalctl -u <service> -f
journalctl -b --no-pager

# 分析工具
systemd-analyze blame
systemd-analyze critical-chain
systemd-analyze security <service>

B. Unit文件配置参数详解

参数
所属段
说明
Type
[Service]
服务类型:simple/forking/oneshot/notify
Restart
[Service]
重启策略:no/on-success/on-failure/always
After
[Unit]
启动顺序依赖
Requires
[Unit]
强依赖关系

C. 术语表

术语
英文
解释
Unit
Unit
systemd管理的基本单元
Target
Target
服务组,替代运行级别
cgroups
Control Groups
Linux内核进程资源控制机制
journald
Journal Daemon
systemd日志服务

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 02:43:40 HTTP/2.0 GET : https://f.mffb.com.cn/a/490451.html
  2. 运行时间 : 0.140244s [ 吞吐率:7.13req/s ] 内存消耗:4,679.70kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=a70183dba7e48fb689a65d43c976ec03
  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.000630s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000801s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000318s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000264s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000479s ]
  6. SELECT * FROM `set` [ RunTime:0.000199s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000511s ]
  8. SELECT * FROM `article` WHERE `id` = 490451 LIMIT 1 [ RunTime:0.000471s ]
  9. UPDATE `article` SET `lasttime` = 1783104220 WHERE `id` = 490451 [ RunTime:0.019856s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000592s ]
  11. SELECT * FROM `article` WHERE `id` < 490451 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.002100s ]
  12. SELECT * FROM `article` WHERE `id` > 490451 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001786s ]
  13. SELECT * FROM `article` WHERE `id` < 490451 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.018429s ]
  14. SELECT * FROM `article` WHERE `id` < 490451 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005622s ]
  15. SELECT * FROM `article` WHERE `id` < 490451 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003705s ]
0.142673s