pericles-project / pet

PERICLES Extraction Tool
Apache License 2.0
17 stars 1 forks source link

New module to analyse dynamic software dependencies and parameters #11

Open corubolo opened 9 years ago

corubolo commented 9 years ago

For some use case, such as when decoding video in existing software, it could be useful to have a trace of the decoding libraries and pipe-line used, so that there is a knowledge of how the video processed (as different libraries can perform in differently and give different results). This could be archived by observing the external library calls, their versions (ex. by looking ad version strings in DLL), and the parameters passed to the libraries. Post-processing options will influence the visual results as well; so would be useful to have the option to extract the processing options of the processing settings in the driver as that will use for decoding.

anjackson commented 9 years ago

In case it's of any use, I did some related work on using system tracing to determine resource and software dependencies, see: http://arxiv.org/abs/1111.0735

To summarise my findings at the time, it's pretty straightforward on Linux, especially if you can wrap strace around the process from the start. It should also be possible on BSD/OS X/Solaris using dtrace and specifically dtruss. Windows was unfortunately rather more painful - I could find ways of polling open files, but this is not very reliable, and the only thing like strace I could find was too buggy to use reliable.

Good luck, BTW - this project looks great.

corubolo commented 9 years ago

Dear Andy, thanks for the feedback!

Your article is really interesting and affine to ideas we developed for the PET tool, I was not aware of it. Pity not to have found it earlier as it would have saved us some time :)
Our current module, that we use to track open files (in one use case documentation opened when users are performing some specific tasks), is using lsof, because it does not require admin privileges, an important fact in the scope of the tool (it seems rather difficult to request Admin privileges in Java without running the whole software under su). Strace (and dtruss) are indeed something that would be useful for this issue, as you suggest. We also had the same experience in Windows, where we could not find any reliable software (and the process monitor - handle from sysinternals also has a license that forbids redistribution) and the reporting is not reliable. LSOF was in fact a surprise since, even run in iterative mode (there is no monitoring mode) it seems to be pretty reliable in reporting all open files and network connection - although is more limited then strace. Thank you