question about CFURLCreateFileURL
question about CFURLCreateFileURL
- Subject: question about CFURLCreateFileURL
- From: Patrick Proniewski <email@hidden>
- Date: Thu, 19 Jan 2012 17:38:03 +0100
Hello,
First, I must admit I'm not a developer. I know almost nothing about compiled languages and I can't write a single line of C code (but I'm proficient with bash).
I want to track down file access using Dtrace tools like /usr/bin/filebyproc.d or /usr/bin/pathopens.d for example. It appears that some processes access files using their ID instead of their human readable Path. ie. they open /.vol/VOLUME_ID/INODE instead of /path/to/the/file.
I need to convert this ID URL into a Path URL.
Mac OS X 10.6 documentation refers to the function CFURLCreateFileURL that is supposed to convert a file-ID URL to a path-based URL. But I can't find any sample code that uses this function, nor any already-made command line utility that provides this conversion.
<http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_6.html#//apple_ref/doc/uid/TP40008898-SW1>
First question: am-I right about the possibility to convert /.vol/VOLUME_ID/INODE into /path/to/the/file?
Second question: if so, is there any sample code I could use, or even better a command line application, or DTrace function that would do the translation?
My purpose is to design a script/utility that would run in the background to collect a log of file accesses over few days/week. The final log would be parsed later for analysis. Later translation of /.vol/VOLUME_ID/INODE into /path/to/the/file (using find for example) is not an option.
The final analysis would show what files/directories/volumes are accessed, sorted by frequency (or other metric available thru DTrace like seektime, byte…)
Any help appreciated.
Patrick
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden