From: "Lewis G Rosenthal" Received: from [192.168.100.201] (account lgrosenthal@2rosenthals.com HELO [192.168.100.23]) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTPSA id 1422429 for ecs-isp@2rosenthals.com; Mon, 14 Dec 2020 11:50:46 -0500 Subject: Re: [eCS-ISP] CLI util to show if a task has a number of instances in memory To: eCS ISP Mailing List References: Organization: Rosenthal & Rosenthal, LLC Message-ID: <5FD797E4.60009@2rosenthals.com> Date: Mon, 14 Dec 2020 11:50:44 -0500 User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, Massimo... On 12/14/20 06:57 am, Massimo S. wrote: > Hi all, > > i use GO 1.5 and i tried others (with no success) > is there any CLI util that show the number of a process that has more > instances running? > > e.g. i mean go -cp return just 1 or 0 as answer > but i'd need a number for HTTPD processes running > [c:\]pstat | grep -ic httpd 15 [c:\]pstat | grep -ic php 3 i - case-insensitive c - display count of lines containing the pattern Make the pattern as specific as you like. You may specify ".dll" or ".exe" as an extention to the filestem to get specific results. Foolproof? No. It all depends upon what you want to do with the data, of course. > i know that i can do it via rexx, but a CLI util should be more > confortable :) > I try to find one-liners to do what I can, and then resort to perl or REXX if necessary. Use what's comfortable. HTH -- Lewis ------------------------------------------------------------- Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA Rosenthal & Rosenthal, LLC www.2rosenthals.com visit my IT blog www.2rosenthals.net/wordpress -------------------------------------------------------------