--- projects/cms/source/host/c++/Host.cpp 2001/03/23 14:08:49 1.4 +++ projects/cms/source/host/c++/Host.cpp 2002/05/18 18:15:56 1.6 @@ -1,3 +1,22 @@ +/* + * i-scream central monitoring system + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + #include #include // linux header for the sleep function #include // itoa() @@ -64,11 +83,11 @@ int main(){ if ( debug == 1 ){ std::cout << "Using Default Tolerance\n"; } // if - MaxFilterRetrys = 5; + MaxFilterRetrys = 1; } // if - std::cout << "Configuring Alerter\n"; + // std::cout << "Configuring Alerter\n"; // Set the values at which the Alerter should kick in. and how many packets it should // send @@ -206,7 +225,7 @@ int main(){ nextUDPTime = localTime + UDPUpdateTime; // package up the system data string host = config.getFQDN(); - string ip = (config.getSmallNet())->getHostIP(); + // string ip = (config.getSmallNet())->getHostIP(); string seq = ""; // char * buffer; @@ -216,7 +235,7 @@ int main(){ string date = ""; sprintf(buffer,"%u", localTime); date = buffer; - string attributes = "type=\"data\" machine_name=\""+host+"\" date=\""+date+"\" seq_no=\""+seq+"\""; + string attributes = "type=\"data\" machine_name=\""+host+"\" ip=\"0.0.0.0\" date=\""+date+"\" seq_no=\""+seq+"\""; XMLFormatter xml("packet",attributes); // put in the data