Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CABEA200C22 for ; Tue, 21 Feb 2017 15:15:39 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C9588160B68; Tue, 21 Feb 2017 14:15:39 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1CDBA160B3E for ; Tue, 21 Feb 2017 15:15:38 +0100 (CET) Received: (qmail 88658 invoked by uid 500); 21 Feb 2017 14:15:37 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 88648 invoked by uid 99); 21 Feb 2017 14:15:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2017 14:15:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 623D01A0060 for ; Tue, 21 Feb 2017 14:15:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.59 X-Spam-Level: ** X-Spam-Status: No, score=2.59 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, T_DKIM_INVALID=0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=neutral reason="invalid (public key: invalid data)" header.d=ymkatz.net Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TpfX7ETssHkU for ; Tue, 21 Feb 2017 14:15:32 +0000 (UTC) Received: from mail-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 383905F613 for ; Tue, 21 Feb 2017 14:15:32 +0000 (UTC) Received: by mail-ot0-f171.google.com with SMTP id x10so49421613otb.1 for ; Tue, 21 Feb 2017 06:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymkatz.net; s=g; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=I5PtiDiROM1oOZHVVwqhtgz0KP6qY/r0MF6/MEyskaM=; b=F+DN5iPhctTwXnyNwcugF3qddCDAiEaMaX96px9YRohxdLkEfPUhzY8DrsUgi0l0XZ +/jtsRxQCQ+Of8VO5mDFPDNGhRaOcRFPcdZMe2PQUsYMZGoPyDLYEMO3rX5X+NgMsBJl P/wYfva1oUa3dNKBK/r9US5OvdTsTNo/WdvLE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=I5PtiDiROM1oOZHVVwqhtgz0KP6qY/r0MF6/MEyskaM=; b=qYgcBhTXj/wTWyGorACkj7phIA/OrrHxYiWyXs1Ui9RZUuCmaEFkFipgyWhSr3A79J gLApHkH16U7R+uJb5kHKEBbT5Y/qo/S71mGqKoqx9iU+XmzZzGTmeAu+Wt0WfqWri5b4 fKByiWmQwRxzMsXRFC4+Lvr7YVLAr9fo32L49THhMo9Buc2IYI1iYRp7gaNdsUoneFFU hroom1z32QaK3VBPgbngVwJSOSL6+/iOTElOHrBjNTPwaouccLZMbLyEWqvhchsDzcLi LCOiOVvJCUtE+blFASPp7ZUgI9jzfH14NJiafpzYIcHVANtOY1WS1SiFt4/uH265yFfR B1Tg== X-Gm-Message-State: AMke39nCd3ePVpo9fumi6Yb8RFJ1xVPQA+UEGYAEpUrWcdWCY5GT/XMXwovzO7GDtLrkW3bL X-Received: by 10.157.44.151 with SMTP id p23mr7956723otb.70.1487686528378; Tue, 21 Feb 2017 06:15:28 -0800 (PST) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id m35sm7518846otm.43.2017.02.21.06.15.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 06:15:27 -0800 (PST) Received: by mail-oi0-f45.google.com with SMTP id 62so53785874oih.2 for ; Tue, 21 Feb 2017 06:15:27 -0800 (PST) X-Received: by 10.202.63.7 with SMTP id m7mr14659178oia.170.1487686527619; Tue, 21 Feb 2017 06:15:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.6.133 with HTTP; Tue, 21 Feb 2017 06:15:27 -0800 (PST) Received: by 10.202.6.133 with HTTP; Tue, 21 Feb 2017 06:15:27 -0800 (PST) In-Reply-To: References: From: Yehuda Katz Date: Tue, 21 Feb 2017 09:15:27 -0500 X-Gmail-Original-Message-ID: Message-ID: To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=001a113dd402041c4d05490b03a4 Subject: Re: [users@httpd] apache run status: how to tell as non-root user (on *nix)? archived-at: Tue, 21 Feb 2017 14:15:40 -0000 --001a113dd402041c4d05490b03a4 Content-Type: text/plain; charset=UTF-8 That grep would not work on Debian-style packages because they show apache2 as the executable but it might be the best way on other systems. - Y Sent from a device with a very small keyboard and hyperactive autocorrect. On Feb 21, 2017 8:54 AM, "Tom Browder" wrote: > I need to programatically determine whether httpd is running or not, > whether I'm root or not. The only reliable way I have found is to use the > system command 'ps -C httpd' and grep the results. > > Is there a better way? > > Thanks. > > Best regards, > > -Tom > --001a113dd402041c4d05490b03a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That grep would not work on Debian-style packages because= they show apache2 as the executable but it might be the best way on other = systems.

- Y

Sent from a device with a very small ke= yboard and hyperactive autocorrect.
<= br>
On Feb 21, 2017 8:54 AM, "Tom Browder&qu= ot; <tom.browder@gmail.com&= gt; wrote:
I need t= o programatically determine whether httpd is running or not, whether I'= m root or not. The only reliable way I have found is to use the system comm= and 'ps -C httpd' and grep the results.

Is there= a better way?

Thanks.

Be= st regards,

-Tom
--001a113dd402041c4d05490b03a4--