aMule Forum
English => aMule Help => Topic started by: Kisja on June 23, 2005, 06:10:07 PM
-
Hi,
How does the output of amuled work? When I run amuled without any options, I get the output (error messages and so on) in the console. I would like to write these messages to a separate logfile. But if I run
"amuled >/tmp/log_amuled 2>/tmp/log_amuled_err"
or
"amuled -o >/tmp/log_amuled 2>/tmp/log_amuled_err"
the logfiles are empty.
I ve also tried to run amuled as the (yes existing) amule user with su:
su -c "(/usr/local/amuled -o >/tmp/log_amuled 2>/tmp/log_amuled_err)" amule
The logfiles are still empty when using su, but only until amuled stops (?!?!?!), when amuled ist stopped, the whole output is written to the logfile at once.
If I use -f (fork) the file /home/amule/.aMule/logfile ist also empty.
Is this the right behaviour? Are there any other Options I could use?
Regards,
Kisja
-
I think what's happening is that output to files is being buffered while output to the terminal is unbuffered, or maybe line buffered.
I don't know if this is a function of how the shell does output redirection, or if amuled should be doing something differently internally.
-
well if you look at the log from amuleweb it works actually....
-
Hi,
@ken: ok this could be the reason.
I use /bin/sh, is it possible to configure this function?
@stefanero: Not really, if I run amuleweb with
"amuleweb >>/var/log/amuleweb_log"
"cat /var/log/amuleweb_log"
Erstelle Client...
Verbindung wird hergestellt....
Benutze Host 'localhost' Port: 4712
Versuche zu verbinden (Timeout = 10sek)...
Verbindung hergestellt zu aMule 2.0.3
---------------------------------
| aMule Web Server |
---------------------------------
Benutze 'Help' für eine Liste der Kommandos
Webserver: gestartet
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
WSThread: Thread started
WSThread: created service
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
aMuleweb$ Syntax Fehler!
........................
And the logfile grows VERY FAST!
Any Ideas?
-
noooo ;)
I said it a little wrong....
I mean run amuleweb normal with
amuleweb -q &
for example
then open a browser, login and then select log, or server log or debug log....those 3 logs can be read from within amuleweb
stefanero
-
aaahh, ok!
But log and debuglog are equal (I see always the same log)!?
-
I think only when you have debug enabled they differ....
there is in the gui-preferences a setting to enable it, but not sure howtodo that with amuled, sorry
but if you have no problems with amuled leave it disabled since it eats a lot of cpu...
stefanero
-
How is this option called in the amule.conf? I could try to add it manually for amuled.
-
I dont have debug enabled sorry,
since it eats to much cpu and most infos are only good for Kry Xaignar and a couple other...
-
when running with "-f" or "--full-daemon" there's nothing on stdout, since process is detaching from controlling terminal and stdio is redirected to /dev/null.
-
Sure, but if I use -f the ~/.aMule/logfile ist empty! Is that a Bug?
-
Hmm, actually it happens to me too. I think logfile doesn't get flushed right. You can use webserver to see it. And yes, I will fix it eventually.