Re: Path monitoring support in s6-services

2021-02-17 Thread Ben Franksen
Am 17.02.21 um 10:26 schrieb Casper Ti. Vector:
> On Wed, Feb 17, 2021 at 01:08:44PM +0530, billa chaitanya wrote:
>> I am trying to start a service when a file/path is
>> modified/touched/created.Do we have any mechanism in s6 that supports
>> enabling a service up on monitoring a path?
> 
> inotifyd (or something similar) + s6-svc (or s6-rc)?

You can also write your own specialised daemon with a simple shell
script a la

inotifywait -q -m ... | while true; do
  # get the next event:
  event=$(head -1)
  ...
done

I am using this method in a production system.

Cheers
Ben



Re: Path monitoring support in s6-services

2021-02-17 Thread Laurent Bercot

Since it requires individual instances of inotifyd for each service(s)
[which depends on  multiple files/paths modifications) to get started]


 Have you tried it and noticed an impact on your boot times?
(AKA: "Profile, don't speculate.")

--
 Laurent



Re: Path monitoring support in s6-services

2021-02-17 Thread billa chaitanya
>
>
>   What makes you think this would have a noticeable impact on your CPU
> load?
>

Since it requires individual instances of inotifyd for each service(s)
[which depends on  multiple files/paths modifications) to get started]

On Wed, Feb 17, 2021 at 5:36 PM Laurent Bercot 
wrote:

> >>  inotifyd (or something similar) + s6-svc (or s6-rc)?
> >Thought of the same but I have many such services;Just thinking of cpu
> >overhead during the initial boot up.
>
>   What makes you think this would have a noticeable impact on your CPU
> load?
>
> --
>   Laurent
>
>


Re: Path monitoring support in s6-services

2021-02-17 Thread Laurent Bercot

 inotifyd (or something similar) + s6-svc (or s6-rc)?

Thought of the same but I have many such services;Just thinking of cpu
overhead during the initial boot up.


 What makes you think this would have a noticeable impact on your CPU
load?

--
 Laurent



Re: Path monitoring support in s6-services

2021-02-17 Thread billa chaitanya
>
> inotifyd (or something similar) + s6-svc (or s6-rc)?
>
Thought of the same but I have many such services;Just thinking of cpu
overhead during the initial boot up.

Thanks,
Chaitnaya

On Wed, Feb 17, 2021 at 2:57 PM Casper Ti. Vector 
wrote:

> On Wed, Feb 17, 2021 at 01:08:44PM +0530, billa chaitanya wrote:
> > I am trying to start a service when a file/path is
> > modified/touched/created.Do we have any mechanism in s6 that supports
> > enabling a service up on monitoring a path?
>
> inotifyd (or something similar) + s6-svc (or s6-rc)?
>
> --
> My current OpenPGP key:
> RSA4096/0x227E8CAAB7AA186C (expires: 2022.09.20)
> 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
>
>


Re: Path monitoring support in s6-services

2021-02-17 Thread Casper Ti. Vector
On Wed, Feb 17, 2021 at 01:08:44PM +0530, billa chaitanya wrote:
> I am trying to start a service when a file/path is
> modified/touched/created.Do we have any mechanism in s6 that supports
> enabling a service up on monitoring a path?

inotifyd (or something similar) + s6-svc (or s6-rc)?

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2022.09.20)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C



Path monitoring support in s6-services

2021-02-16 Thread billa chaitanya
Hi Team,

I am trying to start a service when a file/path is
modified/touched/created.Do we have any mechanism in s6 that supports
enabling a service up on monitoring a path?

Thanks,
Chaitanya