From owner-freebsd-fs@FreeBSD.ORG Mon Aug 30 20:55:38 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B14A610656BA for ; Mon, 30 Aug 2010 20:55:38 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 43DA28FC0C for ; Mon, 30 Aug 2010 20:55:37 +0000 (UTC) Received: by eyx24 with SMTP id 24so3913809eyx.13 for ; Mon, 30 Aug 2010 13:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:user-agent:mime-version:content-type; bh=1ZNsjc1rliYZ4x4HrIFcRyvUhr8ZXqbdUYVtNUfAif4=; b=dM6DYofsTlmZenWL6GksLLyzUEmC5f7dbhJlyQ0QTBkoPfzXnQJ097kpMl12ctdgXW ROmMsPQleIf5ITLKZxBC7PJyCUCTuk6UAIIDqSyaUH5ocopikl93AchpvIgmPJrH9Ktw pXJ+wt2k9rTaDjykBimg4hbOyDSSZd890mcF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=eIFfTgEV5wFxjsdQuAP1FzIAlptbzF8Y++nfSaGAJQqXjaBps1z3MPh6cFMWXBsBpv suC2i1pBGJyIT3qCtHmdAwD+AKA2HWbWPqTtVB29XIMNTUVrjwgaq9C+TR0os8MxSNWv WK241JLH0zD7wTpUNLQJQGOp1eD55O+ghKMrI= Received: by 10.213.98.84 with SMTP id p20mr118099ebn.59.1283200066208; Mon, 30 Aug 2010 13:27:46 -0700 (PDT) Received: from localhost ([95.69.170.24]) by mx.google.com with ESMTPS id z55sm12679177eeh.3.2010.08.30.13.27.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 13:27:45 -0700 (PDT) From: Mikolaj Golub To: freebsd-fs@freebsd.org Date: Mon, 30 Aug 2010 23:27:42 +0300 Message-ID: <8639tv6e2p.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: hastd: log the process id X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 20:55:38 -0000 --=-=-= Hi, Currently hastd does not log the process id with each message, although it might be useful in some cases. And it looks like most of our daemons do this. The patch below adds pid logging. Also it fixes wrong log message in secondary. -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=hastd.patch Index: secondary.c =================================================================== --- secondary.c (revision 212008) +++ secondary.c (working copy) @@ -556,7 +556,7 @@ recv_thread(void *arg) if (hast_proto_recv_data(res, res->hr_remotein, hio->hio_nv, hio->hio_data, MAXPHYS) < 0) { secondary_exit(EX_TEMPFAIL, - "Unable to receive reply data"); + "Unable to receive request data"); } } pjdlog_debug(2, "recv: (%p) Moving request to the disk queue.", Index: pjdlog.c =================================================================== --- pjdlog.c (revision 212008) +++ pjdlog.c (working copy) @@ -57,6 +57,9 @@ pjdlog_mode_set(int mode) assert(mode == PJDLOG_MODE_STD || mode == PJDLOG_MODE_SYSLOG); pjdlog_mode = mode; + + if (mode == PJDLOG_MODE_SYSLOG) + openlog (NULL, LOG_PID, LOG_DAEMON); } /* --=-=-=--