Article Title: how to view the port number occupied by DB2 in Linux or Unix. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
# Assume that you have started the database manager with db2start and configured the communication mode as TCP/IP.
# Switch to the db2inst1 user su-db2inst1
# Query TCP/IP Service name db2 get dbm cfg | grep-I service
# Use the output of the previous command (for example, db2c_db2inst1) to find the corresponding port number in the/etc/services file grep db2c_db2inst1/etc/services
# This is what you will see from the output of the previous sentence db2c_db2inst1 50000/tcp
#50000 indicates the port number occupied by the db2 database.
This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/huoyin/archive/2008/07/03/2609612.aspx