From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2187 Path: news.gmane.org!not-for-mail From: Raymond Barlow Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit logging questions Date: Wed, 1 May 2013 13:41:32 +0100 Message-ID: References: <87vc73g22v.fsf@servo.finestructure.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd756de37853a04dba771ad X-Trace: ger.gmane.org 1367412116 11157 80.91.229.3 (1 May 2013 12:41:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 May 2013 12:41:56 +0000 (UTC) Cc: supervision To: Jameson Graef Rollins Original-X-From: supervision-return-2421-gcsg-supervision=m.gmane.org@list.skarnet.org Wed May 01 14:41:55 2013 Return-path: Envelope-to: gcsg-supervision@plane.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UXWM7-0007YR-HO for gcsg-supervision@plane.gmane.org; Wed, 01 May 2013 14:41:55 +0200 Original-Received: (qmail 2830 invoked by uid 76); 1 May 2013 11:34:32 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 2820 invoked from network); 1 May 2013 11:34:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=+4w4Wku3C73d1ZCeCR4hp2uW/7R1clJ+Ktm/vZGsMyU=; b=BCM4v4V61A87QkXx/sc5Bu1Jxiup1RzPy9ZoECuKzPDuLHbncazOh675AeuKmao6v3 Kzywg/FsLZs/gW0DXaOyRWnUB8rKG239r7Ld1RFvkjJY30rUE1UTYv+UgAheBO3Tbep/ ++4ze0YSzObm6IeV5yqzxBPJXYqs/q6/d78CfGUsjIRDO34wGfY/VzEkqpGPV4w0kmtr YOGFxMOjMIKEvHYrBDn6UKVj40kcI4lGBYR1MOdQSzAzDNHE7ymg8k26hVowC0o/+3uY 5LdsRLQskY298iGoE7BDZc62flrNyIscuCUwXyCs/vJ7xoI0opkVycZdJ8ngRnw4tMyR TSCQ== X-Received: by 10.50.120.102 with SMTP id lb6mr1545980igb.103.1367412112208; Wed, 01 May 2013 05:41:52 -0700 (PDT) Original-Sender: mrraymondbarlow@gmail.com In-Reply-To: <87vc73g22v.fsf@servo.finestructure.net> X-Google-Sender-Auth: dGZg3by51yt5F5vYUqrMZO3N6T0 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2187 Archived-At: --047d7bd756de37853a04dba771ad Content-Type: text/plain; charset=ISO-8859-1 Hi guys, Thanks both of you for your help. I finally found out what the root cause of problems was. I did this in this order: 1. Created the service directory 2. Symlink it to tell runit about the new service 3. Created the log directory At this point, no matter how many times I started/stopped the service, logging was not kicking in. I needed to remove the symlink created in (2), and recreate it. Then, hey presto, it was all working beautifully! FWIW--I didn't understand the key concept that runit was monitoring the service directory and looking for new symlinks to be created. Also, as a side note, in the FAQ for logging, it seems that the service that is being started is another logging tool (socklog-klog). This in itself was confusing for me, as it wasn't clear if this logging was part of the runit logging, or if it was just the service. So I guess what I'm saying here is maybe the documentation should be changed to log a different kind of process so it is clear what part of the script is required for logging and what is just other stuff. Cheers, Raymond On 30 April 2013 22:07, Jameson Graef Rollins wrote: > On Tue, Apr 30 2013, Raymond Barlow wrote: > > Logging: > > > > * Do you need to create 2 run scripts (/etc/sv/myservice/run, > > /etc/sv/myservice/log/run)? Or does the log/run supersede the > myservice/run > > script? > > The run and log/run scripts are completely distinct. The run script is > for exec'ing the actual supervised process, and the log/run script is > for exec'ing the corresponding svlogd process. > > > * The directory specified in the log run script to svlogd (eg > ./main)--does > > this live in the log directory? > > Yes: log/main/ > > > * Do I need to create the log directory or does the svlogd directory do > > that for me > > Usually the log/run script creates it if it doesn't exist. > > Pretty much all of my services use this same log/run script: > > #!/bin/sh > set -e > LOG=$(readlink -f ./main) > test -d "$LOG" || mkdir -p -m0750 "$LOG" > exec svlogd -tt "$LOG" > > jamie. > --047d7bd756de37853a04dba771ad--