00001 /*-------------------------------------------------------------------------- 00002 00003 Copyright (c) 2006-2007, Intellectual Reserve, Inc. All rights reserved. 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License version 2 as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 --------------------------------------------------------------------------*/ 00019 00028 #ifndef _DNXWLM_H_ 00029 #define _DNXWLM_H_ 00030 00031 00033 typedef struct DnxWlmCfgData 00034 { 00035 char * dispatcherUrl; 00036 char * collectorUrl; 00037 unsigned reqTimeout; 00038 unsigned ttlBackoff; 00039 unsigned maxRetries; 00040 unsigned poolMin; 00041 unsigned poolInitial; 00042 unsigned poolMax; 00043 unsigned poolGrow; 00044 unsigned pollInterval; 00045 unsigned shutdownGrace; 00046 unsigned maxResults; 00047 unsigned showNodeAddr; 00048 } DnxWlmCfgData; 00049 00051 typedef struct DnxWlmStats 00052 { 00053 unsigned jobs_succeeded; 00054 unsigned jobs_failed; 00055 unsigned threads_created; 00056 unsigned threads_destroyed; 00057 unsigned total_threads; 00058 unsigned active_threads; 00059 unsigned requests_sent; 00060 unsigned jobs_received; 00061 unsigned min_exec_time; 00062 unsigned avg_exec_time; 00063 unsigned max_exec_time; 00064 unsigned avg_total_threads; 00065 unsigned avg_active_threads; 00066 unsigned thread_time; 00067 unsigned job_time; 00068 unsigned packets_in; 00069 unsigned packets_out; 00070 } DnxWlmStats; 00071 00073 typedef struct { int unused; } DnxWlm; 00074 00079 void dnxWlmResetStats(DnxWlm * wlm); 00080 00086 void dnxWlmGetStats(DnxWlm * wlm, DnxWlmStats * wsp); 00087 00095 int dnxWlmReconfigure(DnxWlm * wlm, DnxWlmCfgData * cfg); 00096 00104 int dnxWlmCreate(DnxWlmCfgData * cfg, DnxWlm ** pwlm); 00105 00110 void dnxWlmDestroy(DnxWlm * wlm); 00111 00112 #endif /* _DNXWLM_H_ */ 00113