Object ::nsmcp::logTools::accessFileSummary (public)

 ::nsmcp::AccessFileSummaryTool ::nsmcp::logTools::accessFileSummary[i]

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

Testcases:
No testcase defined.
Source code:
namespace eval ::nsmcp::logTools {}
::nsf::object::alloc ::nsmcp::AccessFileSummaryTool ::nsmcp::logTools::accessFileSummary {set :adminExample {}
   set :adminSummary {}
   set :description {Scan configured access-log files in a background job, independent of cache retention. Failed-traffic analysis supports status OR statusClass, exact pool/method and recordSource (all/driver/connection/unknown). All selected counts, rankings, origins and samples are computed after filters. Failed-traffic answers must include the returned paths ranking with counts and its breakdowns.paths capacity/ranking omissions. Path/status aggregation is independent of SQLite peer/User-Agent storage: identity aggregation failure does not justify replacing path rankings with samples. aggregateStorage.failure gives a bounded phase/class/code/diagnosticId; poolWaitCount and poolWaitMilliseconds describe bounded transient pool retries. waiting-aggregation yields without consuming log records. Do not infer a disk-limit failure from pool contention. context counts the same scanned time/path/pool/method/source traffic before status filtering; trafficBuckets provide up to 50 busiest occupied buckets with explicit omissions. Use bucketSeconds 1 for short bursts (at most 3600 buckets); default about 60 buckets. Driver pool and protocol-module labels come from the log header only. Driver names are reused threads, not unique request IDs. Driver 503 does not prove queue-full; queueFullReasonAvailable is false. Driver synthetic timing phases never enter timing averages; unavailableTimingCount is separate from timestamp fallbackCount. statusTimings separate admitted-worker measurements by response status. Default selection ordered reads endpoint records and seeks by request-start timestamps under an explicit approximate ordering assumption, with five seconds of selection padding filtered against the original bounds; completion timestamps are fallback values. Observed inversions exceeding five seconds or unusable probes fall back to bounded scanning. This does not certify unsampled ordering or include every delayed completion. Use selection exhaustive for full verification. For prompt origin hints start with mode evidence (default 5000 matching records, at most 50000 parsed candidates, 32MiB byte budget, maxRecords 1..10000). Its bounded prefix rankings describe only the observed evidence span, not the entire requested interval; follow with mode summary only when full counts are needed. Poll log_results with jobHandle until complete; the result is a summary, not record pages. Omit pathLiteral for all parsed request paths, including empty or non-slash targets. Use pathLiteral ".php" for case-sensitive literal substring matching on the logged queryless path, never query values; no regexp or URL decoding. Defaults to today UTC; set timezone for today/yesterday, or lastMinutes, or explicit from/to. includeRotations defaults true and includes recognized numbered/dated siblings and gzip rotations. ASCII literals use bounded ns_fseekchars candidate searches; Unicode/ANSI cases retain conservative parsing. In exhaustive selection, a bounded server-local time index stores exhaustive start-time bounds for byte ranges independently of path filters. It skips unrelated rotations and seeks over disjoint ranges without assuming timestamp order. Cold scans build the index; changed/append-only snapshots verify complete cached ranges by digest before exclusion, counting verification reads against the scan budget. Unknown, malformed, oversized and unindexed ranges are scanned. Cache metadata is bounded and lost on process restart; filenames and endpoint samples never prove absence. coverage.rotationsSkippedOutsideWindow and eligibleFilesFullyExamined distinguish verified pruning from missing coverage. Parsing diagnostics in literal mode concern candidates and fallback rows, not every unrelated record. Fixed snapshots, bounded streaming/decompression, file/byte/cardinality limits and changed/unreadable files are reported. Counts use logged request start time, falling back to completion time; end is exclusive. Returns all-match totals before bounded path, method, status, pool, UTC-hour, redacted User-Agent and address-free peer-concentration rankings, authentication states, timing totals and distributed samples including status below 400. When a native SQLite aggregation pool is configured (accessAggregationPool, falling back to databasePool), peers and full User-Agent identity hashes are counted in a private per-job SQLite spool with bounded buffers and disk budget. Otherwise aggregateStorage explicitly reports bounded-memory fallback. maxGroups 1..50 limits rankings, not scanning. Inspect aggregateStorage status/reason, breakdowns storageOmittedRecords separately from capacity/ranking omissions, exact observedDistinctPeers/observedDistinctUserAgents and peerConcentration top1/top10/top100 shares. Exactness concerns scanned matching records, not retention or verified identities. Unknown values, clipped/redacted labels, storage failures and ranking omissions are separate. Counts are access records, not unique requests/incidents. No user IDs, peer addresses, query strings or caller-supplied filenames are exposed. sourceFullyExamined does not certify full-day retention; windowComplete remains false without verified rotation history.}
   set :inputSchema {{} object {type string object properties object {selection object {type string string enum array {0 string ordered 1 string exhaustive} default string ordered description string {ordered uses endpoint start times and byte bisection, assuming sorted start times; exhaustive retains full scanning/index verification}} mode object {type string string enum array {0 string summary 1 string evidence} default string summary} maxRecords object {type string integer minimum number 1 maximum number 10000 default number 5000 description string {Maximum matching records in evidence mode; a separate candidate ceiling is max(50000,10*maxRecords). Results are a bounded prefix, not an unbiased window distribution}} pathLiteral object {type string string minLength number 1 maxLength number 256 description string {Case-sensitive literal substring in the logged queryless path, at most 256 UTF-8 bytes; no regexp or decoding}} includeRotations object {type string boolean default boolean true} period object {type string string enum array {0 string today 1 string yesterday}} timezone object {type string string} lastMinutes object {type string integer minimum number 1 maximum number 10080} from object {type string integer minimum number 0} to object {type string integer minimum number 1} maxGroups object {type string integer minimum number 1 maximum number 50} status object {type string integer minimum number 100 maximum number 599 description string {Exact HTTP response status; mutually exclusive with statusClass}} statusClass object {type string string enum array {0 string 1xx 1 string 2xx 2 string 3xx 3 string 4xx 4 string 5xx 5 string 4xx/5xx} description string {Response status class; 4xx/5xx selects all failed responses. Mutually exclusive with status}} pool object {type string string minLength number 1 maxLength number 128 description string {Exact case-sensitive pool, including driver pool suffixes; unknown is explicit}} method object {type string string minLength number 1 maxLength number 32 description string {Exact uppercase HTTP method}} recordSource object {type string string enum array {0 string all 1 string driver 2 string connection 3 string unknown} default string all description string {Driver identifies synthetic driver-side access records, not a unique request or proven queue-full reason}} bucketSeconds object {type string integer minimum number 1 description string {Positive seconds, at most 3600 buckets; default about 60 buckets across the window. Returns top 50 occupied buckets with omission counts.}}} additionalProperties boolean false}}
   set :name access_log_summary
   set :outputSchema {}
   set :permission diagnostics.logs.read
   set :service ::nsmcp::logService}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: