Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmslS-0007ND-Gl for pgsql-admin@arkaria.postgresql.org; Wed, 09 Dec 2020 06:15:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmslR-0007r9-FE for pgsql-admin@arkaria.postgresql.org; Wed, 09 Dec 2020 06:15:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmslR-0007r2-7v for pgsql-admin@lists.postgresql.org; Wed, 09 Dec 2020 06:15:49 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kmslP-0006wM-0t for pgsql-admin@lists.postgresql.org; Wed, 09 Dec 2020 06:15:48 +0000 Received: by mail-ot1-x336.google.com with SMTP id q25so306499otn.10 for ; Tue, 08 Dec 2020 22:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=bjvqpnee346XsSZ128VwGX1kUDPdYSc+usL6eRbvlbw=; b=NEYjOOZB0bOrRr1Q8HTDvVM2J1XSgR12Xq2NGOxTdB/7I/A9xGQbghuAXCI1l/OBcw 5lwdMyNU2efkiLtWClvnXuc9r+C8VDUC3H0ogaFojqeMzDdNQII8t70kgKEbmIILoWRd fUG3oFriSUi4u66c6y1X/clvI8EW0zeq1b+PM6OY5h6cV+VPybRKr57Ip+nevSxSI7b7 wY3GPybd22K1D2fjm3fn1Q899fwfZvd60nrQ+tU0nZu7gs47Y3uhNR0InH8O21eILueS f0wlN+GZjfjzZf3jbMw1bmZJ1McmulvfWN59hR8UZGYiLiqfQQRzPvYxobWVLSlIaCKu nakQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=bjvqpnee346XsSZ128VwGX1kUDPdYSc+usL6eRbvlbw=; b=LasueBsnDodoHOh0Ou28YoTGER7mn9nFexx4GVu059/TGzxdNfUoUOtkklcGsEvCO2 39SwzhbNSAqnCU+e2FsdScTgZnutQY+4Q2V7fS01RuoXFJ4gXxiNVu6p8YtJI9lZTcDo MAT4xPB1WR4f9mNRNteYfqkI0T7qe3trDUepdvU5qO17MByxiSaoBf7WETM6d1szdksa fdi33Br/+3mFHZPWwcnAAT1OnpaESQ3q8eHUfU3dwg1amCt+RTFPEqHH4wVMCAPWKvq2 0wMosfXQKswRPN2xE5YDyZR94cc2ApV+tx4ippY7jIu9IqPERWpaM7MAzIv/jvcivstl 6oGA== X-Gm-Message-State: AOAM5327rS8e4zXfwZMR89IQVVRnHFLR6mT3y2V3q6V9ovITv5KZ+N3t +TiVvovaK86uXB/Ni+EAZIa3WTf1E6R26g== X-Google-Smtp-Source: ABdhPJw1EpWOtkq9LMb82XB5tkT0u8DxJdYtEJsp5zAZwh9ACbfctyBkplIcgiQh+X/WZF43g3MfJg== X-Received: by 2002:a9d:3e82:: with SMTP id b2mr478036otc.329.1607494546040; Tue, 08 Dec 2020 22:15:46 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id p8sm164602oig.22.2020.12.08.22.15.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Dec 2020 22:15:45 -0800 (PST) To: Pgsql-admin From: Ron Subject: Better generic method of finding all installed Postgres versions? Message-ID: <4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com> Date: Wed, 9 Dec 2020 00:15:44 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk pg_lscluster is great, but it's Debian/Ubuntu specific. $ realfs=$(df -x tmpfs -x devtmpfs | tail -n +2 | awk '{print $6;}' | xargs) $ find ${realfs} -xdev -type f -name pg_ctl |& grep -v "Permission denied" This works on both Ubuntu 18.04 and RHEL 8.3 (the only systems I have access to), but wonder if there's a Better Way.  (I didn't grep  netstat because the cluster might not be running.) Thanks -- Angular momentum makes the world go 'round.