This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: monitoring files opened/closed by a process


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]