Operating System - HP-UX
1836452 Members
2689 Online
110101 Solutions
New Discussion

Re: listeners for /etc/services entry

 
Joseph Chakkery
Valued Contributor

listeners for /etc/services entry

Hello Unix Guru's,

when I check for listener threads for some /etc/services entry using netstat -a|grep comand i can't find it.
Eg: Sevices file entry is like
uniqcs 2006/tcp # UniQPrint Print Server

I can't find any listener thread for this using netstat.

How can start it again.

Thanks in advance
Joe.

Knowledge is wealth
8 REPLIES 8
Christopher McCray_1
Honored Contributor

Re: listeners for /etc/services entry

Hello,

I'm not sure what your asking, but if its trying to find the port for your listener:

# netstat -an |grep

Usually it's something like 1521 or 1526.

Also try

# ps -ef|grep tnslsnr

Is this what you want?

Chris
It wasn't me!!!!
Helen French
Honored Contributor

Re: listeners for /etc/services entry

Hi,

If I understood correctly, then this should work:

# inetd -c

HTH,
Shiju
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: listeners for /etc/services entry

Hi Joseph,

Unless you start a service to listen at this port, you won't find it in netstat. Simply having an entry in /etc/service is not enough

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Joseph Chakkery
Valued Contributor

Re: listeners for /etc/services entry

Thanks Chris.
I know how to check wether the thread is running. If it is not running how can we start it again.

Like the example I have given above uniqcs should be the listener at 2006, which is not running.

How can I start it again.

Regards
Joe.
Knowledge is wealth
Joseph Chakkery
Valued Contributor

Re: listeners for /etc/services entry

Hi Shiju

inetd -c didn't helped.

Hi Sri

How can u start the listener again?

Joe
Knowledge is wealth
Christopher McCray_1
Honored Contributor

Re: listeners for /etc/services entry

Hello again,

Sorry for not hitting the mark. A couple of questions.

This uniqcs is a process which should be running? We are not talking about oracle here?

The entry in services only points to the port the process uses, the program(listener) needs to be started though a command line or interface command.

Sorry again if I still appear to be confused.

Chris
It wasn't me!!!!
Bill Thorsteinson
Honored Contributor

Re: listeners for /etc/services entry

/etc/services only provides names for the port services listen on. For most servers most of the listed services will not have listeners.

Many services have there own daemon process. Other rely on inetd to listen for connections and either provide the service or call the appropriate program. Check /etc/inetd.conf to see what is running and what has been disabled.

netstat -a will show all the listening services by name, while netstat -an will show all the listening services by number.

Don't start listeners just because /etc/services has a listing for it. Usually, you can and should shut down most of the services provided by default
SHABU KHAN
Trusted Contributor

Re: listeners for /etc/services entry

Joseph,

There should be a program/daemon which associates to that port number (2006), you need to start that daemon for it to listen at that port.

For example:
grep -i mq /etc/services
# MQ Series
MQSeries 1234/tcp # MQSeries

hostA>mqm 510 1 0 Jan 02 ? 0:05 amqzxma0
mqm 511 510 0 Jan 02 ? 1:16 amqhasmx
mqm 541 510 0 Jan 02 ? 0:00 /opt/mqm/bin/runmqchi
mqm 514 510 0 Jan 02 ? 0:02 amqzllp0
mqm 540 510 0 Jan 02 ? 0:00 /opt/mqm/bin/amqrrmfa
mqm 543 510 0 Jan 02 ? 6:30 amqzlaa0

hostA>netstat -an | grep 1234
*.1234 *.* 0 0 0 0 LISTEN

Hope this helps

-Shabu