Hi,
While trying to get the log server working for logging to network, I found some problems/bugs... And here is my report:
L4DIR/pkg/log_net/server/src/tcpip.c: l.96 : in #define INITDRV(drv) the called function can give an error, but this error is just ignored (fct. init_ethernet always returns 0)
l.264: (closing etherdev on error) if you select a wrong driver in init_ethernet, the system boot will fail with strange output over and over again (maybe just logging to normal console and go on booting is more desired??)
L4DIR/pkg/log/server/src/logserver.c l.45: initializing buffer for net output if the buffer size is not given explicitly as command line switch the later buffer size is 0(!! not 4096 as expected). Therefore the logging to the network will not work. In order to prevent this you should put some lines right after parsing command line parameters in main(), e.g.: // if flushing to net && no buffer_size specified, use an initial value if (flush_to_net && !buffer_size){ buffer_size = 4096; }
(or you should document it somewhere)
BTW: to use the correct driver in init_ethernet for vmware, you should use "vlance" as network setting in vmware and "INITDRV(lance)" in init_ethernet, the drivers for 3com cards are not called 3c??? as I expected but can be used with "INITDRV(etherlink<??>)" with <??>="","2","3","16","plus" or "INITDRV(vortex)". In my opinion this should be documented somewhere. (in case it is already, and I was just too stupid to find it, ignore this remark...)
Problem when using the logging to network within a program that uses the parse_cmd library I can't explain why this is the case, but when you use the log server compiled for network output and afterwards start an application that uses "parse_cmdline" the logging will not go to network, but to local console (even if you specify "-nolocal" on the log server). If you're interested in this bug, I can send you my sample code which is just a modification of rt_sched example in the hello-package
Regards, Rene
Hi Rene,
While trying to get the log server working for logging to network, I found some problems/bugs...
Thank you for the hints. Actually, I am leaving the group, and I am not shure whether the net-log is a priority project someone is willing to spend time on maintaining. Nonetheless, your remarks are well conserved, and patches are welcome.
Problem when using the logging to network within a program that uses the parse_cmd library
This is strange, indeed. The log output, appears it normally, or does it have an asterisk in front? The fall-back of the log-lib is to output the data locally, if no log server is found within some time interval (both local log-server and networked version). Although, this fall-back will be indicated with an '*' in front of each line.
Further, is the output of every program local, or only that of the one using the parse_cmd lib?
Kind Regards, Jork Loeser
Hi Jork,
On Fri, Apr 08, 2005 at 06:56:02PM +0200, Jork Loeser wrote:
Hi Rene,
While trying to get the log server working for logging to network, I found some problems/bugs...
Thank you for the hints. Actually, I am leaving the group, and I am not shure whether the net-log is a priority project someone is willing to spend time on maintaining. Nonetheless, your remarks are well conserved, and patches are welcome.
Maybe it's priority is not that high, but I think it's an easy to use log mechanism, especially when you don't want to do just debugging but some analysis of the "real" behaviour of your code. So as soon as I find time I will propose some patches.
Problem when using the logging to network within a program that uses the parse_cmd library
This is strange, indeed. The log output, appears it normally, or does it have an asterisk in front? The fall-back of the log-lib is to output the data locally, if no log server is found within some time interval (both local log-server and networked version). Although, this fall-back will be indicated with an '*' in front of each line.
No, it's seems to be no fall-back as there are no '*''s. The logserver says that it will output to net, but does only output locally (even when said '-nolocal'. And as said before no '*'.
Further, is the output of every program local, or only that of the one using the parse_cmd lib?
I use not really another program, my grub config looks like this:
title vmware rt_sched deadline miss .211 root (hd0,1) kernel /drops/drops/bin/x86_586/l4v2/rmgr -sigma0 module /drops/l4/kernel/fiasco/build/main -nokdb -nowait -serial -serial_esc -vmware module /drops/drops/bin/x86_586/l4v2/sigma0 modaddr 0x02000000 module /drops/drops/bin/x86_586/l4v2/names module /drops/drops/bin/x86_586/l4v2/log_net_lance -verbose -net -nolocal -ip 131.188.36.211 -buffer 4096 module /drops/drops/bin/x86_586/l4v2/dm_phys module /drops/drops/bin/x86_586/l4v2/rt_sched -l -m
(but even saying '-local' instead of '-nolocal' in log_net_lance gives the same behaviour)
BTW: maybe writing to a file locally for logging would be easier, but as far as I know there is no possibility to do so in DROPS?
Kind Regards, Rene
l4-hackers@os.inf.tu-dresden.de