Solved

Process not listed in 'ps -ef'

Posted on 2007-12-04
6
864 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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 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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

792 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