[H-GEN] Strace on a binary get full path details on a stat

Anthony Irwin anthony at server101.com
Wed Oct 11 01:13:01 EDT 2006


Hi All,

I am installing a program that requires a specific java virtual 
machine to be installed in a specific place. This in it self seems 
stupid to me but thats the way they have done it.

The problem is the documentation provided with the binary installer 
incorrectly lists the java path required so I am doing an strace on 
the binary installation to track down the correct path that it expects.

The command I am running is 'strace -v -e trace=open,write,stat 
binaryfilename'

The output that I am interested in is:

stat("/opt/j2sdk1.4.../bin/java", 0xbfb06eb8) = -1 ENOENT (No such 
file or directory)

As you can see the path is being cut down with the ... in the path 
name. Does anyone know how to get the full path instead of the cut 
down version.

The man page says this about the -v option:

-v Print unabbreviated versions of environment, stat, termios, etc. 
calls.  These  structures  are  very  common  in calls  and  so the 
default behavior displays a reasonable subset of structure members. 
Use this option to get all of the gory details.

My strace version is version 4.5.14

The machine is running gnu/linux on fedora core 5.

Kernel version is 2.6.17-1.2187_FC5.

If anyone knows how to get the full path name or can suggest other 
methods for tracing the binary activity so I can find out the path it 
expects for java then it would be greatly appreciated as this is 
starting to become a tad annoying.

Kind Regards,
Anthony Irwin




More information about the General mailing list