Finding process that turned on ports


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Finding process that turned on ports
# 1  
Old 01-02-2013
Finding process that turned on ports

I have 2 identical solaris 10 servers that are simply apache servers, running a version of apache I installed.
Code:
# uname -a
SunOS wilber 5.10 Generic_147440-25 sun4u sparc SUNW,Sun-Fire-V245

I did a netstat on one of the servers and see 2 ports that are on. These are only on on one of the servers.
Code:
*.52606 Idle
*.52625 Idle

I compared all the online services and they are identical. I did a ps and there is no process associated with it.

Does any one know what they are from and how to turn it off please?

Last edited by radoulov; 01-02-2013 at 04:39 PM..
# 2  
Old 01-02-2013
As root
Code:
ptree -a |awk '{print $1}' |xargs  pfiles |egrep '(^[0-9]|SOCK|peername|sockname)'

The output will be like this:

Code:
14432:  /local/banner/prod_envs/banner_prod/general/exe/uapsogn -f -o /local/b
   5: S_IFSOCK mode:0666 dev:371,0 ino:47181 uid:0 gid:0 size:0
        SOCK_STREAM
        sockname: AF_INET 10.128.3.243  port: 35255
        peername: AF_INET 10.128.3.240  port: 1521
14456:  /local/banner/prod_envs/banner_prod/general/exe/uspschs -f -o /local/b
   5: S_IFSOCK mode:0666 dev:371,0 ino:17906 uid:0 gid:0 size:0
        SOCK_STREAM
        sockname: AF_INET 10.128.3.243  port: 35257        peername: AF_INET 10.128.3.240  port: 1521
14490:  /local/banner/prod_envs/banner_prod/general/exe/uzpsocl -f -o /local/b
   5: S_IFSOCK mode:0666 dev:371,0 ino:226 uid:0 gid:0 size:0
        SOCK_STREAM
        sockname: AF_INET 10.128.3.243  port: 35259
        peername: AF_INET 10.128.3.240  port: 1521
14514:  /local/banner/prod_envs/banner_prod/general/exe/uzpsopr -f -o /local/b
   5: S_IFSOCK mode:0666 dev:371,0 ino:5441 uid:0 gid:0 size:0
        SOCK_STREAM
        sockname: AF_INET 10.128.3.243  port: 35262
        peername: AF_INET 10.128.3.240  port: 1521

The sockets are red
the pids you want are green
# 3  
Old 01-02-2013
Hi,

Thank you very much. So this is from the snmpd daemon? I have that running on all the servers. I'll check it out, thanks.

7953: /usr/sfw/sbin/snmpd
15: S_IFSOCK mode:0666 dev:378,0 ino:62512 uid:0 gid:0 size:0
SOCK_DGRAM
sockname: AF_INET 0.0.0.0 port: 161
16: S_IFSOCK mode:0666 dev:378,0 ino:62513 uid:0 gid:0 size:0
SOCK_DGRAM
sockname: AF_INET 0.0.0.0 port: 52606
17: S_IFSOCK mode:0666 dev:378,0 ino:15881 uid:0 gid:0 size:0
SOCK_DGRAM
sockname: AF_INET 0.0.0.0 port: 52625

---------- Post updated at 09:25 PM ---------- Previous update was at 09:10 PM ----------

I turned off sma and the unusual ports shut down. Then I enabled it and another port came on. I will check the config and see if disables the odd ports, and if not, uninstall and install a new version.

# svcadm disable svc:/application/management/sma:default
# svcadm enable svc:/application/management/sma:default

thanks so much for your help.

---------- Post updated at 10:19 PM ---------- Previous update was at 09:25 PM ----------

Does anyone know how to uninstall the pre-installed version of net-snmp on Solaris 10 please? I would like to do that and I don't see anything in pkginfo.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do i list running process with the ports they are using?

How do i list the running process and also view the ports they are listening to at the same time? (3 Replies)
Discussion started by: mena
3 Replies

2. Shell Programming and Scripting

Finding process which ended another process

Hello, The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies

3. UNIX for Advanced & Expert Users

Finding process id of subsequent process

hi all, I am trying to find the process id of the subsequent process created via fork and exec calls in perl. For eg: envVarSetter dataCruncher.exe < input.txt > output.txt When I fork and exec the above command, it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

4. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

5. Red Hat

No process ID for listening ports

How can I have ports that are listening without processes being associated with them? root@ldv002 # netstat -ltnup Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0... (2 Replies)
Discussion started by: Padow
2 Replies

6. Linux

Need help in finding process

Hello, Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies

7. Solaris

List TCP ports with process

Hello, One of our developers is asking for a command/script in Solaris similar to "netstat -anp" in Linux. He gave this output as an example: root@xxx:~# netstat -anp | grep LISTEN tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 16082/nsrexecd tcp 0 ... (7 Replies)
Discussion started by: vimes
7 Replies

8. UNIX for Dummies Questions & Answers

Finding out process id in a scipt

Hi, If in a shell script i write a command ls > bla & ls The output is redirected to bla and the next ls starts as first one is going on in background. I want to find the PID of the first command. Thanks in advance (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

9. UNIX for Dummies Questions & Answers

unix process that frees ports

Hello, I know that there is a unix system process that checks periodically the ports and if it finds any zombies then it frees them (the period is set by a kernel parameter). Can anyone tell me the name of the process and the kernel parameter ? Thanks :) (2 Replies)
Discussion started by: FunnyCats
2 Replies

10. UNIX for Dummies Questions & Answers

finding process id

is there a way to find the process id of a process because i have same process invoked several times. when i need to kill them, i get confused with the id. Thanks, sskb :( (8 Replies)
Discussion started by: sskb
8 Replies
Login or Register to Ask a Question