0

I am trying to execute command

ps-ef | grep java

The output of this command is getting curtailed and I am not able to understand which process is it actually. So is there any way I can get the complete output and not the curtailed output?

For example output I receive when I execute the above command:

root 14018 13922   0   Nov 23 ?         381:00 java -D[Standalone] -server -XX:+UseCompressedOops -d64 -Xms4096m -Xmx4096m -XX

Now from the above output I am unable to know which process is this.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • You know the PID and PPID, so is it the trouble that there are too many not-very-interesting options to Java and that's preventing you from seeing the important options that really identify what it's doing? You can poke around the manual for `ps` to see if there's a way to get the full command line, but you may be out of luck there, too. You may have to poke around `/proc/14018` to find out what the full command line is. At least, that would be the last resort on Linux. I'm not sure if the Solaris `/proc` file system is as informative. – Jonathan Leffler Nov 26 '18 at 06:03
  • Not a programming Q but dupe https://superuser.com/q/159606/ https://superuser.com/q/148271/ (both migrated) https://stackoverflow.com/q/4892516/ https://unix.stackexchange.com/q/3934/ https://unix.stackexchange.com/q/296560/ and for Java also consider `jps` – dave_thompson_085 Nov 26 '18 at 06:25
  • You might try `COLUMNS=10000 ps -ef | grep java ` – William Pursell Nov 26 '18 at 19:00

3 Answers3

0
ps -eo pid,user,comm | grep java
JimR
  • 473
  • 2
  • 11
-1

solaris 11 command

ps auxwww

This prints the complete length of the command.

-1

Try Below answer

echo "$(ps afx)"
Jo.........
  • 190
  • 1
  • 3
  • 13