"Fossies" - the Fresh Open Source Software Archive

Member "atop-2.8.1/prev/photosyst_26.h" (7 Jan 2023, 10837 Bytes) of package /linux/misc/atop-2.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "photosyst_26.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 2.7.1_vs_2.8.0.

    1 #define MAXCPU_26       2048
    2 #define MAXDSK_26       1024
    3 #define MAXLVM_26       2048
    4 #define MAXMDD_26       256
    5 #define MAXINTF_26      128
    6 #define MAXCONTAINER_26     128
    7 #define MAXNFSMOUNT_26      64
    8 #define MAXIBPORT_26        32
    9 #define MAXGPU_26       32
   10 
   11 /************************************************************************/
   12 struct  memstat_26 {
   13     count_t physmem;    // number of physical pages
   14     count_t freemem;    // number of free     pages
   15     count_t buffermem;  // number of buffer   pages
   16     count_t slabmem;    // number of slab     pages
   17     count_t cachemem;   // number of cache    pages
   18     count_t cachedrt;   // number of cache    pages (dirty)
   19 
   20     count_t totswap;    // number of pages in swap
   21     count_t freeswap;   // number of free swap pages
   22 
   23     count_t pgscans;    // number of page scans
   24     count_t pgsteal;    // number of page steals
   25     count_t allocstall; // try to free pages forced
   26     count_t swouts;     // number of pages swapped out
   27     count_t swins;      // number of pages swapped in
   28 
   29     count_t commitlim;  // commit limit in pages
   30     count_t committed;  // number of reserved pages
   31 
   32     count_t shmem;      // tot shmem incl. tmpfs (pages)
   33     count_t shmrss;     // resident shared memory (pages)
   34     count_t shmswp;     // swapped shared memory (pages)
   35 
   36     count_t slabreclaim;    // reclaimable slab (pages)
   37 
   38     count_t tothugepage;    // total huge pages (huge pages)
   39     count_t freehugepage;   // free  huge pages (huge pages)
   40     count_t hugepagesz; // huge page size (bytes)
   41 
   42     count_t vmwballoon; // vmware claimed balloon pages
   43     count_t zfsarcsize; // zfsonlinux ARC size (pages)
   44     count_t swapcached; // swap cache (pages)
   45     count_t cfuture[6]; // reserved for future use
   46 };
   47 
   48 /************************************************************************/
   49 
   50 struct  netstat_26 {
   51     struct ipv4_stats   ipv4;
   52     struct icmpv4_stats_wrong   icmpv4;
   53     struct udpv4_stats  udpv4;
   54 
   55     struct ipv6_stats   ipv6;
   56     struct icmpv6_stats icmpv6;
   57     struct udpv6_stats  udpv6;
   58 
   59     struct tcp_stats    tcp;
   60 };
   61 
   62 /************************************************************************/
   63 
   64 struct freqcnt_26 {
   65         count_t maxfreq;/* frequency in MHz                    */
   66         count_t cnt;    /* number of clock ticks times state   */
   67         count_t ticks;  /* number of total clock ticks         */
   68                         /* if zero, cnt is actul freq          */
   69 };
   70 
   71 struct percpu_26 {
   72     int     cpunr;
   73     count_t     stime;  /* system  time in clock ticks      */
   74     count_t     utime;  /* user    time in clock ticks      */
   75     count_t     ntime;  /* nice    time in clock ticks      */
   76     count_t     itime;  /* idle    time in clock ticks      */
   77     count_t     wtime;  /* iowait  time in clock ticks      */
   78     count_t     Itime;  /* irq     time in clock ticks      */
   79     count_t     Stime;  /* softirq time in clock ticks      */
   80     count_t     steal;  /* steal   time in clock ticks      */
   81     count_t     guest;  /* guest   time in clock ticks      */
   82         struct freqcnt_26   freqcnt;/* frequency scaling info       */
   83     count_t     instr;  /* CPU instructions             */
   84     count_t     cycle;  /* CPU cycles               */
   85     count_t     cfuture[2]; /* reserved for future use  */
   86 };
   87 
   88 struct  cpustat_26 {
   89     count_t nrcpu;  /* number of cpu's          */
   90     count_t devint; /* number of device interrupts      */
   91     count_t csw;    /* number of context switches       */
   92     count_t nprocs; /* number of processes started          */
   93     float   lavg1;  /* load average last    minute          */
   94     float   lavg5;  /* load average last  5 minutes         */
   95     float   lavg15; /* load average last 15 minutes         */
   96     count_t cfuture[4]; /* reserved for future use  */
   97 
   98     struct percpu_26   all;
   99     struct percpu_26   cpu[MAXCPU_26];
  100 };
  101 
  102 /************************************************************************/
  103 
  104 struct  perdsk_26 {
  105         char    name[MAXDKNAM]; /* empty string for last        */
  106         count_t nread;  /* number of read  transfers            */
  107         count_t nrsect; /* number of sectors read               */
  108         count_t nwrite; /* number of write transfers            */
  109         count_t nwsect; /* number of sectors written            */
  110         count_t io_ms;  /* number of millisecs spent for I/O    */
  111         count_t avque;  /* average queue length                 */
  112     count_t cfuture[4]; /* reserved for future use  */
  113 };
  114 
  115 struct dskstat_26 {
  116     int     ndsk;   /* number of physical disks */
  117     int     nmdd;   /* number of md volumes     */
  118     int     nlvm;   /* number of logical volumes    */
  119     struct perdsk_26    dsk[MAXDSK_26];
  120     struct perdsk_26    mdd[MAXMDD_26];
  121     struct perdsk_26    lvm[MAXLVM_26];
  122 };
  123 
  124 /************************************************************************/
  125 
  126 struct  perintf_26 {
  127         char    name[16];   /* empty string for last        */
  128 
  129         count_t rbyte;  /* number of read bytes                 */
  130         count_t rpack;  /* number of read packets               */
  131     count_t rerrs;  /* receive errors                       */
  132     count_t rdrop;  /* receive drops                        */
  133     count_t rfifo;  /* receive fifo                         */
  134     count_t rframe; /* receive framing errors               */
  135     count_t rcompr; /* receive compressed                   */
  136     count_t rmultic;/* receive multicast                    */
  137     count_t rfuture[4]; /* reserved for future use  */
  138 
  139         count_t sbyte;  /* number of written bytes              */
  140         count_t spack;  /* number of written packets            */
  141     count_t serrs;  /* transmit errors                      */
  142     count_t sdrop;  /* transmit drops                       */
  143     count_t sfifo;  /* transmit fifo                        */
  144     count_t scollis;/* collisions                           */
  145     count_t scarrier;/* transmit carrier                    */
  146     count_t scompr; /* transmit compressed                  */
  147     count_t sfuture[4]; /* reserved for future use  */
  148 
  149     char    type;   /* interface type ('e'/'w'/'?')     */
  150     long    speed;  /* interface speed in megabits/second   */
  151     long    speedp; /* previous interface speed         */
  152     char    duplex; /* full duplex (boolean)        */
  153     count_t cfuture[4]; /* reserved for future use  */
  154 };
  155 
  156 struct intfstat_26 {
  157     int     nrintf;
  158     struct perintf_26   intf[MAXINTF_26];
  159 };
  160 
  161 /************************************************************************/
  162 
  163 struct  pernfsmount_26 {
  164         char    mountdev[128];      /* mountdevice          */
  165         count_t age;            /* number of seconds mounted    */
  166     
  167     count_t bytesread;      /* via normal reads     */
  168     count_t byteswrite;     /* via normal writes        */
  169     count_t bytesdread;     /* via direct reads     */
  170     count_t bytesdwrite;        /* via direct writes        */
  171     count_t bytestotread;       /* via reads            */
  172     count_t bytestotwrite;      /* via writes           */
  173     count_t pagesmread;     /* via mmap  reads      */
  174     count_t pagesmwrite;        /* via mmap  writes     */
  175 
  176     count_t future[8];
  177 };
  178 
  179 struct nfsstat_26 {
  180     struct {
  181             count_t netcnt;
  182         count_t netudpcnt;
  183         count_t nettcpcnt;
  184         count_t nettcpcon;
  185 
  186         count_t rpccnt;
  187         count_t rpcbadfmt;
  188         count_t rpcbadaut;
  189         count_t rpcbadcln;
  190 
  191         count_t rpcread;
  192         count_t rpcwrite;
  193 
  194         count_t rchits;     /* repcache hits    */
  195         count_t rcmiss;     /* repcache misses  */
  196         count_t rcnoca;     /* uncached requests    */
  197 
  198         count_t nrbytes;    /* read bytes       */
  199         count_t nwbytes;    /* written bytes    */
  200 
  201         count_t future[8];
  202     } server;
  203 
  204     struct {
  205         count_t rpccnt;
  206         count_t rpcretrans;
  207         count_t rpcautrefresh;
  208 
  209         count_t rpcread;
  210         count_t rpcwrite;
  211 
  212         count_t future[8];
  213     } client;
  214 
  215     struct {
  216             int                 nrmounts;
  217             struct pernfsmount_26   nfsmnt[MAXNFSMOUNT_26];
  218     } nfsmounts;
  219 };
  220 
  221 /************************************************************************/
  222 struct  psi_26 {
  223     float   avg10;      // average pressure last 10 seconds
  224     float   avg60;      // average pressure last 60 seconds
  225     float   avg300;     // average pressure last 300 seconds
  226     count_t total;      // total number of milliseconds
  227 };
  228 
  229 struct  pressure_26 {
  230     char       present; /* pressure stats supported?    */
  231     char       future[3];
  232     struct psi_26 cpusome;  /* pressure stall info 'some'   */
  233     struct psi_26 memsome;  /* pressure stall info 'some'   */
  234     struct psi_26 memfull;  /* pressure stall info 'full'   */
  235     struct psi_26 iosome;   /* pressure stall info 'some'   */
  236     struct psi_26 iofull;   /* pressure stall info 'full'   */
  237 };
  238 
  239 /************************************************************************/
  240 
  241 struct  percontainer_26 {
  242         unsigned long   ctid;       /* container id         */
  243         unsigned long   numproc;    /* number of processes      */
  244 
  245         count_t system;     /* */
  246         count_t user;       /* */
  247         count_t nice;       /* */
  248         count_t uptime;     /* */
  249 
  250         count_t physpages;  /* */
  251 };
  252 
  253 struct contstat_26 {
  254         int                 nrcontainer;
  255         struct percontainer_26  cont[MAXCONTAINER_26];
  256 };
  257 
  258 /************************************************************************/
  259 /*
  260 ** experimental stuff for access to local HTTP daemons
  261 */
  262 #define HTTPREQ "GET /server-status?auto HTTP/1.1\nHost: localhost\n\n"
  263 
  264 struct wwwstat_26 {
  265     count_t accesses;   /* total number of HTTP-requests    */
  266     count_t totkbytes;  /* total kbytes transfer for HTTP-req   */
  267     count_t uptime;     /* number of seconds since startup  */
  268     int bworkers;   /* number of busy httpd-daemons     */
  269     int iworkers;   /* number of idle httpd-daemons     */
  270 };
  271 
  272 /************************************************************************/
  273 struct pergpu_26 {
  274     char    taskstats;      // GPU task statistics supported?
  275     unsigned char   nrprocs;    // number of processes using GPU
  276     char    type[MAXGPUTYPE+1]; // GPU type
  277     char    busid[MAXGPUBUS+1]; // GPU bus identification
  278     int gpunr;          // GPU number
  279     int gpupercnow;     // processor percentage last second
  280                     // -1 if not supported
  281     int mempercnow;     // memory    percentage last second
  282                     // -1 if not supported
  283     count_t memtotnow;      // total memory in KiB
  284     count_t memusenow;      // used  memory in KiB
  285     count_t samples;        // number of samples
  286     count_t gpuperccum;     // cumulative processor busy percentage
  287                     // -1 if not supported
  288     count_t memperccum;     // cumulative memory percentage 
  289                     // -1 if not supported
  290     count_t memusecum;      // cumulative used memory in KiB
  291 };
  292 
  293 struct gpustat_26 {
  294     int     nrgpus;     // total number of GPUs
  295     struct pergpu_26   gpu[MAXGPU_26];
  296 };
  297 
  298 /************************************************************************/
  299 struct perifb_26 {
  300     char    ibname[MAXIBNAME];  // InfiniBand controller
  301     short   portnr;         // InfiniBand controller port
  302 
  303     short   lanes;          // number of lanes (traffic factor)
  304     count_t rate;           // transfer rate in megabits/sec
  305     count_t rcvb;               // bytes received
  306     count_t sndb;               // bytes transmitted
  307     count_t rcvp;               // packets received
  308     count_t sndp;               // packets transmitted
  309 };
  310 
  311 struct ifbstat_26 {
  312     int     nrports;    // total number of IB ports
  313     struct perifb_26   ifb[MAXIBPORT_26];
  314 };
  315 /************************************************************************/
  316 
  317 struct  sstat_26 {
  318     struct cpustat_26   cpu;
  319     struct memstat_26   mem;
  320     struct netstat_26   net;
  321     struct intfstat_26  intf;
  322     struct dskstat_26  dsk;
  323     struct nfsstat_26  nfs;
  324     struct contstat_26 cfs;
  325     struct pressure_26  psi;
  326     struct gpustat_26   gpu;
  327     struct ifbstat_26   ifb;
  328 
  329     struct wwwstat_26   www;
  330 };