-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> hi
>
> I'm trying to find an approach to dump a list of files
> and directories accessed for the entire duration of a
> particular UML image, so that I can trimmed out not
> used files and directories. I don't care about files
> created or modified or deleted. Just the "read"
> access. How I approach this as best? Thanks.
>
basically you could strace the UML process it self (strace , not strace
- -f) and then grep out the open and frinds.
rtl17: # strace ./linux 2> /tmp/uml.log
rtl17: # grep open /tmp/uml.log
This will only work if you are accessing files on the host filesystem or
you will only see open("root_fs", O_RDWR|O_SYNC|O_LARGEFILE) = 10 etc.
If the UML has exclusive access to the directory then you can simply run
UML and then do ls -lR --sort=time --time=access and all files with an
access time during the runtime of the UML process were accessed by UML
If you need it very precise you can use a preload library on the UML side
to log all access (including any temp files) - droped an example to:
http://dslab.lzu.edu.cn/~hofrat/applogger.c
if you run this on the init process then you get all files ever opened
during the life time of the UML (excluding the last steps of the shutdown
procedures).
hofrat
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFFkN87nU7rXZKfY2oRAmG2AJ9UeiPcdf+yginXXrjf+FlOUZCoMQCfaaBk
Lu+4pooCdpHuF/JimvVrXuc=
=EOwb
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user