public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Bruno G. Sousa" <brgsousa@gmail.com>
To: systemtap@sourceware.org
Subject: Re: monitoring files opened/closed by a process
Date: Sat, 27 Jun 2009 03:20:00 -0000	[thread overview]
Message-ID: <24230120.post@talk.nabble.com> (raw)
In-Reply-To: <DCF175E9-22B3-43E3-B4F2-35159B956ED9@physik.rwth-aachen.de>


thanks!
i got it working!

now I need to monitor strings that are being written to files by certain
process.
wrote this till now:
probe begin
{
  printf("STARTEDn")
}

probe syscall.write.return
{
  if (pid() == target()) {
    printf("%s(%d) wrote %s\n", execname(),pid(),"something")
  }
}



Malte Nuhn wrote:
> 
> Have looked at http://sourceware.org/systemtap/examples/io/ 
> iostats.stp ??
> 
> I guess it nearly does what you Need.
> 
> 
> Greets, malte
> 
> 
> 
> Am 26.06.2009 um 23:12 schrieb "Bruno G. Sousa" <brgsousa@gmail.com>:
> 
>>
>> I am trying to write a stap script that:
>> list the activities of opening and closing files made by a given  
>> process
>> (showing time and files being open/close)
>>
>> How it should be?
>> -- 
>> View this message in context:
>> http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24227355.html
>> Sent from the Sourceware - systemtap mailing list archive at Nabble.com 
>> .
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/monitoring-files-opened-closed-by-a-process-tp24227355p24230120.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.

  reply	other threads:[~2009-06-27  3:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 21:12 Bruno G. Sousa
2009-06-26 22:23 ` Malte Nuhn
2009-06-27  3:20   ` Bruno G. Sousa [this message]
2009-06-27 21:29     ` Mark Wielaard
     [not found]       ` <068101c9f85f$534d3480$f9e79d80$@ac.cn>
2009-06-29  6:04         ` 答复: " Mark Wielaard
2009-06-29  7:54           ` 答复: " tgh
2009-06-29  8:00             ` Mark Wielaard
2009-06-29 11:34           ` question about resource usage for each process tgh
2009-07-02 13:21             ` question about cache miss tgh
2009-07-06 19:16               ` William Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24230120.post@talk.nabble.com \
    --to=brgsousa@gmail.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).