/** \mainpage
 *
 * \section intro_sec Technical overview
 * - Lightweight: It's a small and fast library that obtains the statistics directly from the system, nothing else is under it.
 * - Secure: it works with no privileges so no SUID bit is needed.
 * - Multi-architecture: it exposes a common API: common functions and common structures, most of the fields of these structures are common too. The OS-specific stuff has been reduced to the minimum.
 * - Thread-safe: you can use it during simultaneous execution by multiple threads.
 * - SMP: It supports per-processor statistics when possible (the underlying OS has to be capable to do so).
 * - Unit and stress tests: automated tests are used to guarantee the quality of the code.
 *
 * libsysactivity is made up of these feature sets:
 * - \ref cpu "cpu"
 * - \ref disk "disk"
 * - \ref memory "memory"
 * - \ref network "network"
 * - \ref process "process"
 *
 * \page matrix_page Matrix of available stats per OS
 * \section matrix_cpu_sec CPU matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    SMP support * & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    id & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    user & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    nice & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    system & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    idle & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    waiting for io & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} \\ \hline
    hardware irq & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    software irq & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    stolen & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    intr & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
  \end{tabular}
\end{center}
The \emph{id} field is the identifier of the cpu struct so it is always present.\\
(*) Per-processor stats are only available on the platforms that offers such stats.\\
\endlatexonly

 * \section matrix_disk_sec Disk matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    name & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    reads & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    reads merged & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    sectors read & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    time spent reading & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    writes & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sectors written & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    time spent writing & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    bytes read & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    bytes written & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
  \end{tabular}
\end{center}
The \emph{name} field is the identifier of the disk struct so it is always present.\\
\endlatexonly

 * \section matrix_memory_sec Memory matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    total & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    free & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    active & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    inactive & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    buffers & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    swap total & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    swap free & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    swap cached & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    wired & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} \\ \hline
    cached & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    dirty & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    executable & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} \\ \hline
    files & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} \\ \hline
    locked & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} \\ \hline
  \end{tabular}
\end{center}
\endlatexonly

 * \section matrix_swap_sec Swap matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    name & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    total & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    free & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    type & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
  \end{tabular}
\end{center}
The \emph{name} field is the identifier of the swap struct so it is always present.\\
\endlatexonly

 * \section matrix_network_sec Network matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    name & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    received bytes & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    received packets & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    received errors & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    received drop & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    received fifo & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    received compressed & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    received multicast & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
    sent bytes & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sent packets & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sent errors & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sent drop & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    sent fifo & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    sent compressed & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{red} \\ \hline
    sent multicast & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} \\ \hline
  \end{tabular}
\end{center}
The \emph{name} field is the identifier of the network struct so it is always present.\\
\endlatexonly

 * \section matrix_process_sec Process matrix
\latexonly
\begin{center}
  \begin{tabular}{ | l | l | l | l | l | l | l | }
    \hline
    & DragonFly & FreeBSD & Linux & NetBSD & OpenBSD & SunOS \\ \hline
    pid & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    uid & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    gid & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    filename & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    cmdline & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} \\ \hline
    state & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} \\ \hline
    parent pid & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    pgrp & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sid & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    tty & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    user time & \cellcolor{green} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    sys time & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    nice & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    threads & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} \\ \hline
    start time & \cellcolor{red} & \cellcolor{red} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    vm size & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
    rss & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} & \cellcolor{green} \\ \hline
  \end{tabular}
\end{center}
The \emph{pid} field is the identifier of the network struct so it is always present.\\
\endlatexonly
 *
 */
