Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trXli-005IUX-Fp for pgsql-general@arkaria.postgresql.org; Mon, 10 Mar 2025 07:41:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1trXlh-005goA-6s for pgsql-general@arkaria.postgresql.org; Mon, 10 Mar 2025 07:41:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trXlg-005go2-SV for pgsql-general@lists.postgresql.org; Mon, 10 Mar 2025 07:41:44 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1trXld-001zGE-2d for pgsql-general@lists.postgresql.org; Mon, 10 Mar 2025 07:41:43 +0000 Content-Type: multipart/alternative; boundary="------------MKaNssjrKBgu5Ue8geVJH2Uv" Message-ID: <39fb36d5-1583-49ba-98ae-d71002fedb65@cloud.gatewaynet.com> Date: Mon, 10 Mar 2025 09:41:38 +0200 MIME-Version: 1.0 Subject: Re: No. Of wal files generated To: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------MKaNssjrKBgu5Ue8geVJH2Uv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/7/25 17:59, Atul Kumar wrote: > Hi, > > Please could you help me by sharing any redhat linux command through > which I can count the no. of wal files and no. of ".ready" files > generated in last 10 minutes. Do you have wal archiving enabled? If yes, then simply go to the archive dir and suit your self with find , ls, grep, awk, sort , unic -c , etc . Find files created in the last 10 mins : find -cmin 10 to get statistics over time : ***CLOUD*** jboss@sma:/smadb/smadb/pgsql/pitr$ ls -lt | head -10 total 629962796 -rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000078 -rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000077 -rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000076 -rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000075 ... you may use : ls -lt | awk '{print $6""$7"_"substr($8,1,2) }' | sort | uniq -c | less to get the distribution over (group by) 1 hour intervals > > > > Regards, > Atul --------------MKaNssjrKBgu5Ue8geVJH2Uv Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 3/7/25 17:59, Atul Kumar wrote:
Hi,

Please could you help me by sharing any redhat linux command through which I can count the no. of wal files and no. of ".ready" files generated in last 10 minutes.

Do you have wal archiving enabled? If yes, then simply go to the archive dir and suit your self with

find , ls, grep, awk, sort , unic -c , etc .

Find files created in the last 10 mins :

find -cmin 10

to get statistics over time :

***CLOUD*** jboss@sma:/smadb/smadb/pgsql/pitr$ ls -lt | head -10
total 629962796
-rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000078
-rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000077
-rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000076
-rw------- 1 postgres postgres 16777216 Mar 10 09:32 000000010000472D00000075

...

you may use :

ls -lt | awk '{print $6""$7"_"substr($8,1,2) }' | sort | uniq -c | less

to get the distribution over (group by) 1 hour intervals




Regards,
Atul
--------------MKaNssjrKBgu5Ue8geVJH2Uv--