00001 /* 00002 * Copyright (C), 2000-2002 by Contributors to the monit codebase. 00003 * All Rights Reserved. 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License as 00007 * published by the Free Software Foundation; either version 2 of the 00008 * License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software Foundation, 00017 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 #ifndef MONIT_PROCESS_H 00021 #define MONIT_PROCESS_H 00022 00023 #include <config.h> 00024 00025 #ifdef HAVE_UNISTD_H 00026 #include <unistd.h> 00027 #endif 00028 00029 #define PROCESS_ZOMBIE 1 00030 00031 extern int include_children; 00032 extern char actionnames[][STRLEN]; 00033 extern char modenames[][STRLEN]; 00034 extern char operatornames[][STRLEN]; 00035 extern char operatorshortnames[][3]; 00036 extern int num_cpus; 00037 00038 #define RESOURCE_ID_CPU_PERCENT 1 00039 #define RESOURCE_ID_MEM_PERCENT 2 00040 #define RESOURCE_ID_MEM_KBYTE 3 00041 #define RESOURCE_ID_LOAD1 4 00042 #define RESOURCE_ID_LOAD5 5 00043 #define RESOURCE_ID_LOAD15 6 00044 00045 int update_process_data(Process_T p, pid_t pid); 00046 int init_process_info(void); 00047 int update_loadavg(void); 00048 00049 #endif 00050