Peter Eckel wrote: > Hi, > hi Peter, it appears to be my fault of documenting the resource file usage properly. SEC parses its resource file line by line, considering each line as a single option. If the line contains whitespace, it will *not* be split, so that the end user can pass options values that contain whitespace characters (when passing options through command line, you can always use matacharacters '' and "" for hiding whitespace; however, when reading options from file, there is no shell interpretation). After a proper line is read from the resource file, it is pushed to the argv array which is later parsed with getopt(). However, there is one caveat here - getopt expects the option name and option value to be separate elements in the argv array, unless there is an equal sign (=) between them. Although I noticed this during the testing, I probably forgot to include this information in the man page. I also tested your command line options set with equal signs between option names and values, and it appears to work fine. Thanks for pointing this out! WBR, risto
> I just changed an existing setup to make use of SECRC instead of > having to change SEC startup for each change in the list of > monitored files. There seems to be a problem with how SEC > processes the configuration lines in the SECRC file, though. > > My SEC setup, as logged in the dump file, looks like this: > > Program information: > ============================================================ > Program version: SEC (Simple Event Correlator) 2.4.2 > Time of the start: Mon Feb 2 11:57:20 2009 > Time of the last configuration load: Mon Feb 2 11:57:20 2009 > Time of the dump: Mon Feb 2 11:59:11 2009 > Program resource file: /opt/sec/etc/sec.files > Program options: -conf /opt/sec/etc/rules/*.conf -log > /opt/sec/var/log/sec.log -pid /opt/sec/var/run/sec.pid -detach > -debug 7 -intevents -intcontexts -input > /opt/sec/var/log/patrolevents=PATROLEVENTS -input > /opt/sec/var/log/messages=MESSAGES > > There is, however, no input source in the dump, and consequently > there are also no files that SEC reads input from: > > Input sources: > ============================================================ > > > If I write the exact lines from the SECRC file to the startup > command, everything is fine: > > Program information: > ============================================================ > Program version: SEC (Simple Event Correlator) 2.4.2 > Time of the start: Mon Feb 2 12:50:04 2009 > Time of the last configuration load: Mon Feb 2 12:50:04 2009 > Time of the dump: Mon Feb 2 12:50:27 2009 > Program resource file: /opt/sec/etc/sec.files > Program options: -conf /opt/sec/etc/rules/*.conf -log > /opt/sec/var/log/sec.log -pid /opt/sec/var/run/sec.pid -detach > -debug 7 -intevents -intcontexts -input > /opt/sec/var/log/patrolevents=PATROLEVENTS -input > /opt/sec/var/log/messages=MESSAGES > > Input sources: > ============================================================ > /opt/sec/var/log/patrolevents (status: Open, received data: 0 > lines, context: PATROLEVENT) > /opt/sec/var/log/messages (status: Open, received data: 0 lines, > context: MESSAGES) > > > Obviously, SEC reads the resource file and parses the options > correctly, but the files are not opened and monitored. > > > Any ideas what I could test for or what I am doing wrong? > > Best regards, > > Peter. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Simple-evcorr-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Simple-evcorr-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
