Assuming that you are on a linux system, either do a
man strace or check out the man page for
strace. IIRC, ktrace is more of a *BSD thing. If you are using a BSD platform, then check out the
ktrace man page. It all depends on what platform you are doing this all on.