April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Finding the process that locked a port in AIX

Finding the process that locked a port in AIX
********************************************************************
Run the following command to check if port is in use

# netstat -an | grep <port number>

If above returns the connection, then run the following command to get the address of the port number

# netstat -Aan | grep <port number>

Once you have the address of the port number, run the following command to get the process id that is using the port.

# rmsock <address of port number> tcpcb

Example
# netstat -an | grep 30767 tcp4       0      0  *.30767                *.*                    LISTEN # netstat -Aan | grep 30767 f100060001b2f398 tcp4       0      0  *.30767            *.*                LISTEN # rmsock f100060001b2f398 tcpcb The socket 0x1b2f008 is being held by proccess 942150 (vcs_agent).


Find Command General syntax of “find” command
$ find <where> <condition> <action>
FInd The Largest Files in a Directory
*************************************************
find /web( path mentioned )  -xdev -type f -ls |awk ‘{print $7″ “$8” “$9” “$10” “$11}’|sort -rn |head -20
du -a . | sort -nr | head

*******************************************************
Working with Crontab
********************************************************
—->crontab -l    —- list all the cron jobs
—->crontab -e    —- to edit the cronjobs
—->crontab -r —– to remove the crons(before removing it create a backup)
—->crontab -l > filename.txt
—->crontab -e filename.txt
—->crontab filename.txt.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>