当前位置:首页>Linux>OS19.【Linux】进程状态(1)

OS19.【Linux】进程状态(1)

  • 2026-06-28 03:19:42
OS19.【Linux】进程状态(1)

目录

0.引言

1.情景引入

2.操作系统学科对进程状态的分类

运行状态

基于时间片的轮转调度算法

阻塞状态

等待IO设备的例子

等待其他进程中需要获取的数据

进程唤醒

挂起状态(全称为阻塞挂起状态)

简单谈谈虚拟内存管理

就绪状态

笔试题

3.Linux对进程状态的分类

R和S状态 

前台运行

结论

D状态

实验:模拟高IO访问的情况

结论

T和t状态

T状态

kill -l命令

t状态

结论

X状态

进程状态记录在task_struct中

4.交换分区的简单了解

两个命令查看交换分区

5.补充: CPU时间、墙钟时间、用户时间

6.补充: 等待队列在linux内核中的定义

8.补充: 进程休眠与唤醒图


0.引言

Linux内核是一个无比复杂的系统,要想看清大致的脉络也非易事。其实,可以把运行中的Linux想像成一个人类的社会,当中的进程就是社会中的人。人有生老病死,进程有创建、异常、终止。人有各种各样的财产,进程有对应的地址空间、设备等等。人被各种各样的东西限制着,被人管着,进程也是。内核无比巨大,从哪着手?我想,从进程的视角来看是个好办法。并且,在学习Linux内核的同时,类比人类社会来看,会有更深刻的印象,理解得更透彻。

作者:马牛(来自豆瓣) 来源:https://book.douban.com/review/2921983/

1.情景引入

C语言代码中的scanf函数会等待用户的输入,那么此时的进程处于闲置的状态

2.操作系统学科对进程状态的分类

例如《 计算机操作系统 慕课版 》第65页:

又如 《 操作系统导论 中译版 》第22页:

又如《 现代操作系统原理与实现》第77页

会发现不同的操作系统书籍对进程的状态的描述都不太一样,但大致分4类:

运行状态、阻塞状态、挂起状态和就绪状态

运行状态

运行状态: 处于运行队列中的进程所处的状态,即进程已经准备好了,可以随时被调度

现认为计算机中只有一个CPU,进程需要占用CPU资源,操而作系统中有很多进程,那么这些进程相互之间一定存在竞争,可以通过调度器保证CPU资源均衡使用,而老师,调度器的其中一个任务是将进程链接到运行队列中,CPU要运行进程时直接在运行队列中队头进程

例如底层为双向链表结构的运行队列:

struct running_queue{    struct running_queue* head;    struct running_queue* tail;}

(注意:是进程的PCB在运行队列中排队)

基于时间片的轮转调度算法

思考一个问题:一个进程只要把自己放到CPU上开始运行了,是不是一直要执行完毕才能把自己放下来?

答:如果是死循环呢?如果按上面这样做,死循环进程会一直占用着CPU的资源,而其他进程得不到执行,会导致操作系统崩溃

那么需要保证进程公平被调度,引入基于时间片的轮转算法(调度算法中的一种)

每个进程都有一个叫做时间片的东西,是分时操作系统分配给每个正在运行的进程微观上的一段CPU时间,通常很短

当一个进程的时间片到了,CPU会暂停执行该进程,转而执行下一个进程,这叫进程切换.暂停执行的进程如果没有执行完,会继续排队

进程切换: 大量的把进程从CPU上放上去,再拿下来的动作 

阻塞状态

阻塞状态:进程无法继续执行,处于正在等待某个资源就绪的状态

等待的事件可能为:

1. 等待特定设备,例如IO设备

2. 等待操作系统某些服务,例如内核返回数据

3. 等待其他进程中需要获取的数据

4. 等待子进程退出

注:阻塞不一定等待硬件,也可以等待软件

等待IO设备的例子

假设进程A要读取硬件数据,例如键盘

先想想操作系统是什么管理硬件的?

答:先描述再组织.描述硬件可以用结构体对象,而组织硬件就是将硬件对应的结构体连接起来

当没有从键盘键入数据时,进程A在等待设备,不能放到运行队列中,要放到等待队列(每个硬件的结构体中有等待队列)中

由于处于阻塞状态的进程的PCB在等待队列中,不在运行队列中,则进程不占用CPU资源,因此在用户看来,进程"卡"住了

等待其他进程中需要获取的数据

之前在OS8.【Linux】基本权限(上)文章提到过,fifo可用于终端之间的通信,现在演示阻塞状态

先创建fifo文件:

mkfifo myfifo

再用XShell复制一份选项卡:

写入字符串时,如果另一个终端没有接收会导致进程阻塞:

如果另一个终端接收了:

原理:

命名管道是一端写入另一端读取的通信机制,在写入命名管道的时如果没有任何进程在读取,它就会阻塞,直到有一个读取方连接上来

进程唤醒

定义: 从阻塞状态到运行状态

挂起状态(全称为阻塞挂起状态)

1.当操作系统的内存资源严重不足时,为了保证操作系统自己运行正常,需要节省内存资源

2.如果某个进程在等待,它无事可做,那么操作系统就保留该进程的PCB,但代码和数据放到外设(磁盘)中,这叫调离内存,也称为换出

了解: 如何确定进程在内存中还是在外设中,可以看段描述符

(摘自《x86汇编语言:从实模式到保护模式 第二版》)

简单谈谈虚拟内存管理

当程序超出了物理内存的大小时,或者操作系统无法分配这么大的物理内存空间时,操作系统要使用虚拟内存管理

下面摘自《x86汇编语言:从实模式到保护模式 第二版》

3.挂起状态:处于调离内存状态的进程

4.当条件允许时,操作系统会将该进程调回内存,也称为换入.如果这个进程所有资源已经就绪了,那么只剩调度了,就会按操作系统设计的调度算法来调度进程,可以认为该进程处于运行状态

5.挂起状态全称为阻塞挂起状态: 只要是等待资源的进程都可以说阻塞

就绪状态

就绪状态: 处于已准备好执行的状态的进程 即满足调度的条件了,但是CPU没调度他(预备执行)

*注:就绪状态和运行状态不用区分那么仔细,因为因为CPU调度是很快的,一般只要进程在运行队列里面,就可以认为是运行状态

笔试题

得物二面:阻塞态和就绪态会占用CPU吗?

答: 1.阻塞态从大的角度说是不影响的,因为阻塞是阻塞在IO或者其他上了,自然不被CPU调度,不占用CPU 2.就绪态从大的角度说是等待被调度,而等待被调度自然还没有占用CPU

科大讯飞笔试:进程的状态? 什么情况触发就绪,什么情况触发阻塞?

答:见上方总结

快手一面;就绪态和运行态的区别?

答:见上方总结

3.Linux对进程状态的分类

看看Linux内核源代码对进程状态的定义:

fs/proc/array.c下:https://github.com/torvalds/linux/blob/master/fs/proc/array.c

/* * The task state array is a strange "bitmap" of * reasons to sleep. Thus "running" is zero, and * you can test for combinations of others with * simple bit tests. */static const char * const task_state_array[] = {	/* states in TASK_REPORT: */	"R (running)",		/* 0x00 */	"S (sleeping)",		/* 0x01 */	"D (disk sleep)",	/* 0x02 */	"T (stopped)",		/* 0x04 */	"t (tracing stop)",	/* 0x08 */	"X (dead)",		/* 0x10 */	"Z (zombie)",		/* 0x20 */	"P (parked)",		/* 0x40 */	/* states beyond TASK_REPORT: */	"I (idle)",		/* 0x80 */};

以这个测试代码为例说明R和S状态:

#include<stdio.h>#include<unistd.h>intmain(){    while(1)    {        printf("The process is runnning...\n");    }    return 0;}

R和S状态 

运行上方代码,再开一个终端捕获该进程的运行状态:

 发现多次捕获发现a.out进程都是"S+"状态.不是R状态

答:这是一个概率问题,R状态相比S状态存在的时间极短,此进程绝大部分时间在等待IO设备(这里是显示器),即处于睡眠状态S (sleeping)

又比如bash命令行解释器,其大部分时间在等待用户的输入,处于S状态

修改以上代码:

#include<stdio.h>#include<unistd.h>intmain(){    while(1);    return 0;}

捕获结果:

执行while(1);是不需要等待显示器资源的,因此进程处于R状态,一直在执行

前台运行

注:R+和S+的+指的是前台运行,即通过终端展示前台进程的信息

进一步解释:进程运行是在内存中通过操作系统的调度算法+ CPU来完成的.进程在运行时,开发者一定是想知道进程的一些调试信息的,所以有的进程会看调用printf、scanf等函数,而这些函数都是与外设来交互的,那么使用printf时,就是向显示器文件输出的,即通过终端呈现出来,对于scanf,输入时,用户也需要要知道自己输入了什么,需要在显示器文件中显示的,也是通过终端来完成的.因此终端主要是展示前台进程的信息的 如果是后台进程,它们的debug信息不可以向终端输出,只能向文件输出,也就是日志

1.在bash中执行命令时默认是前台运行

2.和前台运行对应的是后台运行,在命令后加&可以让进程在后台运行

例如运行刚刚的程序:

终端返回了进程的PID : 11628

可以用kill来杀死进程,Ctrl+C是没有用的

结论

R (running)状态相当于操作系统的运行状态,而S(sleeping)状态相当于操作系统的阻塞状态

D状态

D状态:处于等待某些不可中断的资源状态的进程

例如进程正在向磁盘中写入数据时,进程需要等待写入磁盘的结果

进一步解释:进程A正在向磁盘中写入数据时,如果操作系统的内存资源严重不足,如果操作系统杀死正在待磁盘写入结果的进程A,那么设想一下: 如果磁盘写入失败,那么磁盘无法报告给进程A,有丢失数据的风险,这会出问题

解决方法:让进程A在等待磁盘写入完毕期间,该进程不能被操作系统杀掉,则进程A处于D状态

对比S状态和D状态,S状态是浅度睡眠,而D状态是深度睡眠,而且深度睡眠和浅度睡眠都是等待某资源就绪,因此都属于阻塞状态

浅度睡眠(S状态又称为Interruptible Sleep n.可中断睡眠)可以被唤醒,而深度睡眠是不能被唤醒的,称为Uninterruptible Sleep n.不可中断睡眠,操作系统(注意主体!!)是无法使用kill命令杀死处于D状态的进程,而且该进程不会响应操作系统的任何请求,除非该进程自己醒来

以下摘自redhat processstates

Uninterruptible Sleep StateAn Uninterruptible sleep state is one that won't handle a signal right away. It will wake only as a result of a waited-upon resource becoming available or after a time-out occurs during that wait (if the time-out is specified when the process is put to sleep). The Uninterruptible state is mostly used by device drivers waiting for disk or network I/O. When the process is sleeping uninterruptibly, signals accumulated during the sleep are noticed when the process returns from the system call or trap. In Linux systems. the command ps -l uses the letter D in the state field (S) to indicate that the process is in an Uninterruptible sleep state. In that case, the process state flag is set as follows:                                         p->state = TASK_UNINTERRUPTABLE LEARN MORE: Read more about D states in the Red Hat Knowledgebase: https://access.redhat.com/knowledge/solutions/59989/

实验:模拟高IO访问的情况

模拟处于D状态的进程,例如生成一个较大的文件:

#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<cstdlib>#include<string.h>#include<random>#include<ctime>#include<climits>#define BUFFER_SIZE 1024 * 1024 * 5//5MB缓冲区intmain(){    // 分配缓冲区    unsigned long long* buffer = (unsigned long long*)malloc(BUFFER_SIZE);    if (buffer == NULL    {        perror("malloc fail");        return -1;    }    std::uniform_int_distribution<unsignedlonglongdistribution(0, ULLONG_MAX);    std::default_random_engine generator;    // 打开文件    printf("create random numbers.bin......\n");    FILE* fptr = fopen("random numbers.bin""wb");    if (fptr == NULL)    {        perror("Fail to open file!\n");        free(buffer);        return -1;    }    printf("writing data......\n");    srand((unsigned int)time(NULL));    int times =2048;    while (times--)    {        //先填满缓冲区        unsigned long long buf_index = 0;        while (buf_index < BUFFER_SIZE/8)        {            unsigned long long random = distribution(generator);            buffer[buf_index] = random;            buf_index++;        }        printf("write buffer%d,bin file's size:%dMB\n"2048 - times, (2048 - times)*5);        fwrite(buffer, sizeof(unsigned long long), BUFFER_SIZE / sizeof(unsigned long long), fptr);    }    printf("done!\n");    printf("free buffer......\n");    free(buffer);    printf("close file......\n");    fclose(fptr);    printf("press any key to quit\n");    getchar();    return 0;}

运行结果:

结论

1.D状态本身是操作系统正常处理IO的表现,一般处于D状态的进程持续时间较短

2.但如果大量进程持续处于D状态,会占用大量资源,操作系统会负载,容易产生故障

拓展阅读可以看看闪客大佬这篇文章:闪客 什么叫进程被 D 了

T和t状态

T和t状态的区别在《Linux内核的设计与实现 第3版》的 第3章 进程管理 的 3.2进程描述符及任务结构 的 3.2.2进程描述符的存放 中讲过:

__TASK_TRACED——被其他进程跟踪的进程,例如ptrace对调试程序进行跟踪

__TASK_STOPPED(停止)——进程停止执行; 进程没有投入运行也不能投入运行。通常这种状态发生在接收到 SIGSTOP、SIGTSTP、SIGTTIN、SIGTTOU 等信号的时候。此外,在调试期间接收到任何信号,都会使进程进入这种状态。

结论: T状态表示进程停止执行,t状态表示该进程被其他进程跟踪

T状态

例如执行以下代码

#include<stdio.h>intmain(){    while(1);    return 0;}

kill -l命令

使用kill -l命令查看所有能发送的信号

该表格摘自https://www.chromium.org/chromium-os/developer-library/reference/linux-constants/signals/

number
hex
symbol
description
1
0x01
SIGHUP
Hangup
2
0x02
SIGINT
Interrupt
3
0x03
SIGQUIT
Quit
4
0x04
SIGILL
Illegal instruction
5
0x05
SIGTRAP
Trace/breakpoint trap
6
0x06
SIGABRT
Aborted
6
0x06
SIGIOT
(Same value as SIGABRT)
 Aborted
7
0x07
SIGBUS
Bus error
8
0x08
SIGFPE
Floating point exception
9
0x09
SIGKILL
Killed
10
0x0a
SIGUSR1
User defined signal 1
11
0x0b
SIGSEGV
Segmentation fault
12
0x0c
SIGUSR2
User defined signal 2
13
0x0d
SIGPIPE
Broken pipe
14
0x0e
SIGALRM
Alarm clock
15
0x0f
SIGTERM
Terminated
16
0x10
SIGSTKFLT
Stack fault
17
0x11
SIGCHLD
Child exited
17
0x11
SIGCLD
(Same value as SIGCHLD)
 Child exited
18
0x12
SIGCONT
Continued
19
0x13
SIGSTOP
Stopped (signal)
20
0x14
SIGTSTP
Stopped
21
0x15
SIGTTIN
Stopped (tty input)
22
0x16
SIGTTOU
Stopped (tty output)
23
0x17
SIGURG
Urgent I/O condition
24
0x18
SIGXCPU
CPU time limit exceeded
25
0x19
SIGXFSZ
File size limit exceeded
26
0x1a
SIGVTALRM
Virtual timer expired
27
0x1b
SIGPROF
Profiling timer expired
28
0x1c
SIGWINCH
Window changed
29
0x1d
SIGPOLL
I/O possible
29
0x1d
SIGIO
(Same value as SIGPOLL)
 I/O possible
30
0x1e
SIGPWR
Power failure
31
0x1f
SIGSYS
Bad system call
32
0x20
SIGRTMIN-2
Real-time signal reserved by the C library for NPTL; see signal(7)
33
0x21
SIGRTMIN-1
Real-time signal reserved by the C library for NPTL; see signal(7)
34
0x22
SIGRTMIN
Real-time signal 0
35
0x23
SIGRTMIN+1
Real-time signal 1
36
0x24
SIGRTMIN+2
Real-time signal 2
37
0x25
SIGRTMIN+3
Real-time signal 3
38
0x26
SIGRTMIN+4
Real-time signal 4
39
0x27
SIGRTMIN+5
Real-time signal 5
40
0x28
SIGRTMIN+6
Real-time signal 6
41
0x29
SIGRTMIN+7
Real-time signal 7
42
0x2a
SIGRTMIN+8
Real-time signal 8
43
0x2b
SIGRTMIN+9
Real-time signal 9
44
0x2c
SIGRTMIN+10
Real-time signal 10
45
0x2d
SIGRTMIN+11
Real-time signal 11
46
0x2e
SIGRTMIN+12
Real-time signal 12
47
0x2f
SIGRTMIN+13
Real-time signal 13
48
0x30
SIGRTMIN+14
Real-time signal 14
49
0x31
SIGRTMIN+15
Real-time signal 15
50
0x32
SIGRTMAX-14
Real-time signal 16
51
0x33
SIGRTMAX-13
Real-time signal 17
52
0x34
SIGRTMAX-12
Real-time signal 18
53
0x35
SIGRTMAX-11
Real-time signal 19
54
0x36
SIGRTMAX-10
Real-time signal 20
55
0x37
SIGRTMAX-9
Real-time signal 21
56
0x38
SIGRTMAX-8
Real-time signal 22
57
0x39
SIGRTMAX-7
Real-time signal 23
58
0x3a
SIGRTMAX-6
Real-time signal 24
59
0x3b
SIGRTMAX-5
Real-time signal 25
60
0x3c
SIGRTMAX-4
Real-time signal 26
61
0x3d
SIGRTMAX-3
Real-time signal 27
62
0x3e
SIGRTMAX-2
Real-time signal 28
63
0x3f
SIGRTMAX-1
Real-time signal 29
64
0x40
SIGRTMAX
Real-time signal 30

向进程发送19号信号SIGSTOP:

kill -19 92159

再次使用ps命令查看:进程被暂停

向进程发送18号信号可继续执行:

t状态

intmain(){    return 0;}

使用gdb(有关gdb的使用参见OS15.【Linux】gdb调试器的简单使用文章)在return 0处下断点,

之后使用ps命令查看:发现进程a.out处于t状态,因为gdb控制了a.out进程

结论

处于T或t状态的进程可能被其他进程控制

X状态

X状态(dead):进程处于终止状态

注意:X状态只是一个返回状态,任务列表里是看不到这个状态的

进程状态记录在task_struct中

进程状态是进程的其中一个属性,为了管理进程的各个属性,Linux内核肯定是需要记录这个属性的

之前在OS17.【Linux】进程基础知识(1)文章给出过/linux/sched.h的task_struct的所有内容,其中有一个__state字段:

struct task_struct {#ifdef CONFIG_THREAD_INFO_IN_TASK	/*	 * For reasons of header soup (see current_thread_info()), this	 * must be the first element of task_struct.	 */	struct thread_info		thread_info;#endif	unsigned int			__state;    //......};

linux v6.19.10的/linux/sched.h的其它位置定义了几个进程状态宏,注释写得很清楚:

/* * Task state bitmask. NOTE! These bits are also * encoded in fs/proc/array.c: get_task_state(). * * We have two separate sets of flags: task->__state * is about runnability, while task->exit_state are * about the task exiting. Confusing, but this way * modifying one set can't modify the other one by * mistake. *//* Used in tsk->__state: */#define TASK_RUNNING			0x00000000#define TASK_INTERRUPTIBLE		0x00000001#define TASK_UNINTERRUPTIBLE		0x00000002#define __TASK_STOPPED			0x00000004#define __TASK_TRACED			0x00000008

那么:

TASK_RUNNING → R状态 TASK_INTERRUPTIBLE  → S状态 TASK_UNINTERRUPTIBLE → D状态 __TASK_STOPPED → T状态 __TASK_TRACED → t状态    

4.交换分区的简单了解

在linux中,将进程换出到磁盘,实际上换出到交换分区(swap分区)

可以在Linux mint桌面版的系统监视器中看到:

两个命令查看交换分区

在Linux mint桌面版下演示:

swapon --show

free -h

5.补充: CPU时间、墙钟时间、用户时间

讲完了时间片,这里顺便讲讲3个概念: CPU时间、墙钟时间、用户时间

在serverfault.com what-are-the-differences-between-wall-clock-time-user-time-and-cpu-time中,Greg Hewgill给出了回答:

简而言之,

墙钟时间: 即安装在上的走过的时间,形象理解为实际执行任务的时间

用户时间: CPU执行用户代码的时间,即用户态(和内核态相对)下执行代码的时间,也可以看看百度百科用户中央处理器时间

CPU时间: CPU运行用户的代码或由你的代码所请求的任何操作所花费的总时间,含内核时间显然CPU时间 ≥ 用户时间

墙钟时间和CPU时间不是一回事,比如单线程(线程在之后的文章会提)客户端向服务端发送网络请求,到到收到完整响应为止,这期间经过的所有时间就是墙钟时间,但CPU时间会小于墙钟时间,因为网络响应还没有到来时,客户端线程处于阻塞状态,CPU没有必要一直等待它因此,CPU会从这个客户端线程切换到其它线程执行

显然,墙钟时间包括各种非运算的等待时间,例如等待磁盘I/O时间、等待网络I/O时间,而CPU时间不包括这些耗时,但如果若CPU是多核的,那么多线程系统会叠加这些CPU时间

结论: 单线程下墙钟时间 ≥ CPU 时间

拓展阅读: 如何从Wall/CPU time理解多线程程序的并行效率 知乎 Felix Zhang

6.补充: 等待队列在linux内核中的定义

进程因为等待某个事件(有关等待的事件的一些例子参见本文上方)而主动将自己放入等待队列,并标记为不可运行状态

linux内核是通过wait_queue_head_t来描述等待队列的,wait_queue_head_t定义在/include/linux/wait.h中

struct wait_queue_head {	spinlock_t		lock;	struct list_head	head;};typedef struct wait_queue_head wait_queue_head_t;

显然,wait_queue_head_t的内部实现是通过链表组织的

处于等待队列中的进程可能是可中断睡眠状态(TASK_INTERRUPTIBLE)或者不可中断睡眠状态(TASK_UNINTERRUPTIBLE)

比如在linux内核的/kernel/sched/wait.c中的do_wait_intr等待函数将等待的进程标记为TASK_INTERRUPTIBLE状态:

/* * Note! These two wait functions are entered with the * wait-queue lock held (and interrupts off in the _irq * case), so there is no race with testing the wakeup * condition in the caller before they add the wait * entry to the wake queue. */int do_wait_intr(wait_queue_head_t *wq, wait_queue_entry_t *wait){	if (likely(list_empty(&wait->entry)))		__add_wait_queue_entry_tail(wq, wait);	set_current_state(TASK_INTERRUPTIBLE);	if (signal_pending(current))		return -ERESTARTSYS;	spin_unlock(&wq->lock);	schedule();	spin_lock(&wq->lock);	return 0;}EXPORT_SYMBOL(do_wait_intr);

8.补充: 进程休眠与唤醒图

本文上方提到过可中断睡眠,和不可中断睡眠,这里讲讲内核是怎么唤醒处于可中断睡眠的进程的

图片来自Linux Kernel Development书的Chapter 4 Process Scheduling的Wake Up节:

从图中可以看出,对于可中断任务而言,唤醒该进程有两种方法: 1.该进程收到信号2.任务等待时间发生

注: 信号这个概念在后面的文章会单独讲,参见以下文章:

OS56.【Linux】理解信号: 信号的产生(1) 键盘输入和kill命令OS57.【Linux】理解信号: 信号的产生(2) 键盘输入和系统调用

OS58.【Linux】理解信号: 信号的产生(3) 异常

OS59.【Linux】理解信号: 信号的产生(4) 闹钟、Core Dump

OS60.【Linux】理解信号: 信号的发送和保存

原文首发于CSDN,点击阅读全文即可查看

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 09:34:51 HTTP/2.0 GET : https://f.mffb.com.cn/a/498116.html
  2. 运行时间 : 0.116970s [ 吞吐率:8.55req/s ] 内存消耗:4,762.11kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=bd736bfb31d655f901d8ce88eca89ab9
  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.000528s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000815s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000497s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000280s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000622s ]
  6. SELECT * FROM `set` [ RunTime:0.001310s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000607s ]
  8. SELECT * FROM `article` WHERE `id` = 498116 LIMIT 1 [ RunTime:0.008943s ]
  9. UPDATE `article` SET `lasttime` = 1783042491 WHERE `id` = 498116 [ RunTime:0.002507s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000276s ]
  11. SELECT * FROM `article` WHERE `id` < 498116 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000871s ]
  12. SELECT * FROM `article` WHERE `id` > 498116 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.005036s ]
  13. SELECT * FROM `article` WHERE `id` < 498116 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001380s ]
  14. SELECT * FROM `article` WHERE `id` < 498116 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.013437s ]
  15. SELECT * FROM `article` WHERE `id` < 498116 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.008235s ]
0.119599s