Paul Macknee
2008-Sep-19 17:19 UTC
[dtrace-discuss] script to follow state changes from scripts
hey..
I''ve been following dtrace for a while now, but I haven''t had
much chance to use it in a production setting.
Until now, that is. We have a process which is really a series of scripts that
talk to each other via flat file changes, database records, and other state
changes, and I was hoping to use dtrace to help dis-entagle all of this.
So - I was wondering if there was a nice, generic dtrace process that could
record any state changes in the system based on process id. ie:
- if a process writes a file, I see which file it wrote to, along with
process info (arguments to the process id)
- if a process opens a connection (to a database, etc), I see the connection
specifications.
- if a process locks a file, I see the lock..
etc.etc. It should be able to follow processes and their children (and their
grandchildren), and if the connection is to a local box, be able to follow that
connection and display those state changes as it sees them, all the while tying
the state changes to the ''parent'' process (which was the one
intiating the connection).
As far as I can see, dtrace *should* be able to do such things, and if no such
canned script exists I would not be averse to writing one, but would appreciate
any pointers on how to do it... Part of the fun is trying to figure out a-priori
what possible changes it *could* make in the first place, and any help along
these lines would be greatly appreciated.
Thanks!
Paul
--
This message posted from opensolaris.org