Martin Burnicki wrote:
> Uwe Klein wrote:
> 
> 
>>Martin Burnicki wrote:
>>
>>
>>>In the current case using strace to find which files are actually opened
>>>and read when ntpd starts (as proposed elsewhere) should be the best
>>>solution.
>>>
>>>Martin
>>
>>use strace -e trace=file ..
>>to see all syscalls that use a filename string.
> 
> 
> Unless -f is also given to strace this may not catch the correct file when
> the daemon forks.
> 
> Since we want to track which files are opened by ntpd a variant of Peter J.
> Cherny's proposal works nice:
> 
> strace -f -e trace=open -o x ntpd
> 
> or, to include the effects of the startup script:
> 
> strace -f -e trace=open -o x /etc/init.d/ntpd start

yes you need "-f" too, see my other post.

But use trace=file ( and equivalent to trace=open,stat,chmod,unlink,... )

"file" is a basket for all fileops with a string arg ( stat(), open() unlink() 
...
That way you not only see the files opened but often more interesting the
places that are searched for certain files.

uwe

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to