Mailing List ecs-isp@2rosenthals.com gearchiveerd bericht #132

Van: "Lewis G Rosenthal" <ecs-isp@2rosenthals.com> Volledige berichtkoppen
Ongedecodeerd bericht
Onderwerp: Re: [eCS-ISP] CLI util to show if a task has a number of instances in memory
Datum: Mon, 14 Dec 2020 11:50:44 -0500
Aan: eCS ISP Mailing List <ecs-isp@2rosenthals.com>

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
-------------------------------------------------------------


Aanmelden: Feed, Samenvatting, Index.
Afmelden
Mail naar ListMaster