乐于分享
好东西不私藏

OpenClaw监控与调试:构建可靠的多Agent系统运维体系

OpenClaw监控与调试:构建可靠的多Agent系统运维体系

📊 OpenClaw监控与调试:构建可靠的多Agent系统运维体系

监控体系架构:多维度观测系统健康状态

在复杂的多Agent系统中,监控体系是确保系统可靠性和可维护性的关键基础设施。OpenClaw的监控体系采用分层架构设计,从基础设施层到应用层,从实时指标到历史趋势,全方位覆盖系统的各个维度。

监控体系的分层架构

四层监控架构

  • 1
  • 2
  • 3
  • 4
应用层 → Agent行为、工作流状态、业务指标平台层 → 消息队列、状态同步、错误处理系统层 → CPU、内存、磁盘、网络基础设施层 → 主机、容器、网络设备

各层监控重点

应用层监控

  • Agent的活跃状态和性能指标

  • 工作流的执行进度和成功率

  • 业务关键指标(如任务完成率、响应时间)

  • 用户交互和体验指标

平台层监控

  • 消息队列的长度和处理速率

  • 状态同步的一致性和延迟

  • 错误率和异常处理情况

  • 资源使用和配额情况

系统层监控

  • CPU使用率和负载

  • 内存使用量和垃圾回收

  • 磁盘I/O和存储空间

  • 网络带宽和连接数

基础设施层监控

  • 主机健康状态

  • 容器资源使用

  • 网络连通性和延迟

  • 存储系统性能

监控数据采集策略

拉取 vs 推送模式

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
data_collection_strategies:pull_mode:description:"监控系统主动拉取数据"pros: ["控制采集频率""减少Agent负担""统一数据格式"]cons: ["增加监控系统负载""可能存在采集延迟"]use_cases: ["系统指标""基础设施监控"]push_mode:description:"Agent主动推送数据"pros: ["实时性好""减少监控系统负载""支持事件驱动"]cons: ["增加Agent负担""数据格式可能不一致"]use_cases: ["应用指标""业务事件""错误日志"]hybrid_mode:description:"混合模式,根据数据类型选择采集方式"pros: ["兼顾实时性和效率""灵活适应不同场景"]cons: ["实现复杂""需要统一的数据处理"]use_cases: ["生产环境""大规模部署"]

OpenClaw推荐配置

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
monitoring_data_collection:application_layer:mode:"push"interval:"real-time"format:"structured_json"platform_layer:mode:"push"interval:"10s"format:"structured_json"system_layer:mode:"pull"interval:"30s"format:"prometheus_metrics"infrastructure_layer:mode:"pull"interval:"60s"format:"prometheus_metrics"

监控指标分类

关键性能指标(KPI)

  • Agent活跃度:在线Agent数量、Agent响应时间

  • 工作流成功率:成功完成的工作流比例、平均执行时间

  • 消息处理能力:消息吞吐量、消息延迟、错误率

  • 资源利用率:CPU使用率、内存使用量、磁盘I/O

服务质量指标(SLI/SLO)

  • 可用性:系统正常运行时间比例(目标:99.9%)

  • 延迟:95%的请求响应时间(目标:<1秒)

  • 吞吐量:每秒处理的消息数量(目标:>1000)

  • 错误率:失败请求的比例(目标:<0.1%)

业务指标

  • 任务完成率:成功完成的任务比例

  • 用户满意度:基于用户反馈的满意度评分

  • 自动化效率:相比人工处理的时间节省比例

  • 知识积累速度:每日新增的知识条目数量

核心监控指标:关键性能与健康度量

监控指标是衡量系统健康状态的具体数值,合理的指标设计能够帮助运维人员快速发现和定位问题。

Agent层面监控指标

Agent状态指标

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
agent_status_metrics:agent_count:description:"活跃Agent数量"type:"gauge"unit:"count"alert_threshold:"< 80% of expected"agent_response_time:description:"Agent平均响应时间"type:"histogram"unit:"milliseconds"buckets: [100500100020005000]alert_threshold:"> 2000ms (p95)"agent_error_rate:description:"Agent错误率"type:"counter"unit:"percentage"alert_threshold:"> 5%"agent_resource_usage:description:"Agent资源使用量"type:"gauge"unit:"bytes/percentage"labels: ["resource_type""agent_id"]alert_threshold:"> 80% memory or CPU"

Agent性能指标实现

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
// Agent性能监控器classAgentPerformanceMonitor {constructor() {this.metrics = {responseTimenewHistogram({ name'agent_response_time_ms'help'Agent response time in milliseconds' }),errorCountnewCounter({ name'agent_errors_total'help'Total agent errors'labelNames: ['error_type'] }),resourceUsagenewGauge({ name'agent_resource_usage'help'Agent resource usage'labelNames: ['resource_type'] })    };  }asyncmonitorAgent(agentId, operation) {const startTime = Date.now();try {const result = awaitoperation();const responseTime = Date.now() - startTime;// 记录响应时间this.metrics.responseTime.observe(responseTime);// 记录资源使用const resourceUsage = awaitthis.getResourceUsage(agentId);this.metrics.resourceUsage.set({ resource_type'memory' }, resourceUsage.memory);this.metrics.resourceUsage.set({ resource_type'cpu' }, resourceUsage.cpu);return result;    } catch (error) {// 记录错误this.metrics.errorCount.inc({ error_type: error.name || 'unknown' });throw error;    }  }asyncgetResourceUsage(agentId) {// 获取Agent资源使用情况const process = awaitProcess.get(agentId);return {memory: process.memoryUsage.rss / 1024 / 1024// MBcpu: process.cpuUsage.percent    };  }}

工作流层面监控指标

工作流性能指标

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
workflow_performance_metrics:workflow_execution_time:description:"工作流执行时间"type:"histogram"unit:"seconds"buckets: [1030603006001800]alert_threshold:"> 30 minutes (p95)"workflow_success_rate:description:"工作流成功率"type:"ratio"unit:"percentage"alert_threshold:"< 95%"workflow_queue_length:description:"工作流队列长度"type:"gauge"unit:"count"alert_threshold:"> 100"workflow_concurrency:description:"并发工作流数量"type:"gauge"unit:"count"alert_threshold:"> 80% of max_concurrent_workflows"

工作流监控实现

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
// 工作流监控器classWorkflowMonitor {constructor() {this.metrics = {executionTimenewHistogram({name'workflow_execution_time_seconds',help'Workflow execution time in seconds',labelNames: ['workflow_type']      }),successCountnewCounter({name'workflow_success_total',help'Total successful workflows',labelNames: ['workflow_type']      }),failureCountnewCounter({name'workflow_failure_total',help'Total failed workflows',labelNames: ['workflow_type''failure_reason']      }),queueLengthnewGauge({name'workflow_queue_length',help'Current workflow queue length'      })    };  }asyncmonitorWorkflow(workflow, executeWorkflow) {const startTime = Date.now();const workflowType = workflow.type;try {// 更新队列长度this.metrics.queueLength.inc();const result = awaitexecuteWorkflow(workflow);// 记录成功this.metrics.successCount.inc({ workflow_type: workflowType });return result;    } catch (error) {// 记录失败this.metrics.failureCount.inc({workflow_type: workflowType,failure_reason: error.name || 'unknown'      });throw error;    } finally {// 更新队列长度this.metrics.queueLength.dec();// 记录执行时间const executionTime = (Date.now() - startTime) / 1000;this.metrics.executionTime.observe({ workflow_type: workflowType }, executionTime);    }  }getSuccessRate(workflowType) {const successCount = this.metrics.successCount.get({ workflow_type: workflowType });const failureCount = this.metrics.failureCount.get({ workflow_type: workflowType });const total = successCount + failureCount;return total > 0 ? (successCount / total) * 100 : 100;  }}

消息系统监控指标

消息队列指标

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
message_queue_metrics:queue_length:description:"消息队列长度"type:"gauge"unit:"messages"alert_threshold:"> 1000"message_throughput:description:"消息吞吐量"type:"counter"unit:"messages/second"alert_threshold:"< 10 messages/second (sustained)"message_latency:description:"消息延迟"type:"histogram"unit:"milliseconds"buckets: [105010050010005000]alert_threshold:"> 1000ms (p95)"message_error_rate:description:"消息错误率"type:"ratio"unit:"percentage"alert_threshold:"> 1%"

消息系统监控实现

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
// 消息系统监控器classMessageSystemMonitor {constructor() {this.metrics = {queueLengthnewGauge({name'message_queue_length',help'Current message queue length',labelNames: ['queue_name']      }),throughputnewCounter({name'messages_processed_total',help'Total messages processed',labelNames: ['queue_name''status']      }),latencynewHistogram({name'message_processing_latency_seconds',help'Message processing latency in seconds',labelNames: ['queue_name']      }),errorRatenewCounter({name'message_errors_total',help'Total message errors',labelNames: ['error_type''queue_name']      })    };  }asyncmonitorMessageProcessing(queueName, message, processMessage) {const startTime = Date.now();// 更新队列长度this.metrics.queueLength.inc({ queue_name: queueName });try {const result = awaitprocessMessage(message);// 记录成功处理this.metrics.throughput.inc({ queue_name: queueName, status'success' });return result;    } catch (error) {// 记录错误this.metrics.throughput.inc({ queue_name: queueName, status'error' });this.metrics.errorRate.inc({ error_type: error.name || 'unknown'queue_name: queueName       });throw error;    } finally {// 更新队列长度this.metrics.queueLength.dec({ queue_name: queueName });// 记录处理延迟const latency = (Date.now() - startTime) / 1000;this.metrics.latency.observe({ queue_name: queueName }, latency);    }  }getThroughput(queueName, windowSeconds = 60) {// 计算指定时间窗口内的吞吐量const currentCount = this.metrics.throughput.get({ queue_name: queueName, status'success' });// 这里需要实现时间窗口计数逻辑return currentCount / windowSeconds;  }}

调试工具与技术:快速定位和解决问题

调试是运维工作的核心环节,有效的调试工具和技术能够显著缩短问题定位和解决的时间。

日志调试技术

结构化日志实现

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
// 结构化日志记录器classStructuredLogger {constructor(serviceName) {this.serviceName = serviceName;this.logger = winston.createLogger({level'info',format: winston.format.combine(        winston.format.timestamp(),        winston.format.json()      ),transports: [new winston.transports.File({ filename`logs/${serviceName}.log` }),new winston.transports.Console()      ]    });  }log(level, message, context = {}) {const logEntry = {servicethis.serviceName,level: level,message: message,timestampnewDate().toISOString(),      ...context    };// 添加追踪信息if (context.traceId) {      logEntry.trace_id = context.traceId;    }if (context.userId) {      logEntry.user_id = context.userId;    }if (context.agentId) {      logEntry.agent_id = context.agentId;    }this.logger.log(level, JSON.stringify(logEntry));  }debug(message, context = {}) {this.log('debug', message, context);  }info(message, context = {}) {this.log('info', message, context);  }warn(message, context = {}) {this.log('warn', message, context);  }error(message, context = {}) {this.log('error', message, context);  }}

日志查询与分析

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
log_query_examples:# 查找特定Agent的错误日志query:"service:agent AND level:error AND agent_id:researcher-agent"time_range:"last_1h"# 查找工作流执行失败的日志query:"service:workflow AND status:failed"time_range:"last_24h"# 查找高延迟的消息处理日志query:"service:message AND latency:>1000"time_range:"last_1h"# 查找特定用户的操作日志query:"user_id:ou_80874a11502244c163c486f0842a8ac6"time_range:"last_7d"

分布式追踪技术

OpenTelemetry集成

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
// OpenTelemetry追踪器const { trace, context } = require('@opentelemetry/api');const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');const { JaegerExporter } = require('@opentelemetry/exporter-jaeger');classDistributedTracer {constructor() {const provider = newNodeTracerProvider();const exporter = newJaegerExporter({serviceName'openclaw',endpoint'http://localhost:14268/api/traces'    });    provider.addSpanProcessor(newSimpleSpanProcessor(exporter));    provider.register();this.tracer = trace.getTracer('openclaw');  }startSpan(name, parentContext = null) {const span = this.tracer.startSpan(name, {}, parentContext || context.active());return span;  }asynctraceOperation(operationName, operation) {const span = this.startSpan(operationName);try {const result = await context.with(trace.setSpan(context.active(), span), async () => {returnawaitoperation();      });      span.setStatus({ codeSpanStatusCode.OK });return result;    } catch (error) {      span.setStatus({ codeSpanStatusCode.ERRORmessage: error.message });throw error;    } finally {      span.end();    }  }}

追踪上下文传播

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
// 追踪上下文传播器classTraceContextPropagator {inject(context, carrier) {// 将追踪上下文注入到消息头中const span = trace.getSpan(context);if (span) {const spanContext = span.spanContext();      carrier['trace-id'] = spanContext.traceId;      carrier['span-id'] = spanContext.spanId;      carrier['trace-flags'] = spanContext.traceFlags.toString(16);    }  }extract(carrier) {// 从消息头中提取追踪上下文if (carrier['trace-id'] && carrier['span-id']) {return trace.setSpanContext(context.active(), {traceId: carrier['trace-id'],spanId: carrier['span-id'],traceFlagsparseInt(carrier['trace-flags'], 16),isRemotetrue      });    }return context.active();  }}

实时调试工具

Agent状态检查器

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
// Agent状态检查器classAgentStatusChecker {asynccheckAgentHealth(agentId) {const healthChecks = [this.checkAgentProcess(agentId),this.checkAgentMemory(agentId),this.checkAgentNetwork(agentId),this.checkAgentResponsiveness(agentId)    ];const results = awaitPromise.allSettled(healthChecks);return {agentId: agentId,timestampnewDate().toISOString(),overallStatus: results.every(result => result.status === 'fulfilled'),details: results.map((result, index) => ({check: ['process''memory''network''responsiveness'][index],status: result.status === 'fulfilled',error: result.status === 'rejected' ? result.reason.message : null      }))    };  }asynccheckAgentProcess(agentId) {// 检查Agent进程是否存在const processExists = awaitProcess.exists(agentId);if (!processExists) {thrownewError(`Agent process ${agentId} not found`);    }  }asynccheckAgentMemory(agentId) {// 检查Agent内存使用const memoryUsage = awaitProcess.getMemoryUsage(agentId);if (memoryUsage > 80) { // 80%阈值thrownewError(`Agent ${agentId} memory usage too high: ${memoryUsage}%`);    }  }asynccheckAgentNetwork(agentId) {// 检查Agent网络连接const networkStatus = awaitNetwork.checkConnection(agentId);if (!networkStatus.connected) {thrownewError(`Agent ${agentId} network connection failed`);    }  }asynccheckAgentResponsiveness(agentId) {// 检查Agent响应性const responseTime = awaitAgent.ping(agentId);if (responseTime > 5000) { // 5秒阈值thrownewError(`Agent ${agentId} unresponsive: ${responseTime}ms`);    }  }}

工作流调试器

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
// 工作流调试器classWorkflowDebugger {constructor() {this.debugSessions = newMap();  }asyncstartDebugSession(workflowId) {const session = {idgenerateUUID(),workflowId: workflowId,startTimenewDate(),breakpointsnewSet(),stepByStepfalse,variablesnewMap()    };this.debugSessions.set(session.id, session);return session.id;  }asyncsetBreakpoint(debugSessionId, stageName) {const session = this.debugSessions.get(debugSessionId);if (session) {      session.breakpoints.add(stageName);    }  }asyncenableStepByStep(debugSessionId) {const session = this.debugSessions.get(debugSessionId);if (session) {      session.stepByStep = true;    }  }asynccontinueExecution(debugSessionId) {const session = this.debugSessions.get(debugSessionId);if (session) {// 继续执行工作流returnawaitthis.executeWorkflowWithDebugging(session);    }  }asyncexecuteWorkflowWithDebugging(session) {const workflow = awaitWorkflow.get(session.workflowId);for (const stage of workflow.stages) {// 检查断点if (session.breakpoints.has(stage.name)) {return {pausedtrue,reason'breakpoint_hit',currentStage: stage.name,variables: session.variables        };      }// 检查单步执行if (session.stepByStep && session.lastExecutedStage) {return {pausedtrue,reason'step_by_step',currentStage: stage.name,variables: session.variables        };      }// 执行阶段try {const result = awaitthis.executeStage(stage);        session.variables.set(stage.name, result);        session.lastExecutedStage = stage.name;      } catch (error) {return {pausedtrue,reason'error',error: error.message,currentStage: stage.name,variables: session.variables        };      }    }// 工作流完成this.debugSessions.delete(session.id);return { completedtruevariables: session.variables };  }}

告警与自动化响应:智能运维的关键

告警系统是监控体系的重要组成部分,它能够在问题发生时及时通知运维人员,并触发自动化响应机制。

告警规则设计

告警规则配置

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
alert_rules:-name:"agent_down"description:"Agent离线告警"condition:"agent_count < 0.8 * expected_agent_count"severity:"critical"duration:"5m"labels:team:"platform"service:"agents"-name:"workflow_failure_rate_high"description:"工作流失败率过高"condition:"rate(workflow_failure_total[5m]) / rate(workflow_total[5m]) > 0.05"severity:"warning"duration:"10m"labels:team:"platform"service:"workflows"-name:"message_queue_backlog"description:"消息队列积压"condition:"message_queue_length > 1000"severity:"warning"duration:"2m"labels:team:"platform"service:"messaging"-name:"high_memory_usage"description:"内存使用率过高"condition:"process_resident_memory_bytes / machine_memory_bytes > 0.8"severity:"warning"duration:"5m"labels:team:"infrastructure"service:"system"

动态阈值告警

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
// 动态阈值告警器classDynamicThresholdAlert {constructor(metricName, baseThreshold, sensitivity = 0.1) {this.metricName = metricName;this.baseThreshold = baseThreshold;this.sensitivity = sensitivity;this.historicalValues = [];this.maxHistory = 1000;  }addValue(value, timestamp = Date.now()) {this.historicalValues.push({ value, timestamp });// 保持历史数据在合理范围内if (this.historicalValues.length > this.maxHistory) {this.historicalValues = this.historicalValues.slice(-this.maxHistory);    }  }getCurrentThreshold() {if (this.historicalValues.length < 10) {returnthis.baseThreshold;    }// 计算历史数据的统计特征const values = this.historicalValues.map(item => item.value);const mean = values.reduce((sum, val) => sum + val, 0) / values.length;const stdDev = Math.sqrt(      values.reduce((sum, val) => sum + Math.pow(val - mean, 2), 0) / values.length    );// 动态阈值 = 基础阈值 + 敏感度 * 标准差returnthis.baseThreshold + (this.sensitivity * stdDev);  }shouldAlert(currentValue) {const threshold = this.getCurrentThreshold();return currentValue > threshold;  }}

告警通知渠道

多渠道告警通知

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
// 告警通知管理器classAlertNotificationManager {constructor() {this.channels = {emailnewEmailNotifier(),smsnewSMSNotifier(),feishunewFeishuNotifier(),webhooknewWebhookNotifier()    };  }asyncsendAlert(alert, channels = ['feishu''email']) {const notification = this.formatAlertNotification(alert);const promises = channels.map(channel => {if (this.channels[channel]) {returnthis.channels[channel].send(notification);      }    }).filter(Boolean);awaitPromise.allSettled(promises);  }formatAlertNotification(alert) {return {title`[${alert.severity.toUpperCase()}${alert.name}`,message: alert.description,details: {condition: alert.condition,duration: alert.duration,labels: alert.labels,timestampnewDate().toISOString()      },actions: [        { name'View Dashboard'urlthis.getDashboardUrl(alert) },        { name'Acknowledge'urlthis.getAcknowledgeUrl(alert) }      ]    };  }getDashboardUrl(alert) {return`https://monitoring.your-domain.com/dashboards/openclaw?alert=${alert.name}`;  }getAcknowledgeUrl(alert) {return`https://monitoring.your-domain.com/alerts/${alert.id}/acknowledge`;  }}

自动化响应机制

自动修复策略

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
automated_responses:agent_crash:detection:"agent_down alert"actions:-"restart_agent"-"notify_team"-"create_incident_ticket"message_queue_backlog:detection:"message_queue_backlog alert"actions:-"scale_up_message_processors"-"throttle_incoming_messages"-"notify_on_call_engineer"high_memory_usage:detection:"high_memory_usage alert"actions:-"trigger_garbage_collection"-"restart_memory_intensive_agents"-"scale_up_memory_resources"

自动化响应执行器

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
// 自动化响应执行器classAutomatedResponseExecutor {constructor() {this.responseStrategies = {restart_agentthis.restartAgent,scale_up_message_processorsthis.scaleUpMessageProcessors,trigger_garbage_collectionthis.triggerGarbageCollection,notify_teamthis.notifyTeam,create_incident_ticketthis.createIncidentTicket    };  }asyncexecuteResponse(alert, responseStrategy) {const strategy = this.responseStrategies[responseStrategy];if (strategy) {try {await strategy.call(this, alert);console.log(`Automated response executed: ${responseStrategy}`);      } catch (error) {console.error(`Failed to execute automated response ${responseStrategy}:`, error);awaitthis.notifyTeam({          ...alert,message`Automated response failed: ${error.message}`        });      }    }  }asyncrestartAgent(alert) {const agentId = alert.labels.agent_id;awaitAgent.restart(agentId);  }asyncscaleUpMessageProcessors(alert) {const currentCount = awaitMessageProcessor.getCount();awaitMessageProcessor.scale(currentCount * 2);  }asynctriggerGarbageCollection(alert) {awaitSystem.gc();  }asyncnotifyTeam(alert) {awaitthis.alertNotificationManager.sendAlert(alert, ['feishu''email']);  }asynccreateIncidentTicket(alert) {awaitIncident.create({title: alert.name,description: alert.description,severity: alert.severity,labels: alert.labels    });  }}

可视化仪表板:直观展示系统状态

可视化仪表板是监控体系的用户界面,它将复杂的监控数据以直观的方式呈现给运维人员。

Grafana仪表板配置

OpenClaw核心仪表板

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
{"dashboard":{"title":"OpenClaw Core Metrics","panels":[{"title":"Active Agents","type":"stat","targets":[{"expr":"agent_count","legendFormat":"Active Agents"}],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"yellow","value":80},{"color":"red","value":50}]}},{"title":"Workflow Success Rate","type":"graph","targets":[{"expr":"rate(workflow_success_total[5m]) / (rate(workflow_success_total[5m]) + rate(workflow_failure_total[5m]))","legendFormat":"Success Rate"}],"yaxes":{"format":"percentunit","min":0,"max":1}},{"title":"Message Queue Length","type":"graph","targets":[{"expr":"message_queue_length","legendFormat":"{{queue_name}}"}]},{"title":"System Resource Usage","type":"graph","targets":[{"expr":"process_cpu_usage_percent","legendFormat":"CPU Usage"},{"expr":"process_resident_memory_bytes / 1024 / 1024","legendFormat":"Memory Usage (MB)"}]},{"title":"Agent Response Time","type":"heatmap","targets":[{"expr":"agent_response_time_ms","legendFormat":"Response Time"}],"yaxis":{"format":"ms"}}]}}

自定义监控仪表板

业务指标仪表板

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
// 业务指标仪表板生成器classBusinessMetricsDashboard {constructor() {this.metrics = {taskCompletionRatenewGauge({ name'task_completion_rate'help'Task completion rate' }),userSatisfactionnewGauge({ name'user_satisfaction_score'help'User satisfaction score' }),automationEfficiencynewGauge({ name'automation_efficiency_ratio'help'Automation efficiency ratio' }),knowledgeAccumulationnewCounter({ name'knowledge_items_added_total'help'Knowledge items added' })    };  }updateTaskCompletionRate(completedTasks, totalTasks) {constrate=totalTasks>0?(completedTasks/totalTasks)*100:100;this.metrics.taskCompletionRate.set(rate);  }updateUserSatisfaction(score) {this.metrics.userSatisfaction.set(score);  }updateAutomationEfficiency(manualTime, automatedTime) {constefficiency=manualTime>0?(manualTime-automatedTime)/manualTime:0;this.metrics.automationEfficiency.set(efficiency);  }recordKnowledgeItemAdded() {this.metrics.knowledgeAccumulation.inc();  }getDashboardData() {return {taskCompletionRatethis.metrics.taskCompletionRate.get(),userSatisfactionthis.metrics.userSatisfaction.get(),automationEfficiencythis.metrics.automationEfficiency.get(),knowledgeAccumulationthis.metrics.knowledgeAccumulation.get()    };  }}

性能基准测试:量化系统能力

性能基准测试是评估系统性能和容量规划的重要手段,它能够帮助我们了解系统的极限能力和优化方向。

基准测试框架

基准测试配置

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
benchmark_config:scenarios:-name:"agent_concurrency"description:"测试Agent并发处理能力"parameters:agent_count: [1050100200]tasks_per_agent:100task_complexity:"medium"-name:"workflow_throughput"description:"测试工作流吞吐量"parameters:workflow_count:1000workflow_complexity:"complex"concurrency: [151020]-name:"message_latency"description:"测试消息处理延迟"parameters:message_count:10000message_size: [1KB10KB100KB]queue_depth: [100100010000]-name:"resource_utilization"description:"测试资源使用效率"parameters:duration:"1h"load_pattern:"steady"monitoring_interval:"10s"

基准测试执行器

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
// 基准测试执行器classBenchmarkExecutor {constructor(config) {this.config = config;this.results = newMap();  }asyncrunBenchmark(scenarioName) {const scenario = this.config.scenarios.find(s => s.name === scenarioName);if (!scenario) {thrownewError(`Scenario ${scenarioName} not found`);    }console.log(`Running benchmark: ${scenario.name}`);const results = [];for (const params ofthis.generateParameterCombinations(scenario.parameters)) {const result = awaitthis.runScenarioWithParams(scenario, params);      results.push({ params, result });    }this.results.set(scenarioName, results);return results;  }generateParameterCombinations(parameters) {// 生成参数组合const keys = Object.keys(parameters);const combinations = [];functiongenerate(currentCombination, index) {if (index === keys.length) {        combinations.push({ ...currentCombination });return;      }const key = keys[index];const values = Array.isArray(parameters[key]) ? parameters[key] : [parameters[key]];for (const value of values) {        currentCombination[key] = value;generate(currentCombination, index + 1);delete currentCombination[key];      }    }generate({}, 0);return combinations;  }asyncrunScenarioWithParams(scenario, params) {const startTime = Date.now();switch (scenario.name) {case'agent_concurrency':returnawaitthis.testAgentConcurrency(params);case'workflow_throughput':returnawaitthis.testWorkflowThroughput(params);case'message_latency':returnawaitthis.testMessageLatency(params);case'resource_utilization':returnawaitthis.testResourceUtilization(params);default:thrownewError(`Unknown scenario: ${scenario.name}`);    }  }asynctestAgentConcurrency(params) {const { agent_count, tasks_per_agent, task_complexity } = params;// 启动指定数量的Agentconst agents = awaitthis.startAgents(agent_count);// 为每个Agent分配任务const taskPromises = [];for (const agent of agents) {for (let i = 0; i < tasks_per_agent; i++) {        taskPromises.push(this.assignTaskToAgent(agent, task_complexity));      }    }// 等待所有任务完成const results = awaitPromise.allSettled(taskPromises);const endTime = Date.now();const totalTime = endTime - startTime;const successCount = results.filter(r => r.status === 'fulfilled').length;const failureCount = results.filter(r => r.status === 'rejected').length;return {totalTime: totalTime,successCount: successCount,failureCount: failureCount,throughput: successCount / (totalTime / 1000),avgLatency: totalTime / successCount    };  }// 其他测试方法...}

性能优化建议

基于基准测试的优化

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
performance_optimization_recommendations:agent_concurrency:findings:"Agent并发数超过100时,响应时间显著增加"recommendations:-"实施Agent池化,限制最大并发数"-"优化Agent内存使用,减少GC压力"-"使用异步I/O减少阻塞"workflow_throughput:findings:"复杂工作流在高并发下出现队列积压"recommendations:-"实施工作流优先级队列"-"增加工作流处理器实例"-"优化工作流依赖解析算法"message_latency:findings:"大消息(>100KB)处理延迟显著增加"recommendations:-"实施消息分片处理"-"优化消息序列化/反序列化"-"使用更高效的传输协议"resource_utilization:findings:"CPU使用率在高负载下达到90%以上"recommendations:-"优化算法复杂度"-"实施缓存减少重复计算"-"考虑水平扩展增加处理能力"

故障排查指南:系统性的问题诊断方法

故障排查是运维工作的核心技能,系统性的排查方法能够帮助我们快速定位和解决问题。

故障排查流程

标准化排查流程

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
graphTDA[问题报告]--B{问题类型}B-->|Agent相关| C[检查Agent状态]B-->|工作流相关| D[检查工作流状态]B-->|消息相关| E[检查消息队列]B-->|系统相关| F[检查系统资源]C--G[查看Agent日志]C--H[检查Agent配置]C--I[重启Agent]D--J[查看工作流日志]D--K[检查工作流依赖]D--L[重新执行工作流]E--M[查看消息队列状态]E--N[检查消息处理器]E--O[清理死信队列]F--P[查看系统指标]F--Q[检查资源限制]F--R[扩容或优化]

常见问题与解决方案

Agent相关问题

问题1:Agent无法启动

  • 症状:Agent进程无法启动,日志显示启动错误

  • 排查步骤

    • 检查Agent配置文件是否正确

    • 验证依赖服务是否可用

    • 检查端口冲突

    • 查看启动日志中的具体错误信息

  • 解决方案

    • 修正配置文件

    • 启动依赖服务

    • 更换端口

    • 根据错误信息进行针对性修复

问题2:Agent响应缓慢

  • 症状:Agent响应时间超过正常范围

  • 排查步骤

    • 检查Agent CPU和内存使用情况

    • 查看Agent日志中的性能瓶颈

    • 检查数据库连接和查询性能

    • 验证网络连接质量

  • 解决方案

    • 优化Agent代码性能

    • 增加Agent资源配额

    • 优化数据库查询

    • 改善网络环境

工作流相关问题

问题3:工作流执行失败

  • 症状:工作流在某个阶段失败,无法继续执行

  • 排查步骤

    • 查看工作流执行日志

    • 检查失败阶段的输入数据

    • 验证相关Agent的状态

    • 检查工作流配置的依赖关系

  • 解决方案

    • 修正输入数据格式

    • 重启相关Agent

    • 调整工作流依赖配置

    • 增加重试机制

消息系统相关问题

问题4:消息队列积压

  • 症状:消息队列长度持续增长,消息处理延迟增加

  • 排查步骤

    • 检查消息处理器的处理能力

    • 查看消息处理日志中的错误信息

    • 验证消息格式是否正确

    • 检查系统资源使用情况

  • 解决方案

    • 增加消息处理器实例

    • 修复消息处理逻辑

    • 优化消息格式

    • 扩容系统资源

调试命令集

常用调试命令

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
# 检查Agent状态openclaw agent status --allopenclaw agent status researcher-agent# 查看工作流执行情况openclaw workflow list --status=runningopenclaw workflow logs workflow-123# 检查消息队列openclaw message queue statusopenclaw message queue stats# 系统资源监控openclaw system metrics --interval=10sopenclaw system top# 日志查询openclaw logs query "level:error AND service:agent" --since=1hopenclaw logs tail --service=workflow --lines=100# 故障诊断openclaw diagnose agent researcher-agentopenclaw diagnose workflow workflow-123openclaw diagnose system

最佳实践总结:构建可靠的运维体系

监控体系建设原则

核心原则

  1. 全面覆盖:监控体系应该覆盖系统的所有关键组件和指标

  2. 分层设计:从基础设施到应用层,建立分层的监控架构

  3. 实时性:关键指标应该实时监控,及时发现问题

  4. 可操作性:监控数据应该能够直接指导运维操作

  5. 自动化:告警和响应应该尽可能自动化,减少人工干预

运维流程优化

标准化运维流程

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
standard_operating_procedures:incident_response:steps:-"接收告警通知"-"确认问题真实性"-"评估影响范围"-"执行应急预案"-"记录处理过程"-"事后复盘总结"capacity_planning:steps:-"定期性能基准测试"-"分析资源使用趋势"-"预测未来容量需求"-"制定扩容计划"-"执行扩容操作"-"验证扩容效果"change_management:steps:-"变更申请和审批"-"变更影响评估"-"制定回滚计划"-"执行变更操作"-"验证变更效果"-"更新文档记录"

持续改进机制

运维体系持续改进

  • 定期回顾:每周回顾监控指标和告警情况,优化告警规则

  • 根因分析:对每个重大故障进行根因分析,防止问题重复发生

  • 自动化演进:持续增加自动化响应策略,减少人工干预

  • 性能优化:基于基准测试结果,持续优化系统性能

  • 文档更新:及时更新运维文档和故障排查指南

结语:构建智能运维的新时代

OpenClaw的监控与调试体系不仅仅是一套工具和技术,更是一种智能运维的新范式。通过全方位的监控、智能化的告警、自动化的响应和系统化的故障排查,我们能够构建一个真正可靠、高效、自愈的多Agent系统。

在这个智能运维的新时代,运维人员的角色也在发生转变——从被动的问题处理者变为主动的系统优化者。通过掌握本文介绍的技术和方法,您将能够构建一个让业务放心、让用户满意的OpenClaw运维体系。

记住,最好的监控体系不是最复杂的,而是最适合您的业务需求的。从基础开始,逐步完善,让监控和调试成为您系统可靠性的坚实保障。

现在就开始构建属于您的智能运维体系吧!

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