From: "Massimo S." Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTPS id 1422751 for ecs-isp@2rosenthals.com; Mon, 14 Dec 2020 14:58:31 -0500 Received: from [192.168.200.201] (port=45246 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1kotzA-00032B-2a for ecs-isp@2rosenthals.com; Mon, 14 Dec 2020 14:58:20 -0500 Received: from mail2.quasarbbs.net ([80.86.52.115]:10153) by mail2.2rosenthals.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1kotu9-0003l3-1X for ecs-isp@2rosenthals.com; Mon, 14 Dec 2020 14:53:09 -0500 Received: from [192.168.10.199] (dtp [192.168.10.199]) by srv2 (Weasel v2.74) for ; 14 Dec 2020 20:53:25 X-CTCH-RefID: str=0001.0A742F26.5FD7C3DC.006B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-RefID: str=0001.0A742F19.5FD7C2A5.005A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Reply-To: ml@ecomstation.it 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: eComStation dot it Message-ID: Date: Mon, 14 Dec 2020 20:53:06 +0100 User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; it-IT; rv:1.7.13) Gecko/20060424 Thunderbird/1.0.8 Mnenhy/0.7.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: it-IT Content-Transfer-Encoding: 7bit thanks a lot at the end i've used this way 'go | RxQueue' httpd=0 DO While Queued() <> 0 PULL Line SELECT When Pos('HTTPD.EXE',Line)<>0 Then httpd = httpd + 1 Otherwise NOP End End sorry for the bad copy&paste :) massimo Il 14/12/2020 20:35, Steven Levine ha scritto: > In , on 12/14/20 > at 11:50 AM, "Lewis G Rosenthal" said: > > Hi guys, > >> [c:\]pstat | grep -ic httpd >> 15 > > Or use continue to use go: > > [d:\tmp]go | grep RSYNC > 16559 138 01F VIO 2 0200 0:00:26.34 RSYNC.EXE > 16560 16559 01F VIO 2 0200 0:00:24.00 RSYNC.EXE > 16561 16560 01F VIO 1 0200 0:00:00.09 RSYNC.EXE > > If you really just want the count, with 4OS2 it's > > [d:\tmp]echo %@execstr[go | grep RSYNC | wc -l] > 3 > > To use the count in your script, it's > > set CNT=%@execstr[go | grep RSYNC | wc -l] > >> I try to find one-liners to do what I can, and then resort to perl or >> REXX if necessary. Use what's comfortable. > > No perl needed here. :-) > > FWIW, if the script is already REXX, there's Sys2QueryProcessList from > Alex's rxutilex.dll. > > Steven >