Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCO Unix Bulk Process Killer 1

Status
Not open for further replies.
Feb 14, 2000
425
US
I have a situation with one of my processes. It is a C executable that sends socket communication to another server as a receiver. When the receiving side gets hung or otherwise stops receiving my connects there is a long period until timeout. I am sending many socket connections per minute. What I ultimately end up with is a couple hundred "sender 171.1.1.102" processes queued up waiting for a timeout until they die a natural death.

What I am looking for is either command line ideas for a cmd or a script that will take the process name "sender 171.1.1.102" and do a kill -9 on them so I can clean up the mess when it happens without waiting for each to timeout naturally or kill them all with kill -9 [pid].

I realize I could just shorten the timeout but in some circumstances, I need the longer timeout.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
Do you have pgrep and/or pkill available?
[pre]PGREP(1) User Commands PGREP(1)

NAME
pgrep, pkill - look up or signal processes based on name and other
attributes

SYNOPSIS
pgrep [options] pattern
pkill [options] pattern

[/pre]

--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top