june54,
Are they all in the same program group?
ps -ef -o pid,pgid,comm | grep <command>
to see if all <command> instances have the same pgid, then:
ps -ef -o pid,pgid,comm | grep <pgid found in step one>
to see if there are other processes you wouldn't want to kill in that group.
If killing the whole program group will work, then you can use the kill command in the following form. For this example, we'll kill (actually send interrupt signals to) all programs in program group 12345 with a SIGTERM (15) signal:
kill -15 -12345
SIGTERM is the default signal used by kill when you do a simple "kill <pid>". When killing a program group, the signal must be explicitly listed, or the group id will be interpreted as an invalid signal and no pid.
Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L