Find what program accessed a kernel module
up vote
2
down vote
favorite
How do I access a list of users/programs that accessed a certain module?
I run:
lsmod | grep ^uvcvideo
This returns this line when no application is using my video camera:
uvcvideo 86016 0
Well, I have something running that when "0" at the end of the line turns to anything but 0 (in practice this is usually 1) it sends me a notification that my camera is in use.
I want to know if there is a log of programs that turned that 0 to a 1, or which modules are accessed when/how.
logs kernel-modules video syslog
New contributor
add a comment |
up vote
2
down vote
favorite
How do I access a list of users/programs that accessed a certain module?
I run:
lsmod | grep ^uvcvideo
This returns this line when no application is using my video camera:
uvcvideo 86016 0
Well, I have something running that when "0" at the end of the line turns to anything but 0 (in practice this is usually 1) it sends me a notification that my camera is in use.
I want to know if there is a log of programs that turned that 0 to a 1, or which modules are accessed when/how.
logs kernel-modules video syslog
New contributor
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
How do I access a list of users/programs that accessed a certain module?
I run:
lsmod | grep ^uvcvideo
This returns this line when no application is using my video camera:
uvcvideo 86016 0
Well, I have something running that when "0" at the end of the line turns to anything but 0 (in practice this is usually 1) it sends me a notification that my camera is in use.
I want to know if there is a log of programs that turned that 0 to a 1, or which modules are accessed when/how.
logs kernel-modules video syslog
New contributor
How do I access a list of users/programs that accessed a certain module?
I run:
lsmod | grep ^uvcvideo
This returns this line when no application is using my video camera:
uvcvideo 86016 0
Well, I have something running that when "0" at the end of the line turns to anything but 0 (in practice this is usually 1) it sends me a notification that my camera is in use.
I want to know if there is a log of programs that turned that 0 to a 1, or which modules are accessed when/how.
logs kernel-modules video syslog
logs kernel-modules video syslog
New contributor
New contributor
edited Nov 21 at 4:40
New contributor
asked Nov 21 at 4:10
David Kamer
1144
1144
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module
subsystem and is called module_get
.
https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module/449856 (long read).
To get you started, you can try perf trace -a --no-syscalls -e module:module_get -e module:module_put
. This shows the program name, but it does not show the PID.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module
subsystem and is called module_get
.
https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module/449856 (long read).
To get you started, you can try perf trace -a --no-syscalls -e module:module_get -e module:module_put
. This shows the program name, but it does not show the PID.
add a comment |
up vote
1
down vote
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module
subsystem and is called module_get
.
https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module/449856 (long read).
To get you started, you can try perf trace -a --no-syscalls -e module:module_get -e module:module_put
. This shows the program name, but it does not show the PID.
add a comment |
up vote
1
down vote
up vote
1
down vote
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module
subsystem and is called module_get
.
https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module/449856 (long read).
To get you started, you can try perf trace -a --no-syscalls -e module:module_get -e module:module_put
. This shows the program name, but it does not show the PID.
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module
subsystem and is called module_get
.
https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module/449856 (long read).
To get you started, you can try perf trace -a --no-syscalls -e module:module_get -e module:module_put
. This shows the program name, but it does not show the PID.
edited Nov 21 at 11:50
answered Nov 21 at 11:39
sourcejedi
22k43396
22k43396
add a comment |
add a comment |
David Kamer is a new contributor. Be nice, and check out our Code of Conduct.
David Kamer is a new contributor. Be nice, and check out our Code of Conduct.
David Kamer is a new contributor. Be nice, and check out our Code of Conduct.
David Kamer is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483118%2ffind-what-program-accessed-a-kernel-module%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown