How to Kill the port that is being used in IBM-AIX?

Posted on 2009-02-14
Last Modified: 2013-11-17
1.How to Kill the port that is being used in IBM-AIX?
2.How to identify the application that is using some port say for example 1158?
Question by:umesh4exp
    LVL 40

    Accepted Solution

    you may try

    netstat -ap (if supported)


    lsof -i:1158

    this will give you pid that you can use kill -9 pid to terminate

    Author Comment

    how to use netstat -ap
    lsof is not installed or present
    LVL 40

    Expert Comment

    can you show output of netstat -ap ?
    LVL 68

    Assisted Solution

    lsof for AIX is here:

    netstat -ap is not supported in AIX in a way that it will show PIDs. It is used to filter the output by protocol.

    You will have to rely on lsof, as omarfarid wrote, in the format 'lsof-i:[port]'

    In the first column you will find the command, in the second column the PID.
    You could then use 'kill [pid]' to terminate the process.


    LVL 68

    Expert Comment

    Installing lsof:

    Goto the link I mentioned, klick 'Sorted download -> alphabetically', search for lsof. The version '4.6' found there will run under AIX 5.2 and 5.3 (at least up to TL 4).

    Download the package and install it by using 'rpm -i [package]'

    lsof is now ready for use.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the article included with this course.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now