How to kill the process running on specific port in Solaris 10

Hi
As I want to kill the proces running on port 8080 in my solaris 10 box. is there any command to do the same.
Thanks
Rajan

A quick google, found lots of scripts... I found the script below @ Christopher Hubbell's blog - I've modified it to pump out the command name.
---->>>>>>BUT let's just say it would be quicker to got to sunfreeware.com and download lsof.
the 'lsof -i " option will give you the process id, which you can use kill _pid_ to kill the id.
Christopher's modded script (my edits in bold):
#!/bin/sh
if [ `/usr/xpg4/bin/id -u` -ne 0 ]; then
echo "ERROR: This script must run as root to access pfiles command."
exit 1
fi
if [ $# -eq 1 ]; then
port=$1
else
printf "which port?> "
read port
echo "Searching for processes using port $port...";
echo
fi
for pid in `ps -ef -o pid | tail +2`
do
foundport=`/usr/proc/bin/pfiles $pid 2>&1 | grep "sockname:" | egrep "port: $port$"`
if [ "$foundport" != "" ];
then
pname=`ps -ef -o pid -o comm |grep $pid| awk '{print $2}'`
echo "process name: $pname, $foundport"
fi
done
exit 0
Tom de

Similar Messages

  • How to terminate the "process" running in weblogic server by servlet

    hi all !!
    i have executed a external command from servlet but i am not getting the output untill i logoff the weblogic server.
    now i want to kill the process running in my server by servlet code.how could i do this? here is my code ,it is executing the command but not giving output untill i logoff the server.
                     Runtime rt = Runtime.getRuntime();
                     Process proc = rt.exec("var.bat");
                     proc.wait(60);
                     proc.destroy();Thanks and Regards
    Allwyn

    hey !
    anybody is here?????

  • How to kill the process chain

    hi,
        I have question how to kill the process chain during running.
    thank you.

    Hi
    If the process chain is running in background,
    goto <b>SM37</b>
    Give * in the jobname
    Give the username who scheduled the process chain
    Job status - check the check boxes - SCHED, relased, ready, active
    click <b>execute</b>.
    It displays all the process chains that, scheduled & running.
    You can select the process chain that need to be stopped & click STOP active job or ctrl+F1.
    Hope this helps!
    Kindly award points for all useful answers.
    If you post the BW related queries in the <b>BI general</b> forum, you will get more answers.
    Best regards,
    Thangesh

  • How to find the process running for a specific cube on WINDOWS?

    Hi,
    how do we find the process of a cube and kill it if the server is a win 2003 server...
    when i go to the task manaer and search I only see then as esssvr ? but how do I match them to the specif cubes??
    in UNIX we can see them clearly as they have the cube name along with the pid and evertything else...
    please let me know.
    Thanks in advance.

    you actually have to go into the Essbase server log. When the application starts its pid is put in the log. I don't remember the mesage number, but it's in the log somewhere around a message started. Make sure you get the last started pid for an application. since the log can be for a long period, the application could have started multiple times
    Message was edited by:
    GlennS

  • HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING IN THE PRODUCTION?

    HI ALL,
    CAN ANYONE TELL ME HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING DAILY AT 5.00 PM. I NEED TO STOP THE PROCESS CHAIN FOR COUPLE OF DAYS AND THEN RESTART IT AGAIN.
    cAN ANYONE TELL ME THE PROCEDURE TO STOP THE ENTIRE PROCESS CHAIN RUNNING IN THE PRODUCTION.
    THANKS
    HARITHA

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • Why it is taking too much time to kill the process?

    Hi All,
    Today,one of my user ran the calc script and the process is taking too much time, then i kill the process. I am wondering about one thing here even it is taking too long to kill the process, generally it will not take more than 2 sec. I did this through EAS.
    After that I ran Maxl statement
    alter system kill request 552599515;
    there is no use at all.
    Please reply if you have any solutions to kill this process.
    Thanks in advance.
    Ram.

    Hi Ram,
    1. Firstly, How much time does your calculation scripts normally run.
    2. While it was running, you can go to the logs and monitor where exactly the script is taking time .
    3. Sometimes, it does take time to cancel a transaction ( as it might be in between).
    4. Maxl is always good to kill ,as you did . It should be succesful . Check the logs what it says ,and also the "sessions" which might say "terminating" and finish it off.
    5. If nothing works ,and in the worst case scenarion , if its taking time without doing anything. Then log off all the users and stop the databas and start it .
    6. Do log off all the users, so that you dont corrupt any filter related sec file.
    Be very careful , if its production ( and I assume you have latest backups)
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • How to kill TP process at OS Level

    Dear ALL,
    How to kill the TP process at OS level
    Operating System : win 2003

    Q.1 Different Method for Kernel Upgradation
    So far till now, I have known only one method for Kernel upgradation which is very very simple. I dont think we need any other work-around for Kernel upgrade as this method is very very straight forward. The steps to be followed are ---
    Go to the SAP OSS Site :- 
    http://service.sap.com/SWCenter-Main
    From here Download the kernel programs in a temporary folder or use Download Basket toi download the Kernel.
    Now shutdown the R/3 database and all services including saposcol. 
    Create a folder and copy the original executables from  /exe/run/ directory then uncar the downloaded files and replace the original executables in /exe/run/ directory. 
    Then restart your system. 
    A couple of important points to remember are :-.
    a) Always make a copy of the files you're going to replace. For e.g. Create a directory (oldkern) and copy all the old files before replacing them (this helps when sometimes the new Kernel has problems, and you can revert it)
    b) You have to shutdown SAP and the Database using the OLD kernel file. Again it is good practice to shutdown everything first.
    Regards,
    Mandar

  • Infinte loop is going on how to kill the instance

    Hi friends
      In leave workflow instead of wait step i added loop and a condition container when wait step condition is put inside the conditional container and loop is set a flag when set a flag come out of the loop. The condition inside the condational container is REQ.Status = posted. But this condition is met. But still the loop is going on. I have generatated new version and deleted all the old version. Still loop is on. I also tried swwl and deleted the 1st workitem of the workflow. But still the instance is on. How to delete or kill  the instance. This is the problem in development.
    Regards
    vijay

    Hi vijay kumar,
    Yes, you are correct, since the endless loop will be procesed by the background user, it may or may not be displayed in SM50.
    The other way to kill the process is.
    1. go to sm12 with the user id wf-batch delete the running section and immediately do the process with reddy has informed you.
    Thanks and Regards
    Balaji K.

  • How to kill these processes?

    I want to see if port 11162 is in use or not so I issued the below command
    netstat -a | grep 11162
    and this is what I got back
    hostname.11162 hostname.50916 49152 0 49152 0 CLOSE_WAIT
    *.11162 *.* 0 0 49152 0 LISTEN
    hostname.11162 hostname.50291 49152 0 49152 0 CLOSE_WAIT
    hostname.11162 hostname.51288 49152 0 49152 0 CLOSE_WAIT
    I have 2 questions
    1) What is the meaning of CLOSE_WAIT?
    2) How do I kill all processes that use this port 11162 currently? I tried these commands kill 50916, kill 50291, kill 51288 but it said No such process. Basically I want to kill all processes that use this port 11162 currently.
    Thanks

    Andrew2008 wrote:
    I have 2 questions
    1) What is the meaning of CLOSE_WAIT?From 'netstat':
    CLOSE_WAIT
    Remote shutdown; waiting for the socket to close.
    This means that the remote side sent us a shutdown packet. The OS told the application that it received the shutdown, and it's waiting for the application to close the socket. It will remain in that state until the socket is closed or until the process exits.
    2) How do I kill all processes that use this port 11162 currently? I tried these commands kill 50916, kill 50291, kill 51288 but it said No such process. Basically I want to kill all processes that use this port 11162 currently.Those numbers are the port numbers on the other end of the connection. They are not PIDs.
    You would need to either install 'lsof' and ask it which processes are using the port (lsof -i :11162), or you need to run 'pfiles' on all the system processes and see which ones report having port 11162 open. I'm sure there's some simple scripts that automate the second task.
    Darren

  • Firefox will be hung when begining to download a file. Only using the tasker to kill the process can be resolved.

    when beginning to download a file especially a big file, my firefox will be hung, and it will occupy about 50% of the cpu resource. I can only kill the process to solve this problem.
    The problem was happened before installing the plugin "flashgot".
    this problem was occured in version 3.6.12 too.

    Questions:
    * How can I download a binary file like an mp3 from a server to a client?There are a ton of examples on the internet on how to download files. If you are having a problem, please post your code.
    >
    * Where I have to put my server application? I supose that I must create a jar, save it on a folder and execute it at PC start-up, right?Your server application will exist on a server and will run the application. hence the reason for the server. The best best for you is to read some online tutorials on client/server and how it works.

  • How to stop the process chain showing status as yellow but no process step

    Dear Friends,
    How to stop the process chain showing status as yellow but no process step is running in that process chain.
    We have manually triggered the process chain for sales it finished successfully till load data but the next step is create index and DB statistics. Both of this steps are in unscheduled position only and no background job for this.
    Please guide me.
    Thanking you in advance.
    Regards,
    Shubhangi

    Hi,
      At times even I have faced this situation.  During those times, running the Function module RSPC_PROCESS_FINISH by passing the right parameters came to my rescue.
    Regards,
    Raj

  • How to test the process chains

    hi sap gurus,
    Can anybody tell me how to test the Process chains before i load real time data,i run process chains every morning 6.15 am,before that i want to test every process is linked to another.
    thanks in advance.

    Hi,
    Scheduling the process is the only way to check whether it is running fine or not. The process chains should be checked first in the Dev server and then in the QA server before transported to Prod.
    You can also check the process chain using the "check" button to see if the processes are in the proper sequence or not.
    There is a "log" button to keep track of the progress of the chain
    suresh

  • How to configure the wifi access with specific time slot for kids?

    how to configure the wifi access with specific time slot for kids?

    Which model of AirPort base station do you have? Which version of OS X is your MacBook Pro running?
    Wi-Fi access can be limited using the Timed Access feature of the AirPort routers. You would do so using the AirPort Utility.

  • How to stop the process chain

    Hi Sapients,
    I am loading the data from R/3 to BW through Process chain. Please let me know how to stop execution of  the process chain.
    Thanks
    Mahi.

    Hi Mahendra,
    You have to stop the load in the source system if u r loading from R/3 System, for that use transaction SM50 or SM51 to kill the process.
    Hope it helps. Assign points if helpful
    Cheers
    Raj

  • How to kill a process chain in an intermediate step...?

    How to kill a process chain in an intermediate step...?
    I have tried doing it using SM37... but still the chain is hanging....
    Please help ASAP...
    Regards
    Sneha

    Hi Sneha,
    If its a loading process then:
    1. Go to monitor & make its overall status RED.
    2. Go to the target & make the QM status RED.
    3. Since its loading data to BW, its R/3 will be active even if you make any status RED in BW.
    4. Cancel its corresponding R/3 job. U'll get its R/3 job from monitor>Header tab>Job name. Copy that job name& go to R/3 side>sm37>in Job name add B*followed by the job name copied & then delete the Active job.
    Once this is done then your loading process will anyhow stop further stopping the Process chian.
    If your job is other than loading, then simply go to that process chain & remove the link between the active process nad the next process after cancelling the active job (as mentioned in the various replies for your question).
    Give some time to update the staus of that cancelled job in Db, because even if you cancel any active job, it requires some time to refresh it updated status. Once it is cancelled you can rejoin the link between the proceses and reactivate & schedule your process chain.
    hope it'll help

Maybe you are looking for