Actsync documentation and features
Julien ÉLIE
julien at trigofacile.com
Wed Aug 8 11:05:56 UTC 2007
En réponse à Julien ÉLIE :
> En réponse à Jeffrey M. Vinocur :
>> Can I ask why you didn't like this part?
>>
>> -Care should be taken when producing active(5) formatted output; be sure to
>> -check that B<actsync> exited with a zero status prior to using such
>> -output. Also one should realize that such output will not contain lines
>> -ignored by the ignore file process even if C<-p 100> is used.
>
> Because it is already written in the previous paragraph (for <-o>). Moreover,
> producing active(5) formatted output (which is the aim of that paragraph)
> is linked to <-o> and not <-p>.
I finally left the paragraph for both <-o> and <-p> (at least, people won't miss it).
> *except* the concatenation (unfortunately, I do not know C...) so please
> change the three « ### "-t" + w_flag ### » with the appropriate thing
> (perhaps the itoa function will be of help).
No need to concatenate strings in fact (since it is in a execl() which can take
lots of arguments). Note that I have learnt how to do that since my previous article
(and I have also seen lib/concat.c).
By the way, I have a little question regarding actsync.
In order to test it, I only wanted to sync one group.
I have in ~/etc/actsync.ign :
i *
c ecp.test
12:37 news at news ~/bin% ./actsync -o c -i ~/etc/actsync.ign news.ecp.fr
actsync: HALT: lines unchanged: 0.00% < min change limit: 96.00%
actsync: No output or commands executed. Determine if the degree
actsync: of changes is okay and re-execute with a lower -p value
actsync: or with the problem fixed.
12:37 news at news ~/bin% ./actsync -o c -v 4 -p 0 -i ~/etc/actsync.ign news.ecp.fr
actsync: STATUS: read 659 groups, will merge 659 groups from localhost
actsync: STATUS: read 7893 groups, will merge 7892 groups from news.ecp.fr
actsync: STATUS: same=0 add=1, change=0, remove=0
actsync: STATUS: ignore=659, work=1, err=0
actsync: STATUS: same+work+err=1, host1_same=0.00%
ctlinnd newgroup ecp.test y actsync
actsync: STATUS: 1 group(s)
actsync: STATUS: 1 group(s) to be added
actsync: STATUS: 0 group(s) to be removed
actsync: STATUS: 0 group(s) to be changed
actsync: STATUS: 0 group(s) are the same
actsync: STATUS: 0.00% of lines unchanged
actsync: STATUS: 1318 group(s) ignored
I believe there is a problem. First of all in:
host1_same = (double)100.0 *
((double)same / (double)(same+work+host1_errs));
same=0 so it is 0% and I cannot sync without -p 0.
Would not it be better to have (same+ignore) / (same+ignore+work+host1_errs)?
And the last sum of ignored groups is bad (they are counted twice).
It is because of rm_cycle; when it is 1, the code is executed twice:
if (grp[i].output == 0) {
if (grp[i].hostid == HOSTID1) {
++ignore;
}
continue;
}
I assume that enclosing it in a if(!rm_cycle) would be better.
--
Julien ÉLIE
« Et maintenant, la balle est dans le camp des slalomeurs. »
More information about the inn-bugs
mailing list