From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8551 invoked from network); 20 Oct 2021 18:01:41 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2021 18:01:41 -0000 Received: (qmail 22797 invoked by uid 89); 20 Oct 2021 18:02:05 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 22789 invoked from network); 20 Oct 2021 18:02:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=xpEYVJ7XiKUdjNh3lSsm4pDrduCyQT92y2aFCVplI8o=; b=IwggRl84zpk1dyUBlsYR8ZO0/X9NlUUvwEld4djSJHJPz+SerCKhp8sNTrnNRxin48 mI7S8fVGR0knbekkIhSJzjoRRX1TgMKIKBtiwGpz2csNYGWMqdu23lOyjWXGJv7Hbfq7 7WqqDn/KgBUwYY8d7ZAS+bM5806+8tmT6ckSZosVoJ6jEedFPLGbmdazfQ/1603UTpjt bEwsGKIO2N++VDYx+f0MHqeiiHKAyras3PrEZZZyjcKt9Cu7SelREg1/UIKrSlha8IBo b2VK+8d1+Dls6JDe6MbPtRcI8HYFcurh/5G5tIk+DVg5FLWrInfEI5oET3pdmjj3gkMP 5TLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=xpEYVJ7XiKUdjNh3lSsm4pDrduCyQT92y2aFCVplI8o=; b=uYfwGeSVx6lVJAROyfy+bz35MzUBahGT+Oxzrf4R6VZVsaliyY1/C3QSxFh2GsfKOW uBMiImWTNySeb4gwaJPURvhrsF4QY8Oq6cffA+bbGQRV5iKBlag7AgboKFV7pUu02Wsi 2nIPpYiKwn2ua2nTLT8XegExHz2v13jdyypmgKHs8SlPDxYbV0SkxCk9pnnNmDvmfzdd K26F+rvK6KKBFM6+pXLYwKa+q3bb1W7TsA50wB+h55IRjbayVBHv1RS3DHOgqDVzowdk qTh9bcUefky6gxEv0IKL4OZeTLIq/pZBBWFMU+n5DVLtfqzss/mbxe7MnPVn1cjv/jeZ OS+w== X-Gm-Message-State: AOAM531nILSBSRAfsXaZF3NOyRmkMkbimESwWqDemg7Fyw+iqFYk2UbV kCizfFYcx9Ljy07zfph1PUaOfUhuQkA= X-Google-Smtp-Source: ABdhPJy0wbqNdi/ks/PIniYIYDHL6dsEpj6dctzAQEDj59yTtARh6gr4D5K/mjTzvMDbuE0d8BmveQ== X-Received: by 2002:a17:902:a710:b029:12b:9b9f:c461 with SMTP id w16-20020a170902a710b029012b9b9fc461mr536642plq.59.1634752896376; Wed, 20 Oct 2021 11:01:36 -0700 (PDT) From: "Casper Ti. Vector" X-Google-Original-From: "Casper Ti. Vector" Date: Thu, 21 Oct 2021 02:01:29 +0800 To: supervision@list.skarnet.org Subject: Re: logging services with shell interaction Message-ID: Mail-Followup-To: supervision@list.skarnet.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Wed, Oct 20, 2021 at 09:53:58AM +0200, Ben Franksen wrote: > Interesting, I didn't know about recordio, will take a look. Hello from a fellow sufferer from EPICS. (If you see a paper on some synchrotron-related journal in a few months that mentions "automation of automation", it will be from me, albeit not using a pseudonym. Another shameless plug: .) As has been said by Laurent, in the presence of a supervision system with reliable logging and proper rotation, what `procServ' mainly does can be done better by something like `socat' which wraps something like `recordio', which in turn wraps the actual service process (EPICS IOC). The devil is in the details: most importantly, when the service is to be stopped, the ideal situation is that the actual service process gets killed, leading to the graceful exit of `recordio' and then `socat'. So the two wrapping programs need to propagate the killing signal, and then exit after waiting for the subprocess; since `procServ' defaults to kill the subprocess using SIGKILL, `recordio' also needs to translate the signal if this is to be emulated. `socat' does this correctly when the `sighup'/`sigint'/`sigquit' options are given for `exec' addresses, but its manual page does not state about SIGTERM. `recordio' does not seem to propagate (let alone translate) the signal; additionally, its output format (which is after all mainly used for debugging) feels too low-level to me, and perhaps needs to be adjusted. At the facility where I am from, we use CentOS 7 and unsupervised procServ (triple shame for a systemd opponent, s6 enthusiast and minimalist :(), because we have not yet been bitten by log rotation problems. It also takes quite an amount of code to implement the dynamic management of user supervision trees for IOCs, in addition to the adjustments needed for `recordio'. To make the situation even worse, we are also using procServControl; anyway, I still hope we can get rid of procServ entirely someday. -- My current OpenPGP key: RSA4096/0x227E8CAAB7AA186C (expires: 2022.09.20) 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C