Results 1 to 5 of 5
hi,
I want to monitor the disk access, for that I am directly modifying read_write.c that contains calls vfs_read and vfs_write that manages disk access on virtual layer.
but to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-15-2006 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
Monitoring Disk Access With FileName & data
hi,
I want to monitor the disk access, for that I am directly modifying read_write.c that contains calls vfs_read and vfs_write that manages disk access on virtual layer.
but to do some operation on that data ,
(right now i just want to append to a file that vfs_write was called with '.....' these parameters),
So, we can have one Daemon process (or for this time just some user space process) that will do all operations in user space.. and read_write.c will directly transfer disk access detils to it..
i'm still working on IPC to handle messaging from kernel space to user space.
I'm getting disk access details in read_write.c...
how do i get the information in user space, say in a FIFO...??
when i tried to write info to a fifo, i'm getting "-14" error to "write" (tried both write system call and write in file descriptor)
thank you,
Saumitra
- 11-15-2006 #2
I always love the pseudo-filesystems (procfs, debugfs, sysfs)
I would use one of these and then I would write a user-land application.
Best Regards
- 11-15-2006 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
Thats Aint workin :(
Actually i'm getting lot of problems..
kernel crashed wen i tried bigger stuff like file write from read_write.c
can someone tell me what should i do to just get that information to some programm in my user mode?
- 11-16-2006 #4
IMHO, the easiest way to put data in user-space is with procfs or similar as I told you.
In addition, I would use kprobes to make some interesting and clean hooks, instead of modifying the kernel source itself.
Best Regards
- 11-23-2006 #5Just Joined!
- Join Date
- Nov 2006
- Posts
- 8
How About This?
ok...
i've decided some plans after analysis.. please someone help me to figure out if they would provide me with optimal way of doin 'em...
basically till now, all i want is to transfer data from kernel itself to user...
might require module in future as well...
so now, using shared Memory i'll transfer data from kernel to module with
and in Module --PHP Code:char buffer[100];
-----
EXPORT_SYMBOL(buffer);
so i got data in module....PHP Code:extern char * buffer;
----------------------------------------------
then to transfer data from Module to user.. How about using SOCKETS
like LOCAL SOCKETS OR NETLINK SOCKETS???
or should i look for any other IPC method like named pipes etc???


Reply With Quote
