My new best friend: strace

William Cohen wcohen at
Tue May 18 21:14:42 UTC 2010

On 05/10/2010 12:07 PM, Joachim Backes wrote:
> On 05/10/2010 05:24 PM, Tim wrote:
>> On Mon, 2010-05-10 at 07:45 -0500, Richard Shaw wrote:
>>> There was so much information flying past it took me a minute but I
>>> starting seeing some other libraries that it was not finding so after
>>> yumming those in it finally worked!
>> On a related note, just wondering, and someone else will probably have
>> to answer this:  Would using strace show an application trying to find
>> libraries that it could make use of, but doesn't actually need?
> Hi,
> use the ldd command!

If you want to see what shared libraries are being used by a process at the moment you could do something like the following (replacing 3250 with the appropriate prcess number):

cat /proc/3250/task/*/maps |sort |uniq |awk '{print $6}'|sort |uniq

You might be interested in the LD_DEBUG environment variable:

LD_DEBUG=unused name_of_command_to_run

You can get a list of available options with:

LD_DEBUG=help /bin/false


>> I remember doing this sort of diagnosing back in my Amiga days, and it
>> was common for applications to try and see what was available for it,
>> and you'd see "not founds" for all sorts of optional extras.  Which was
>> perfectly fine, so long as you weren't hoping to use one of those
>> optional extras.

More information about the users mailing list