Solved

Process not listed in 'ps -ef'

Posted on 2007-12-04
6
856 Views
Last Modified: 2013-12-16
just started a java (tomcat) server on Linux 9 machine.
After sometime when i do:
ps -ef

My java process is not listed there.

But the java server process is actually running. I can tell that by trying to browse to my Admin Page on http://hostort:8080/ - it responds correctly.

Also when i do netstat -an, i can see port 8080 is in LISTEN mode.

So my application is running but not visible in 'ps -ef'.
0
Comment
Question by:j4linman
  • 2
6 Comments
 
LVL 19

Expert Comment

by:http:// thevpn.guru
ID: 20401743
do netstat -apn | grep 8080

you should get a couple of lines with one being tomcat after that check towards the start of the line there should be something like java/xxxx or tomcat/xxxx where xxxx is the pid get the pid and do

ps uax | grep xxxx and you should get the true name of the process
0
 
LVL 19

Accepted Solution

by:
http:// thevpn.guru earned 34 total points
ID: 20401757
A neater solution would be

fuser -n tcp 8080


this lists all the processes on port 8080, for example

debian:~# fuser -n tcp 80
80/tcp:               3413  3414 20979 20980 20981 26513 31295 31299 31303 31304 31305 31306
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 33 total points
ID: 20401835
I found I needed to be root to get that to work, and then I got a confusing "here" line:

20:43:17# fuser -n tcp 21
here: 21
21/tcp:               1528

But as root I prefer to use lsof -i

20:43:25# lsof -i|grep ftp
inetd     1528 root    6u  IPv4   4720       TCP *:ftp (LISTEN)

Be that as it may, I would expect the process to show up with ps -ef, although I always use ps ax. Maybe some of its details are not as expected?
0
 
LVL 13

Assisted Solution

by:WizRd-Linux
WizRd-Linux earned 33 total points
ID: 20408108
Considering most servers have over 100 processes running at any given time, have you scrolled right back to the top?

ps -e
ps -ef
ps aux

They should all return the same number of processors, just displayed in a standard or bsd format.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now