On Fri, Jul 24, 2009 at 1:55 PM, Sudev Barar <sba...@gmail.com> 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. -- Regards Chirag Anand Junior Systems Architect E2E Networks | <http://www.e2enetworks.com> chirag.an...@e2enetworks.com Blog :http://techfreaks4u.com/blog anything weird is worth a try... _______________________________________________ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/