On Sun, May 02, 2004 at 03:43:25PM +0300, Honen, Oren wrote: [snip] > > Let me try to be more clear: > I'm running an application which I can't touch it's code. This app. is > reading a data file I'm giving it via a command line option ( -i <file > name> ). The file I'm giving is the huge data file of which I have > several variants. The difference between the variants is only several > lines. > I need to have all the variants in my release and I have several > releases. > The original data file ( i.e. the huge file ) is located on nfs. > My releases are also located on nfs and my quota is limited. > Yes, I can increase my quota but I want "smarter" solution. > Yes, I can make local variants when running the application but I > want... > If it's not clear, then something has to run in the background and know > the original file, the patch and the destination file. It needs to be > able to answer open, read and maybe even write. > > And now to direct answers: > - I run the application so I can give what ever input data name/path I > wish. > - I have no control over the application ones it is running but I know > it reads the ascii file. I also know by it's memory usage, that it does > not load the entire data to memory. > - FIFO can not be used as I guess that the data is not read sequentially > since it is a N-tree data structure. > - I don't really know but I don't think I can use ld_preload as I don't > know how the app. is working or how it was compiled. As far as I know, > the app. is a black box that reads a huge text based N-tree design. > - I wish to gain disk quota on my nfs area.
Well, there is one thing not mentioned yet - you can try and use UML (UserModeLinux). It will work better than ld_preload (e.g. with static executables), and can practically allow you to write your own patch to the kernel without being root. But, as others said, it's much more work. However, I personally think it's better to be wise than smart. Try to make your customer ask for some more control over the executable (not source, if it's not possible, but something better than a single undocumented binary), that will allow doing this both efficiently and in a stable, clean manner. Maybe have the app dynamically linked with a library you can patch, maybe have it talk to another process instead of reading the file directly, etc. > > Anyway I already gained some knowledge, and for that only I thank you > all. Good luck. -- Didi > Oren. > > +++++++++++++++++++++++++++++++++++++++++++ > This Mail Was Scanned By Mail-seCure System > at the Tel-Aviv University CC. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
