::nsmcp::Tool ::nsmcp::Tool describe execute init jsonArguments name permission validate ::nx::Object ::nx::Object ::nsmcp::Tool->::nx::Object ::nsmcp::LogErrorSummaryTool ::nsmcp::LogErrorSummaryTool execute options validate ::nsmcp::LogErrorSummaryTool->::nsmcp::Tool

Class ::nsmcp::LogErrorSummaryTool

::nsmcp::LogErrorSummaryTool[i] create ... \
           [ -adminExample (default "") ] \
           [ -adminSummary (default "") ] \
           [ -description (default "Summarize selected system-log severities in a time window; defaults to Error, Fatal and Bug. Set severities to ["Warning"] for warning analysis or combine Warning with Error/Fatal/Bug. Severity labels are logging classifications, not an independent incident assessment. Combines duplicate-parameter warnings with bounded parameterCounts, normalizes scheduler lateness with timing aggregates and trailing suppression annotations, counts heuristic familyTotals for every selected record and bounded otherBreakdown source counts, reports exact overflowFamilyTotals and bounded redacted hash-priority overflowExamples/overflowSamplesByFamily across the scan with byte offsets, and ranks up to 512 counted groups before the output limit, and distinguishes ungroupedRecords from omittedGroupRecords. Reports physical repeat markers and suppressed-occurrence accounting without assigning suppressed events to the marker window. duplicateParameterOrigins aggregates authentication and redacted User-Agent counts overall and per parameter across all matching records before grouping limits, with explicit unknown, cardinality-overflow, ranked-omission and truncation counts. Samples expose direct authenticationState/authenticationSource without user IDs. Completed duplicate groups can include bounded, address-free access-cache correlation; missing evidence and User-Agents are unknown, not proof of human or bot activity. Returns grouped counts, first/last occurrence, redacted examples and coverage. Prefer this for daily error summaries instead of paging all log_errors records. Defaults to today in UTC; period today/yesterday may use an explicit timezone, or use lastMinutes or from/to (exclusive end). Current log only; rotations are not examined. coverage.logBounds reports first/last file-order and earliest/latest observed epoch timestamps and offsets across all timestamped severities, not just matching errors. coverage.rotation distinguishes configured signal/filename settings from unknown schedule and last verified rotation time. Observed bounds never certify complete window coverage. Returns explicit severityTotals independently of maxGroups. coverage.unrecognizedRecords counts unrecognized system-log entries; coverage.unrecognizedExamples provides up to five redacted examples with byte offsets. Expected ns:sched unlock/hold traces are omitted. Other stderr mutex traces have coverage.mutexTraceRecords and mutexTraceGroups with counts, minimum/maximum/mean seconds, offsets and maximum-duration thread; mutexTraceUngroupedRecords accounts for the 128-group bound. These groups aggregate all scanned traces, not just the five untimestampedExamples. Do not infer a file-wide distribution from examples or call a duration proof of contention. Short startup entries are reported separately via shortLogRecords. Recognizes PostgreSQL diagnostics with grouped DETAIL/HINT/CONTEXT via postgresRecords and postgresExamples. Neighboring timestamps are explicitly labeled inferred-neighbors; they are contextual bounds, not guaranteed event times. These diagnostic counters cover the scanned file; inferred times never enter window totals. Mutex traces are not errors; untimestamped Error/Fatal/Bug entries are reported as unknownTimeErrors rather than included in window totals. Scans the current file in resumable chunks with fixed bounds; running jobs report progress.examinedBytes and progress.sourceBytes. Runs asynchronously: poll log_results with jobHandle until complete; the completed result is the summary and has no record pages. Grouping is heuristic and bounded; report ungroupedRecords and coverage limitations.") ] \
           [ -inputSchema (default " { "type": "object", "properties": { "period": { "type": "string", "enum": [ "today", "yesterday" ] }, "timezone": { "type": "string" }, "lastMinutes": { "type": "integer", "minimum": 1, "maximum": 10080 }, "from": { "type": "integer", "minimum": 0 }, "to": { "type": "integer", "minimum": 1 }, "maxGroups": { "type": "integer", "minimum": 1, "maximum": 50 }, "severities": { "type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": { "type": "string", "enum": [ "Warning", "Error", "Fatal", "Bug" ] } } }, "additionalProperties": false } ") ] \
           [ -name (default "log_error_summary") ] \
           [ -outputSchema (default "") ] \
           [ -permission (default "diagnostics.logs.read") ] \
           [ -service:required service:required ]

Defined in /usr/local/ns/tcl/nsmcp/log-summary.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Tool[i]

Methods (to be applied on instances)

  • execute (scripted, public)

     <instance of nsmcp::LogErrorSummaryTool[i]> execute context \
        arguments
    Parameters:
    context (required)
    arguments (required)

    Testcases:
    No testcase defined.
  • validate (scripted, public)

     <instance of nsmcp::LogErrorSummaryTool[i]> validate arguments
    Parameters:
    arguments (required)

    Testcases:
    No testcase defined.