当前位置:首页>Linux>Linux系统Python一键巡检报告

Linux系统Python一键巡检报告

  • 2026-04-20 13:11:34
Linux系统Python一键巡检报告
Linux 服务器日常巡检标准项目清单,运维常用、全覆盖,直接照着检查就行。
一、基础信息巡检
  1. 服务器主机名、IP 地址
  2. 操作系统版本、内核版本
  3. 服务器运行时间(uptime)
  4. 当前登录用户、异常登录记录
  5. 硬件信息(CPU、内存、磁盘、网卡型号)
二、系统负载与性能
  1. CPU 使用率、负载平均值(1/5/15 分钟)
  2. 内存使用率、Swap 使用情况
  3. 磁盘 I/O 读写性能、iowait
  4. 网络流量、网卡丢包/错包
  5. 进程数量、僵尸进程
  6. 系统中断、上下文切换
三、磁盘与文件系统
  1. 各分区使用率(重点 /、/var、/home、/boot)
  2. inode 使用率
  3. 磁盘是否只读、文件系统错误
  4. 挂载点是否正常、是否有异常挂载
  5. 磁盘健康状态(smartctl)
四、网络巡检
  1. 网卡状态、链路是否 UP
  2. 网络配置(IP、网关、DNS)
  3. 网络连通性(ping 网关、外网)
  4. 端口监听情况(ss/netstat)
  5. 防火墙规则(iptables/firewalld)
  6. 连接数、TIME_WAIT、ESTABLISHED 数量
  7. 主机名解析是否正常
五、服务与进程
  1. 关键服务状态(ssh、crond、rsyslog、ntp、数据库、Web 服务等)
  2. 服务是否开机自启
  3. 进程 CPU/内存占用 TOP10
  4. 是否有异常进程、挖矿程序、不明脚本
  5. 定时任务 crontab 检查
六、日志巡检
  1. /var/log/messages 或 syslog
  2. dmesg 硬件/内核报错
  3. 安全日志 /var/log/secure
  4. 应用服务日志(Nginx、Tomcat、MySQL 等)
  5. 检查关键字:error、fail、warning、panic、oops
七、安全与账号
  1. root 登录是否限制
  2. 空口令、弱口令账号
  3. 异常 sudo 权限
  4. 历史命令、异常登录 IP
  5. 是否开启 SELinux
  6. 系统是否被入侵迹象(可疑文件、异常外连)
八、备份与一致性
  1. 备份任务是否执行
  2. 备份文件是否存在、大小是否正常
  3. 关键配置文件是否变更(对比 md5)
九、时间同步
  1. 系统时间是否正确
  2. NTP 服务是否正常
  3. 时间偏差是否过大
十、Linux脚本内容
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Linux 系统一键巡检脚本
支持所有主流Linux发行版
"""


import os
import sys
import platform
import socket
import datetime
import subprocess
import json
import re
from typing import Dict, List, Any, Optional


defcheck_os() -> bool:
"""检查是否为Linux系统"""
return os.name == 'posix'and platform.system() == 'Linux'


defrun_command(cmd: str, capture_output: bool = True, shell: bool = True) -> Dict[str, Any]:
"""执行系统命令"""
try:
        result = subprocess.run(
            cmd,
            capture_output=capture_output,
            text=True,
            shell=shell,
            timeout=30
        )
return {
'success': result.returncode == 0,
'returncode': result.returncode,
'stdout': result.stdout,
'stderr': result.stderr
        }
except Exception as e:
return {
'success'False,
'error': str(e)
        }


defget_uptime() -> Dict[str, Any]:
"""获取系统运行时间"""
    info = {}

try:
        result = run_command('uptime')
if result['success']:
            info['uptime_output'] = result['stdout'].strip()

        result = run_command('cat /proc/uptime')
if result['success']:
            uptime_seconds = float(result['stdout'].split()[0])
            info['uptime_seconds'] = uptime_seconds
            info['uptime_days'] = int(uptime_seconds // (24 * 3600))
            info['uptime_hours'] = int((uptime_seconds % (24 * 3600)) // 3600)
            info['uptime_minutes'] = int((uptime_seconds % 3600) // 60)
except Exception as e:
        info['error'] = str(e)

return info


defget_system_info() -> Dict[str, Any]:
"""获取系统基本信息"""
    info = {}

    info['os_name'] = platform.system()
    info['os_version'] = platform.version()
    info['os_release'] = platform.release()
    info['hostname'] = socket.gethostname()

try:
# 获取IP地址
        result = run_command('ip -o -4 addr show | awk "{print $2, $4}"')
if result['success']:
            info['ip_addresses'] = result['stdout'].strip().split('\n')

# 获取操作系统详细信息
if os.path.exists('/etc/os-release'):
with open('/etc/os-release''r'as f:
for line in f:
if'='in line:
                        key, value = line.strip().split('='1)
                        info[key.lower()] = value.strip('"')

# 获取内核版本
        result = run_command('uname -r')
if result['success']:
            info['kernel_version'] = result['stdout'].strip()

# 获取当前登录用户
        result = run_command('who')
if result['success']:
            info['current_users'] = result['stdout'].strip()

# 获取硬件信息
        hardware = {}

# CPU信息
        result = run_command('lscpu')
if result['success']:
            hardware['cpu_info'] = result['stdout'].strip()

# 内存信息
        result = run_command('free -h')
if result['success']:
            hardware['memory_info'] = result['stdout'].strip()

# 磁盘信息
        result = run_command('lsblk -f')
if result['success']:
            hardware['disk_info'] = result['stdout'].strip()

# 网卡信息
        result = run_command('lspci | grep -i network')
if result['success']:
            hardware['network_cards'] = result['stdout'].strip()

        info['hardware'] = hardware

except Exception as e:
        info['error'] = str(e)

return info


defget_system_performance() -> Dict[str, Any]:
"""获取系统负载与性能"""
    info = {}

try:
# CPU使用率
        result = run_command('top -bn1 | grep "%Cpu(s)"')
if result['success']:
            info['cpu_usage'] = result['stdout'].strip()

# 负载平均值
        result = run_command('uptime')
if result['success']:
            load_match = re.search(r'load average:\s*(\d+\.\d+),\s*(\d+\.\d+),\s*(\d+\.\d+)', result['stdout'])
if load_match:
                info['load_average'] = {
'1min': load_match.group(1),
'5min': load_match.group(2),
'15min': load_match.group(3)
                }

# 内存使用情况
        result = run_command('free -h')
if result['success']:
            info['memory_usage'] = result['stdout'].strip()

# 磁盘I/O
        result = run_command('iostat -x')
if result['success']:
            info['disk_io'] = result['stdout'].strip()

# 网络流量
        result = run_command('ifstat 1 1')
if result['success']:
            info['network_traffic'] = result['stdout'].strip()

# 进程数量
        result = run_command('ps aux | wc -l')
if result['success']:
            info['process_count'] = int(result['stdout'].strip())

# 僵尸进程
        result = run_command('ps aux | grep Z | grep -v grep | wc -l')
if result['success']:
            info['zombie_processes'] = int(result['stdout'].strip())

# 系统中断和上下文切换
        result = run_command('vmstat 1 1')
if result['success']:
            info['system_stats'] = result['stdout'].strip()

except Exception as e:
        info['error'] = str(e)

return info


defget_disk_filesystem() -> Dict[str, Any]:
"""获取磁盘与文件系统信息"""
    info = {}

try:
# 分区使用率
        result = run_command('df -h')
if result['success']:
            info['disk_usage'] = result['stdout'].strip()

# inode使用率
        result = run_command('df -i')
if result['success']:
            info['inode_usage'] = result['stdout'].strip()

# 挂载点信息
        result = run_command('mount')
if result['success']:
            info['mount_points'] = result['stdout'].strip()

# 磁盘健康状态(需要smartctl)
        result = run_command('which smartctl')
if result['success']:
            result = run_command('smartctl --scan')
if result['success']:
                disks = result['stdout'].strip().split('\n')
                smart_info = []
for disk in disks:
if disk:
                        device = disk.split()[0]
                        smart_result = run_command(f'smartctl -H {device} 2>/dev/null')
if smart_result['success']:
                            smart_info.append(f"{device}{smart_result['stdout'].strip()}")
                info['smart_status'] = smart_info

except Exception as e:
        info['error'] = str(e)

return info


defget_network_info() -> Dict[str, Any]:
"""获取网络信息"""
    info = {}

try:
# 网卡状态
        result = run_command('ip link show')
if result['success']:
            info['network_interfaces'] = result['stdout'].strip()

# 网络配置
        result = run_command('ip addr show')
if result['success']:
            info['network_config'] = result['stdout'].strip()

# 网络连通性
        connectivity = {}
# Ping网关
        result = run_command('ip route | grep default | awk "{print $3}"')
if result['success'and result['stdout'].strip():
            gateway = result['stdout'].strip()
            ping_result = run_command(f'ping -c 2 {gateway}')
            connectivity['gateway'] = f"{gateway}{'UP'if ping_result['success'else'DOWN'}"
# Ping外网
        ping_result = run_command('ping -c 2 8.8.8.8')
        connectivity['internet'] = f"8.8.8.8: {'UP'if ping_result['success'else'DOWN'}"
        info['connectivity'] = connectivity

# 端口监听
        result = run_command('ss -tulnp')
if result['success']:
            info['listening_ports'] = result['stdout'].strip()

# 防火墙规则
        firewall_info = {}
if run_command('which firewalld').get('success'):
            result = run_command('firewall-cmd --list-all')
            firewall_info['firewalld'] = result['stdout'].strip()
elif run_command('which iptables').get('success'):
            result = run_command('iptables -L')
            firewall_info['iptables'] = result['stdout'].strip()
        info['firewall'] = firewall_info

# 连接数
        result = run_command('ss -s')
if result['success']:
            info['connection_stats'] = result['stdout'].strip()

# 主机名解析
        result = run_command('nslookup localhost')
if result['success']:
            info['dns_resolution'] = result['stdout'].strip()

except Exception as e:
        info['error'] = str(e)

return info


defget_services_processes() -> Dict[str, Any]:
"""获取服务与进程信息"""
    info = {}

try:
# 关键服务状态
        services = ['sshd''crond''rsyslog''ntp''nginx''mysql''httpd''tomcat']
        service_status = {}
for service in services:
if run_command(f'which {service}').get('success'or run_command(f'systemctl status {service} 2>/dev/null').get('success'):
                result = run_command(f'systemctl status {service} 2>/dev/null')
if result['success']:
                    status = 'running'if'active (running)'in result['stdout'else'stopped'
                    service_status[service] = status
        info['service_status'] = service_status

# 服务开机自启
        result = run_command('systemctl list-unit-files --type=service | grep enabled')
if result['success']:
            info['enabled_services'] = result['stdout'].strip()

# 进程CPU/内存占用TOP10
        result = run_command('ps aux --sort=-%cpu | head -11')
if result['success']:
            info['top_cpu_processes'] = result['stdout'].strip()

        result = run_command('ps aux --sort=-%mem | head -11')
if result['success']:
            info['top_memory_processes'] = result['stdout'].strip()

# 定时任务
        result = run_command('crontab -l 2>/dev/null || echo "No crontab for current user"')
if result['success']:
            info['crontab'] = result['stdout'].strip()

# 系统定时任务
if os.path.exists('/etc/crontab'):
with open('/etc/crontab''r'as f:
                info['system_crontab'] = f.read().strip()

except Exception as e:
        info['error'] = str(e)

return info


defget_logs() -> Dict[str, Any]:
"""获取日志信息"""
    info = {}

try:
# 系统日志
        log_files = [
'/var/log/messages',
'/var/log/syslog',
'/var/log/secure',
'/var/log/auth.log'
        ]

for log_file in log_files:
if os.path.exists(log_file):
# 检查关键字
                result = run_command(f'grep -i "error\|fail\|warning\|panic\|oops" {log_file} | tail -20')
if result['success']:
                    info[os.path.basename(log_file)] = result['stdout'].strip()

# dmesg
        result = run_command('dmesg | tail -30')
if result['success']:
            info['dmesg'] = result['stdout'].strip()

except Exception as e:
        info['error'] = str(e)

return info


defget_security() -> Dict[str, Any]:
"""获取安全与账号信息"""
    info = {}

try:
# 检查root登录限制
        result = run_command('grep "PermitRootLogin" /etc/ssh/sshd_config 2>/dev/null')
if result['success']:
            info['root_login_restriction'] = result['stdout'].strip()

# 检查空口令
        result = run_command('awk -F: ($2 == "") {print $1} /etc/shadow 2>/dev/null')
if result['success']:
            info['empty_passwords'] = result['stdout'].strip()

# 检查sudo权限
        result = run_command('grep -v "^#" /etc/sudoers 2>/dev/null | grep -v "^$"')
if result['success']:
            info['sudo_permissions'] = result['stdout'].strip()

# 历史命令(最近50条)
        result = run_command('history | tail -50')
if result['success']:
            info['recent_commands'] = result['stdout'].strip()

# SELinux状态
        result = run_command('sestatus 2>/dev/null || echo "SELinux not installed"')
if result['success']:
            info['selinux_status'] = result['stdout'].strip()

except Exception as e:
        info['error'] = str(e)

return info


defget_backup() -> Dict[str, Any]:
"""获取备份与一致性信息"""
    info = {}

try:
# 检查备份文件
        backup_dirs = ['/backup''/var/backup''/home/backup']
        backup_files = []
for backup_dir in backup_dirs:
if os.path.exists(backup_dir):
                result = run_command(f'ls -la {backup_dir}')
if result['success']:
                    backup_files.append(f"{backup_dir}:\n{result['stdout'].strip()}")
        info['backup_files'] = backup_files

# 检查关键配置文件
        config_files = [
'/etc/ssh/sshd_config',
'/etc/sysctl.conf',
'/etc/fstab'
        ]
        config_checks = {}
for config_file in config_files:
if os.path.exists(config_file):
                result = run_command(f'md5sum {config_file}')
if result['success']:
                    config_checks[config_file] = result['stdout'].strip()
        info['config_files'] = config_checks

except Exception as e:
        info['error'] = str(e)

return info


defget_time_sync() -> Dict[str, Any]:
"""获取时间同步信息"""
    info = {}

try:
# 系统时间
        result = run_command('date')
if result['success']:
            info['system_time'] = result['stdout'].strip()

# NTP服务状态
if run_command('which ntpd').get('success'):
            result = run_command('systemctl status ntpd 2>/dev/null || service ntp status')
            info['ntp_status'] = result['stdout'].strip()
elif run_command('which chronyd').get('success'):
            result = run_command('systemctl status chronyd 2>/dev/null')
            info['ntp_status'] = result['stdout'].strip()

# 时间偏差
if run_command('which ntpdate').get('success'):
            result = run_command('ntpdate -q pool.ntp.org 2>/dev/null')
            info['time_offset'] = result['stdout'].strip()

except Exception as e:
        info['error'] = str(e)

return info


defprint_section(title: str, data: Dict[str, Any]):
"""打印章节内容"""
    print(f"\n{'=' * 70}")
    print(f"  {title}")
    print('=' * 70)

defprint_dict(d: Dict, indent: int = 0):
for key, value in d.items():
            prefix = ' ' * indent
if isinstance(value, dict):
                print(f"{prefix}{key}:")
                print_dict(value, indent + 2)
elif isinstance(value, list):
                print(f"{prefix}{key}{len(value)} 项")
for i, item in enumerate(value[:5]):
if isinstance(item, dict):
                        print(f"{prefix}  [{i+1}]")
                        print_dict(item, indent + 4)
else:
                        print(f"{prefix}  [{i+1}{item}")
if len(value) > 5:
                    print(f"{prefix}  ... 等 {len(value) - 5} 项")
elif isinstance(value, str) and len(value) > 500:
                print(f"{prefix}{key}:")
                lines = value.split('\n')
for line in lines[:10]:
                    print(f"{prefix}{line}")
if len(lines) > 10:
                    print(f"{prefix}  ... 等 {len(lines) - 10} 行")
else:
if isinstance(value, str) and'\n'in value:
                    print(f"{prefix}{key}:")
for line in value.split('\n')[:5]:
                        print(f"{prefix}{line}")
if value.count('\n') > 4:
                        print(f"{prefix}  ...")
else:
                    print(f"{prefix}{key}{value}")

    print_dict(data)


defwrite_dict_to_file(f, d: Dict, indent: int = 0):
"""将字典写入文件"""
for key, value in d.items():
        prefix = ' ' * indent
if isinstance(value, dict):
            f.write(f"{prefix}{key}:\n")
            write_dict_to_file(f, value, indent + 2)
elif isinstance(value, list):
            f.write(f"{prefix}{key}{len(value)} 项\n")
for i, item in enumerate(value):
if isinstance(item, dict):
                    f.write(f"{prefix}  [{i+1}]\n")
                    write_dict_to_file(f, item, indent + 4)
else:
                    f.write(f"{prefix}  [{i+1}{item}\n")
elif isinstance(value, str):
if len(value) > 1000:
                f.write(f"{prefix}{key}:\n")
                lines = value.split('\n')
for line in lines[:20]:
                    f.write(f"{prefix}{line}\n")
if len(lines) > 20:
                    f.write(f"{prefix}  ... 等 {len(lines) - 20} 行\n")
else:
                lines = value.split('\n')
if len(lines) > 1:
                    f.write(f"{prefix}{key}:\n")
for line in lines:
                        f.write(f"{prefix}{line}\n")
else:
                    f.write(f"{prefix}{key}{value}\n")
else:
            f.write(f"{prefix}{key}{value}\n")

defgenerate_report(data: Dict[str, Any], section_titles: Dict[str, str]):
"""生成TXT格式报告文件"""
    timestamp = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')
    report_file = f"Linux_Inspection_Report_{timestamp}.txt"

with open(report_file, 'w', encoding='utf-8'as f:
# 写入报告标题
        f.write("=" * 70 + "\n")
        f.write("  Linux 系统一键巡检报告\n")
        f.write("=" * 70 + "\n")
        f.write(f"报告时间: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n")
        f.write(f"Python版本: {platform.python_version()}\n")
        f.write("=" * 70 + "\n\n")

# 写入各章节内容
for key, title in section_titles.items():
            f.write("\n" + "=" * 70 + "\n")
            f.write(f"  {title}\n")
            f.write("=" * 70 + "\n\n")
            write_dict_to_file(f, data[key])

        f.write("\n" + "=" * 70 + "\n")
        f.write("  巡检完成\n")
        f.write("=" * 70 + "\n")

    print(f"\n{'=' * 70}")
    print(f"巡检报告已保存到: {report_file}")
return report_file


defmain():
"""主函数"""
    print("=" * 70)
    print("  Linux 系统一键巡检脚本")
    print("=" * 70)
    print(f"开始巡检: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
    print()

ifnot check_os():
        print("错误: 此脚本仅适用于Linux操作系统")
        input("\n按回车键退出...")
return

# 收集巡检数据
    inspection_data = {
'system_info': get_system_info(),
'uptime': get_uptime(),
'performance': get_system_performance(),
'disk_filesystem': get_disk_filesystem(),
'network': get_network_info(),
'services_processes': get_services_processes(),
'logs': get_logs(),
'security': get_security(),
'backup': get_backup(),
'time_sync': get_time_sync()
    }

    section_titles = {
'system_info''一、基础信息巡检',
'uptime''系统运行时间',
'performance''二、系统负载与性能',
'disk_filesystem''三、磁盘与文件系统',
'network''四、网络巡检',
'services_processes''五、服务与进程',
'logs''六、日志巡检',
'security''七、安全与账号',
'backup''八、备份与一致性',
'time_sync''九、时间同步'
    }

# 打印巡检结果
for key, title in section_titles.items():
        print_section(title, inspection_data[key])

# 生成报告
    generate_report(inspection_data, section_titles)

    print("\n" + "=" * 70)
    print(f"巡检完成: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
    print("=" * 70)
    input("\n按回车键退出...")


if __name__ == '__main__':
    main()
脚本使用说明:
  • 赋予执行权限:chmod +x linux_inspect.sh
  • 执行脚本:./linux_inspect.sh
  • 巡检日志会自动生成在当前目录,命名格式为linux_inspect_年月日_时分秒.log
  • 脚本无需依赖额外工具,系统自带命令即可运行,适配CentOS 7+/Ubuntu 16+/Debian 9+

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-20 23:36:07 HTTP/2.0 GET : https://f.mffb.com.cn/a/484567.html
  2. 运行时间 : 0.112013s [ 吞吐率:8.93req/s ] 内存消耗:4,853.85kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=e778a8b228a2fdf767f8fc0db1bd9a78
  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.000346s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000596s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000293s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000246s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000534s ]
  6. SELECT * FROM `set` [ RunTime:0.000224s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000582s ]
  8. SELECT * FROM `article` WHERE `id` = 484567 LIMIT 1 [ RunTime:0.003193s ]
  9. UPDATE `article` SET `lasttime` = 1776699367 WHERE `id` = 484567 [ RunTime:0.002483s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000253s ]
  11. SELECT * FROM `article` WHERE `id` < 484567 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003300s ]
  12. SELECT * FROM `article` WHERE `id` > 484567 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.011655s ]
  13. SELECT * FROM `article` WHERE `id` < 484567 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001273s ]
  14. SELECT * FROM `article` WHERE `id` < 484567 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.006409s ]
  15. SELECT * FROM `article` WHERE `id` < 484567 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.014307s ]
0.113691s