Architecture

Sar Family Architecture

Data flows thru this table from bottom (OS Kernel) to top (Human readable form).
Layer
Data Emitor sar (System Activity Reporter) xsar (?)
Data Base /var/adm/sa/saXX files.
Binary data file format.
Data Collector sadc (System Activity Data Collector) uses System Status Library
  Kernel /proc filesystem (LKMI)

sadc data structure

This structure is a representation of binary data format
#include <sadc.h>

#define _MAX_DISKS    16        /* may be estimated */
#define _MAX_NETDEVS    26


typedef struct {
  char device [32];
  long busy,
  avque,
  rw_s,
  blks,
  avwait,
  avserv;
} sadc_diskactivity_t;

typedef struct {
  long  version;
  time_t        time;
  float         uptime;
  long  usr, /* CPU (-u) */
  nice,
  idl,
  sys;

  long bread,   /* -b */
  lread,
  rcache,
  bwrit,
  lwrit,
  wcache,
  pread,
  prwrit,

  rawch,        /* -y */
  canch,
  outch,
  rcvin,
  xmtin,
  mdmin,

  swpin,        /* -w */
  bswin,
  swpot,
  bswot,
  pswch;

  float runq;   /* -q */
  long runocc,
  swpq_sz,
  swpocc,

  swpin,        /* -w */
  bswin,
  swpot,
  bswot,
  pswch;

  float runq;   /* -q */
  long runocc,
  swpq_sz,
  swpocc,

  scall,        /* -c */
  sread,
  swrit,
  fork,
  exec,
  rchar,
  wchar,

  iget,       /* -a */
  namei,
  dirbk;

  lkmistru_memory mem;       /* -M */
  lkmistru_swap swap;

  lkmi_net_t  netdev [_MAX_NETDEVS];       /* -n */
  sadc_diskactivity_t disk [_MAX_DISKS];     /* -d */

} sadc_stru_t;

Last update: April of 2001