Closed linhopa closed 6 years ago
The module siftr
couldn't be added simply, it needs the alq
(asynchronous logging queues) and vnode
.
And we havn't implemented the two modules.
A simpler way to implement alq
is that just use host's open/read/write/close
interface to log file.
I will give you a patch next few days.
Thanks. I'll be looking forward to the patch.
Here is the patch, you can apply it and do some tests.
Thanks a lot. I'll test it.
Dears, I tried the patch, and configured F-Stack to report into a file. The file is being created, but it's always empty. I tried the hello world as well, it prints that it's going to report SIFTR, again the file is empty. Do you have any updates in this regard or any other solution to collect the TCP stats like ss_thresh, window size,...? Your help is really appreciated. Many thanks.
I'm trying to compile siftr with kern_alq and I'm having problem to get it compiled successfully. what I added is the siftr.c under NETINET_SRCS, vfs_vnops.c and kern_alq.c under KERN_SRCS, vnode_pager.c under VM_SRCS. When I compile, I got this (this is just part of it): In file included from /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:79:0: /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.h:44:43: error: unknown type name ‘vop_getpages_iodone_t’ int count, int rbehind, int rahead, vop_getpages_iodone_t iodone, ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.h:49:39: error: ‘struct vop_getpages_args’ declared inside parameter list [-Werror] int vnode_pager_local_getpages(struct vop_getpages_args ap); ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.h:49:39: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.h:50:45: error: ‘struct vop_getpages_async_args’ declared inside parameter list [-Werror] int vnode_pager_local_getpages_async(struct vop_getpages_async_args ap); ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:89:12: error: unknown type name ‘vop_getpages_iodone_t’ int , vop_getpages_iodone_t, void ); ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:101:24: error: ‘vnode_pager_getpages_async’ undeclared here (not in a function) .pgo_getpages_async = vnode_pager_getpages_async, ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:111:1: error: no previous prototype for ‘vnode_create_vobject’ [-Werror=missing-prototypes] vnode_create_vobject(struct vnode vp, off_t isize, struct thread td) ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c: In function ‘vnode_create_vobject’: /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:117:2: error: implicit declaration of function ‘vn_isdisk’ [-Werror=implicit-function-declaration] if (!vn_isdisk(vp, NULL) && vn_canvmio(vp) == FALSE) ^ /home/developer/f-stack/lib/../freebsd/vm/vnode_pager.c:117:2: error: nested extern declaration of ‘vn_isdisk’ [-Werror=nested-externs]
This is my lib/Makefile: