Stopping multiple process on AIX

I'm trying to update a shared library (*.so) in our AIX machine. However, when I tried to delete the old *.so file, I get this error -> Cannot open or remove a file containing a running program. Based on the information I gather from the net, shared libraries are not unloaded (the file remains locked) even after the process using it has exited.

Would any of you know how I could stop all the process that is currently using that shared library for me to udpate that file? I'm currently using the kill -9 <PID> command but it seems that there's a great number of process that uses that file. Hope someone could help me.

If you use the fuser {filename} command, you will get a list of procs using the file. Based on this you should then be able to free the file.

to kill multiple procs, you can issue kill {PID1} {PID2} {PIDn}......

Not sure if this would help you or not, but take a look at /usr/sbin/slibclean command. I use to have to run this for the Oracle DBA's on a regular basis.

Let me know if this helped you or not.