-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import monitor tool from DragonflyBSD #30
Conversation
f3979f7
to
7be1a57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks, this seems like a good idea! I noted some minor style nits, and I have one substantive suggestion: pass the paths through vis(3) and generally make the output format reliably parseable, so that it can be safely fed through awk or otherwise reliably ingested by other programs. What do you think?
if (VerboseOpt && fstat(kev->ident, &st) == 0 && | ||
S_ISREG(st.st_mode)) { | ||
printf(" %10jd", (intmax_t)st.st_size); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be presented differently so the format is more easily parseable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be presented differently so the format is more easily parseable?
Any suggestion. The size is always shown in a predictable field for awk.
I think I addressed all your suggestions. The only bug though is that a file should no longer be monitored after a delete event, since it no longer catches events after that. I no longer think this tool belongs at all to base but examples instead. |
Also trying with FreeBSD: freebsd/freebsd-src#1087