Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How does metalog work?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Sun Jun 01, 2003 3:32 am    Post subject: How does metalog work? Reply with quote

I've read the intall guide and searched a few times on the forum and google, but this metalog thing is confusing me. My head hurts.
I want to be able to tail -f /var/log/messages (I figure that would be /var/log/everything/current on metalog) just like in syslog but it's not that 'realtime' as I expected. I tried "killall -USR1 metalog" and tailed the /var/log/everything/current but when I plug in my usb camera and my phone I get no messages from the kernel. How the heck does this work?? 8O
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Sun Jun 01, 2003 4:50 am    Post subject: Reply with quote

Metalog has a built in buffer to improve system performance. Honestly if your more comfortable with syslog then you should move to syslog-ng. The main reason, well although metalog is very easy to configure, it has been dead for sometime now. Notice the version number that you have isn't even at the 1.0 stage....

If you want to stick to metalog, just edit the file /etc/conf.d/metalog and just add a -s there like the file suggests. This will turn off buffering for good.

Chris
Back to top
View user's profile Send private message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Sun Jun 01, 2003 12:15 pm    Post subject: Reply with quote

hmmm, I've put the -s on:
Code:
# Add '-s' if you dont want buffering.  (See things realtime)
METALOG_OPTS="-Bs"

and I've tailed /var/log/everything/current and I'm not getting any realtime logs whenever I plugin some devices 8O .... I've also tried restarting metalog /etc/init.d/metalog restart and still I can't get any response :?
Back to top
View user's profile Send private message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Mon Jun 02, 2003 6:40 am    Post subject: Reply with quote

doh* it looks like I'm not getting any messages cause hotplugging isn't on, it's working fine now afterall, Thanks :) But I'm still curious on how the buffering work?? :?:
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Mon Jun 02, 2003 10:46 am    Post subject: Reply with quote

Basically it keeps some of the newest messages in memory for a while so that it can prevent itself from writing to the hard disk all the time. With syslog and the like, you always have hard drive activity because as soon as it gets a message it writes it to a log file. metalogs buffer system stores the most recent logs, to be kinda simple here, in the ram and then when its ready writes it to the hard drive. This type of system can really help performance, however, its not good when you are trying to debug things such as a system crash because you cant see your most recent logs because they are actually stored in the ram....


Chris
Back to top
View user's profile Send private message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Mon Jun 02, 2003 11:02 am    Post subject: Reply with quote

That sounds good, but is there a way to view those logs from the ram? :?:
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Mon Jun 02, 2003 3:03 pm    Post subject: Reply with quote

No, you just have to kill the buffer.....
adding the -s in /etc/conf.d/metlog

And the explaination of "storing logs in ram" was just for illustrative purposes only, it actually just stores the information not the actual log files. And it could also be some other location besides the ram??

Chris
Back to top
View user's profile Send private message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Tue Jun 03, 2003 10:13 am    Post subject: Reply with quote

hmmm, I see...I should've picked syslog instead, oh well.. Thanks a lot ctford0! :D
Back to top
View user's profile Send private message
Slynix
n00b
n00b


Joined: 11 May 2003
Posts: 67

PostPosted: Tue Jun 03, 2003 12:28 pm    Post subject: Reply with quote

dunno if youv fixed it but this should be correct:

Code:

# Add '-s' if you dont want buffering.  (See things realtime)
METALOG_OPTS="-B -s"

_________________
a big bear hug
Back to top
View user's profile Send private message
Elijah
n00b
n00b


Joined: 19 Apr 2003
Posts: 29
Location: Philippines

PostPosted: Wed Jun 04, 2003 5:38 am    Post subject: Reply with quote

It works just fine :) but thanks anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum