Hi Harish,
Sorry should have gave more info. If you open the DEFAULT.PFL in AL11(DIR_PROFILE) there will be an entry of
rdisp/mshost = ascsSID
rdisp/msserv = sapmsSID
rdisp/msserv_internal = 3921(number)
These entries will tell you in DEFAULT.PFL as which is your message server host. For the port you can check the parameter above (rdisp/msserv_internal) which says of 3921 (internal port for the apps communication).. so in most cases the primary message server port will be 3621.
So.. in short..if you see in DEFAULT.PFL - 39XX then you can determine your port as 36XX.
Message server port always will start with 36 and XX is the instance number it's configured.
------------
Alternately what I said previously was also another way.
DIR_PROFILE >> Check for the file with the below parameters maybe .
#
# SAP Message Server parameters are set in the DEFAULT.PFL
#
ms/standalone
ms/server_port_0
Once you found these in a file check the file name - should be like SID_ASCSXX_hostname...this XX will be your Instance number and message server will be
36XX