LindaC
asked on
Script needed to see the ports being used by the Aix server.
I'am expecting something like this:
"Run this script as root so that you will have in a text file, the ports that are being used"
After you add the proper comments to this text file adding this to each line (example)
# Comment-This port is for Oracle Apex
then you run this other script to add the content of this text file to the /etc/services.
This must be run by root.
"Run this script as root so that you will have in a text file, the ports that are being used"
After you add the proper comments to this text file adding this to each line (example)
# Comment-This port is for Oracle Apex
then you run this other script to add the content of this text file to the /etc/services.
This must be run by root.
ASKER
It will suffice if I can get a text file with all the ports that are in use on the server.
The other ports that are not in the text files will be closed.
The other ports that are not in the text files will be closed.
ASKER
Only the text files with the ports that are being used.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this
netstat -an | egrep -i "list|estab|connect" > file
this should give you idea about ports used on the system
netstat -an | egrep -i "list|estab|connect" > file
this should give you idea about ports used on the system
ASKER
Does this udp means that they are being used?
udp 0 0 *.46656 *.*
claropr-oem-oracle:/oracle /diag/rdbm s/oem11g/o em11g/trac e> an|grep 14253
udp 0 0 *.14253 *.*
ports-used.bmp
udp 0 0 *.46656 *.*
claropr-oem-oracle:/oracle
udp 0 0 *.14253 *.*
ports-used.bmp
udp is the protocol being used (User Datagram Protocol)
The simple fact that the port appears in the output of "netstat -an" means that it's open and in use.
The simple fact that the port appears in the output of "netstat -an" means that it's open and in use.
ASKER
Thank you.
netstat -an
can you elaborate on the requirement?