List ecs-isp@2rosenthals.com Arkiverade meddelande #134

Från: "Massimo S." <ecs-isp@2rosenthals.com> Meddelandehuvud
Oavkodat meddelande
Ämne: Re: [eCS-ISP] CLI util to show if a task has a number of instances in memory
Datum: Mon, 14 Dec 2020 20:53:06 +0100
Till: eCS ISP Mailing List <ecs-isp@2rosenthals.com>

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 <list-1422430@2rosenthals.com>, on 12/14/20
    at 11:50 AM, "Lewis G Rosenthal" <ecs-isp@2rosenthals.com> 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


Prenumerera: Sändning, Uppsamling, Index.
Stoppa prenumeration
Meddelande till ListMaster