1

We have an application deployed on some different platforms, Windows and Linux. It is composed of three java processes.

On Linux, when we want the process id to kill and restart one of them, we do:

ps -ef | grep java

And the outcome is three lines showing the three processes.

One of our clients use Slackware, and when we do this same command, the outcome is several lines, dozens of lines for each of the three processes. And worse, many of those lines show only:

root      3470  0.0  3.1 1468048 64944 ?       S    07:33   0:00 java

Which is misinformative, since we cannot determine which of the three modules this is.

Is there something about slackware and the ps command?

More info:

Slackware version: 10.2.0

Kernel version:

Linux version 2.4.32-abi (root@servidor) (gcc version 3.3.6) #3 Mon Sep 29 10:27:28 GMT 2008

'man ps' says, at the end:

STANDARDS
This ps conforms to:

1   Version 2 of the Single Unix Specification
2   The Open Group Technical Standard Base Specifications, Issue 6
3   IEEE Std 1003.1, 2004 Edition
4   X/Open System Interfaces Extension [UP XSI]
5   ISO/IEC 9945:2003

Thanks a lot in advance.

2 Answers2

3

You will probably find that ps on slackware is showing you the individual threads for each process. Threads in Linux are basically separate processes created using clone() rather than fork(), which leaves them with the same address space. On a 2.6 kernel, ps can usually detect which processes are threads and which aren't. Perhaps slackware has a slightly different behaviour for their version of ps.

You might find better/different luck using

ps auxw | grep java
David Pashley
  • 23,497
  • 2
  • 46
  • 73
1

Sounds like you're seeing threads, what version of "ps" is he using? Ask him to check the man page for a way to show processes without their threads.

katriel
  • 4,477
  • 23
  • 20