| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# mon_constants.h

Go to the documentation of this file.

    00001
    00007 /*
    00008  * ApMon - Application Monitoring Tool
    00009  * Version: 2.2.0
    00010  *
    00011  * Copyright (C) 2006 California Institute of Technology
    00012  *
    00013  * Permission is hereby granted, free of charge, to use, copy and modify
    00014  * this software and its documentation (the "Software") for any
    00015  * purpose, provided that existing copyright notices are retained in
    00016  * all copies and that this notice is included verbatim in any distributions
    00017  * or substantial portions of the Software.
    00018  * This software is a part of the MonALISA framework (http://monalisa.cacr.caltech.edu).
    00019  * Users of the Software are asked to feed back problems, benefits,
    00020  * and/or suggestions about the software to the MonALISA Development Team
    00021  * (developers@monalisa.cern.ch). Support for this software - fixing of bugs,
    00022  * incorporation of new features - is done on a best effort basis. All bug
    00023  * fixes and enhancements will be made available under the same terms and
    00024  * conditions as the original software,
    00025
    00026  * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
    00027  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
    00028  * OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
    00029  * EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00030
    00031  * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
    00032  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
    00033  * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS
    00034  * PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO
    00035  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
    00036  * MODIFICATIONS.
    00037  */
    00038
    00039 #ifndef mon_constants_h
    00040 #define mon_constants_h
    00041
    00042
    00043 //SYS_* Specific
    00044 #define SYS_LOAD1            0
    00045 #define SYS_LOAD5            1
    00046 #define SYS_LOAD15           2
    00047 #define SYS_CPU_USR          3
    00048 #define SYS_CPU_SYS          4
    00049 #define SYS_CPU_IDLE         5
    00050 #define SYS_CPU_NICE         6
    00051 #define SYS_CPU_USAGE        7
    00052 #define SYS_MEM_FREE         8
    00053 #define SYS_MEM_USED         9
    00054 #define SYS_MEM_USAGE        10
    00055 #define SYS_PAGES_IN         11
    00056 #define SYS_PAGES_OUT        12
    00057 #define SYS_NET_IN           13
    00058 #define SYS_NET_OUT          14
    00059 #define SYS_NET_ERRS         15
    00060 #define SYS_SWAP_FREE        16
    00061 #define SYS_SWAP_USED        17
    00062 #define SYS_SWAP_USAGE       18
    00063 #define SYS_SWAP_IN          19
    00064 #define SYS_SWAP_OUT         20
    00065 #define SYS_PROCESSES        21
    00066 #define SYS_UPTIME           22
    00067 #define SYS_NET_SOCKETS      23
    00068 #define SYS_NET_TCP_DETAILS  24
    00069
    00070 //GENERIC_*
    00071 #define GEN_HOSTNAME         0
    00072 #define GEN_IP               1
    00073 #define GEN_CPU_MHZ          2
    00074 #define GEN_NO_CPUS          3
    00075 #define GEN_TOTAL_MEM        4
    00076 #define GEN_TOTAL_SWAP       5
    00077 #define GEN_CPU_VENDOR_ID    6
    00078 #define GEN_CPU_FAMILY       7
    00079 #define GEN_CPU_MODEL        8
    00080 #define GEN_CPU_MODEL_NAME   9
    00081 #define GEN_BOGOMIPS        10
    00082
    00083 //JOB_*
    00084 #define JOB_RUN_TIME         0
    00085 #define JOB_CPU_TIME         1
    00086 #define JOB_CPU_USAGE        2
    00087 #define JOB_MEM_USAGE        3
    00088 #define JOB_WORKDIR_SIZE     4
    00089 #define JOB_DISK_TOTAL       5
    00090 #define JOB_DISK_USED        6
    00091 #define JOB_DISK_FREE        7
    00092 #define JOB_DISK_USAGE       8
    00093 #define JOB_VIRTUALMEM       9
    00094 #define JOB_RSS              10
    00095 #define JOB_OPEN_FILES       11
    00096
    00097 // Indexes for TCP, UDP, ICM, Unix in the table which stores the number of
    00098 // open sckets
    00099 #define SOCK_TCP             0
    00100 #define SOCK_UDP             1
    00101 #define SOCK_ICM             2
    00102 #define SOCK_UNIX            3
    00103
    00104 // Constants for the possible states of the TCP sockets
    00105 #define STATE_ESTABLISHED    0
    00106 #define STATE_SYN_SENT       1
    00107 #define STATE_SYN_RECV       2
    00108 #define STATE_FIN_WAIT1      3
    00109 #define STATE_FIN_WAIT2      4
    00110 #define STATE_TIME_WAIT      5
    00111 #define STATE_CLOSED         6
    00112 #define STATE_CLOSE_WAIT     7
    00113 #define STATE_LAST_ACK       8
    00114 #define STATE_LISTEN         9
    00115 #define STATE_CLOSING       10
    00116 #define STATE_UNKNOWN       11
    00117
    00118 #define N_TCP_STATES        12
    00119
    00123 int initSysParams(char *sysMonitorParams[]);
    00124
    00129 int initGenParams(char *genMonitorParams[]);
    00130
    00134 int initJobParams(char *jobMonitorParams[]);
    00135
    00140 void initSocketStatesMapTCP(char *socketStatesMapTCP[]);
    00141
    00142 #endif