supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Logging everything in the database
@ 2004-09-23  8:47 rolphin
  2004-09-23 10:36 ` Laurent Bercot
  0 siblings, 1 reply; 3+ messages in thread
From: rolphin @ 2004-09-23  8:47 UTC (permalink / raw)


Hi everyone,

I've worked on a tool to log everything in mysql or pgsql database.
It may be used instead of/with a multilog/svlogd process on the main
svcan/runsvdir process. (think about replacing the readproctitle...)

I convert the taia64 date format into the sql equivalent.

I wanted to have it launched at the system boot, but I still wanted it to be
supervised. So I fell back on using a fifo and opening it RDWR on Linux to no
block the main process (writing to a pipe not opened RDWR when the reader isn't
started blocks...).

You can find more about it on http://rolphin.expert-gamers.com/notify.html,
(for now the page is in french, if anyone is interested I will be pleased to
rewrite it english).

So tell me about this idea, what do you think about it, and what could be wrong
with it...

PS: if you use the download link you may not be able to compile the tool as is,
since I may have forget to include some libowfat function of mine ... But I
will correct this as soon as I get feedback ;p

See ya.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging everything in the database
  2004-09-23  8:47 Logging everything in the database rolphin
@ 2004-09-23 10:36 ` Laurent Bercot
  2004-09-23 13:13   ` rolphin
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Bercot @ 2004-09-23 10:36 UTC (permalink / raw)


> I wanted to have it launched at the system boot, but I still wanted it to be
> supervised. So I fell back on using a fifo and opening it RDWR on Linux to no
> block the main process (writing to a pipe not opened RDWR when the reader isn't
> started blocks...).
> So tell me about this idea, what do you think about it, and what could be wrong
> with it...

 I've done the exact same thing, to log svscan's stderr using a supervised
multilog. Except that O_RDWR on a fifo isn't portable - it has no real
Unix meaning; you'd better use 2 fds, one reading, one writing. I've
designed a small tool to do just that: see <URL:
 http://www.skarnet.org/software/execline/redirfd.html >

-- 
 Ska


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging everything in the database
  2004-09-23 10:36 ` Laurent Bercot
@ 2004-09-23 13:13   ` rolphin
  0 siblings, 0 replies; 3+ messages in thread
From: rolphin @ 2004-09-23 13:13 UTC (permalink / raw)


Quoting Laurent Bercot <ska-supervision@skarnet.org>:
> > started blocks...).
> > So tell me about this idea, what do you think about it, and what could be
> wrong
> > with it...
>
>  I've done the exact same thing, to log svscan's stderr using a supervised
> multilog. Except that O_RDWR on a fifo isn't portable - it has no real
> Unix meaning; you'd better use 2 fds, one reading, one writing. I've
> designed a small tool to do just that: see <URL:
>  http://www.skarnet.org/software/execline/redirfd.html >

 Great, thx, I'll use it, and will soon update my notify package with it.






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-23 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23  8:47 Logging everything in the database rolphin
2004-09-23 10:36 ` Laurent Bercot
2004-09-23 13:13   ` rolphin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).