* Cleanup methods or techniques
@ 2009-09-19 3:36 Felix
2009-10-06 19:22 ` Lorenzo Beretta
0 siblings, 1 reply; 2+ messages in thread
From: Felix @ 2009-09-19 3:36 UTC (permalink / raw)
To: runit
Hi all,
I am successfully using runit for a number of servers but have two
questions:
1. Is there an easy way to clean up the 'supervise' directory of lock
files etc for a service that is difficult? I occasionally have a service
that needs to be killed (using kill) and it leaves lock files. Is there
a command that cleans up a service directory for a fresh start?
2. In my process list I often read '/main permission denied' in the
runsvdir process line. I know what the problem is but I would like to
identify which service it is that has the problem as the log entry does
not mention it. Is there a way to identify log entries to services?
Thanks for any suggestions (or pointers to existing documentation which
I have obviously missed).
-felix
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Cleanup methods or techniques
2009-09-19 3:36 Cleanup methods or techniques Felix
@ 2009-10-06 19:22 ` Lorenzo Beretta
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Beretta @ 2009-10-06 19:22 UTC (permalink / raw)
To: supervision
Felix ha scritto:
> Hi all,
>
> I am successfully using runit for a number of servers but have two
> questions:
>
> 1. Is there an easy way to clean up the 'supervise' directory of lock
> files etc for a service that is difficult? I occasionally have a service
> that needs to be killed (using kill) and it leaves lock files. Is there
> a command that cleans up a service directory for a fresh start?
uh? Please define "difficult", or tell us what service it is - you never
know, someone might have strugggled against it before you :D
Most likely you need to take a look at the "CONTROL" section of the
runsv manpage.
As for supervise - lock files are not troublesome for a "clean start"
(whatever that means): they are only there to ensure that only one runsv
process is supervising a directory (can you imagine what an awul mess it
would be otherwise?), but it is *not* their existence that makes a lock,
it's the fact that the file is locked by a runsv process (man 2 flock) -
when no runsv is running, the file still exists, but it's not locked.
It may make little sense if you're not a programmer.
>
> 2. In my process list I often read '/main permission denied' in the
> runsvdir process line. I know what the problem is but I would like to
> identify which service it is that has the problem as the log entry does
> not mention it. Is there a way to identify log entries to services?
1. Compile from the source, and hack svlogd.c to print some meaningful
information - eg insert a call to getcwd, or getppid().
2. Request an option to do this.
3. Write a small script that checks what you setuidgid/chpst-u to, and
have it check if "ls -l yourlogdir" matches that username, or something
like that.
>
> Thanks for any suggestions (or pointers to existing documentation which
> I have obviously missed).
>
> -felix
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-06 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-19 3:36 Cleanup methods or techniques Felix
2009-10-06 19:22 ` Lorenzo Beretta
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).