Although I tend to agree with
@OJ (<G>) there are actually a few commands which I heavily favour. When confining myself to the base system (so really a "FreeBSD tool") then I'd have to say
ktrace (and the accompanying
kdump) as well as
ldd and perhaps combined with
truss (I always keep forgetting about that one).
On Linux it's all about
strace. I just discovered that this program is even available for FreeBSD through the
devel/strace port. Even so, I personally favour both
ktrace and optionally
truss because whenever some program is acting up the combination of these tools allow you to carefully examine what a program is actually doing. And the best part is that you don't even have to be a C or C++ hacker to get a good impression as to what is going on.
Same can be said about
ldd. You mentioned checking for libraries, personally I think a better approach is not using the package manager but to "dissect" the binaries you're working with instead.
Next, when talking about a tool outside the base system, but still related to FreeBSD management, then my vote would go out for
ports-mgmt/portmaster. That critter has saved me a
lot of time in the past year whenever I had to deal with problems with the port collection (ranging from some inconsistencies right down to having to recompile a library and all the programs which depend on it). A few commandline parameters to
portmaster and it'll take care of the rest.
Invaluable in my opinion.