Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89212 - metalog init.d script addition
Summary: metalog init.d script addition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-15 12:30 UTC by Max Loparev
Modified: 2005-04-16 22:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Loparev 2005-04-15 12:30:02 UTC
I offer to add runtime switching of sync/async mode to init.d/metalog

opts="${opts} async sync"

async() {
        ebegin "Switching to async mode"
        kill -USR2 $(</var/run/metalog.pid)
        eend $?
}

sync() {
        ebegin "Switching to sync mode"
        kill -USR1 $(</var/run/metalog.pid)
        eend $?
}
Comment 1 SpanKY gentoo-dev 2005-04-15 15:32:00 UTC
that support is already in metalog ... the functions are 'buffer' and 'unbuffer'
Comment 2 Max Loparev 2005-04-16 11:37:32 UTC
can you write an example how i can use this functions from command line or point me to some doc about this?
Comment 3 Max Loparev 2005-04-16 11:54:41 UTC
ok just has emerged -u metalog but found that signals not conformed to the manual

README.gz >>

If you temporarely want to switch to the asynchronous mode, send an USR2
signal to the process. Something like :

kill -USR2 $(cat /var/run/metalog.pid)

should do the trick.

Later, if you want to watch activity in real-time (like a good old "tail -f"
on a log file), you can disable buffering. Just send an USR1 signal to the
"MASTER" process. You can always re-enable buffering afterwards.
Comment 4 SpanKY gentoo-dev 2005-04-16 22:33:00 UTC
swapped USR1 for USR2