I think there is, but there's also a perl equiv:
perl -MFile::Which -le 'print "$_: ", which $_ for @ARGV' echo
Of course, I'm assuming you have File::Which installed :-) | [reply] [d/l] |
If it was Unix, I would...
If it was Unix, I would run strace/truss/tusc, and I would know within seconds what exactly is being called with which parameters. But heh, this isn't...
| [reply] [d/l] [select] |
| [reply] [d/l] |
set PM=C:\tools\sysinternals\procmon.exe
start %PM% /quiet /minimized /backingfile C:\temp\test.pml
%PM% /waitforidle
perl -le "system 'echo junk*'"
%PM% /terminate
This created a 17 MB logfile containing 99+% irrelevant stuff (seems to be the entire system activity in that period). I haven't yet been able to figure out how to
- limit event logging to the process of interest (perl in this case) and any subprocesses spawned by it (cmd.exe, etc.)
- log certain types of activity only, like related to files or process creation etc., or a specific system call
In other words, I'd be grateful if you could give me a quick heads up on how to get something roughly comparable to the following strace usage:
$ strace -fqe execve perl -le "system 'echo junk*'"
execve("/usr/local/bin/perl", ["perl", "-le", "system 'echo junk*'"],
+[/* 76 vars */]) = 0
[pid 26565] execve("/bin/sh", ["sh", "-c", "echo junk*"], [/* 76 vars
+*/]) = 0
junk*
Also, it seems you need to be a member of the administrative group to use the utility. Unfortunately, more often than not, I'm not a member of that group when I would need the tool for debugging. Is there any way to watch activity of your own processes only (for which you should have permission)?
Thanks! | [reply] [d/l] [select] |