On Fri, Jul 24, 2009 at 7:11 PM, Chirag Anand <[email protected]>wrote:

> On Fri, Jul 24, 2009 at 1:55 PM, Sudev Barar <[email protected]> wrote:
>
> > I have made a script that starts netcat repeatedly in listen mode. Once
> > incoming data is started the script fires off another NC instance and
> > previous NC process then dies when data string ends. I want to count how
> > many netcat processes were launched during a particular testing period.
> >
> > One option is to build a counter before firing up each instance of
> netcat.
> > Any other method? I would not like to touch the netcat launch script
> right
> > now.
> >
>
> If this is what you're looking for: `ps -aef | grep netcat | wc -l` ?
> But this will give you one extra result, as `grep netcat` will also be
> counted as another running process. You can make necessary  modifications
> to
> it and get the correct result. Hope that helps.
>
> --
>
You missed his question. He does not want to know how many netcats are
running, he wants to know that between time T and time T+Delta how many
netcats were fired.
_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to