| SLANT-CGI(8) | System Manager's Manual | SLANT-CGI(8) | 
slant-cgi —
slant-cgi | 
    
slant-cgi utility produces system statistics as
  recorded by slant-collectd(8). It interfaces with the
  database by default in /var/www/data/slant.db.
The CGI program accepts HTTP GET requests for the /index.json resource, which has the aliases /index, /, or the empty request. Other resources return an HTTP code 404. Non-GET request return an HTTP code 405. Other (non-200) codes are possible and follow standard definitions.
On success, slant-cgi returns an HTTP code
    200 and a valid JSON document.
The document consists of the following. In this description,
    integers (int) are serialised from 64-bit signed
    numbers. Real-valued numbers (real) are serialised
    from double-precision numbers.
{   version: "x.y.z",
  timestamp: int,
     system: { system },
       qmin: [ records... ],
        min: [ records... ],
       hour: [ records... ],
        day: [ records... ],
       week: [ records... ],
       year: [ records... ]
}
The version is the software suite version.
    This is informational.
The system object consists of system
    information:
{      boot: int,
    machine: string,
  osversion: string,
  osrelease: string,
    sysname: string
}
It consists only of boot, the UNIX epoch
    value for when the system was last booted. The
    machine, osversion,
    osrelease, and sysname
    mirror the return values of uname(1).
The remaining values are the possibly-empty sets of records
    accumulated over a given interval of time in quarter-minute quanta. So each
    qmin record consists of exactly one entry; each
    min record consists of at least one and at most four
    entries, one for each quarter-minute; each hour has
    at most 240, etc.
There are finite records (except for yearly ones) bound to a circular buffer per interval. When a record is filled, such as with four quarter-minute entries into a minute record, the next entry creates a new record with one entry while the oldest is discarded.
The circular buffer is large enough for a reasonable glimpse into the past, with emphasis placed on recent data: 40 quarter-minute records (10 minutes), 300 minute records (5 hours), 96 hourly (5 days), 28 daily (4 weeks), 104 weekly (two years), endless yearly entries.
Each record consists of the following:
{    ctime: int,
   entries: int,
       cpu: real,
       mem: real,
     netrx: int,
     nettx: int,
  discread: int,
 discwrite: int,
    nprocs: real,
    rprocs: real,
    nfiles: real,
  interval: int,
        id: int
}
The fields are defined as follows:
ctimeentriescpumemnetrxnettxdiscreaddiscwritenprocsrprocsnfilesintervalid| May 13, 2019 | OpenBSD 6.5 |