Getting Information about locks associated with a process
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am unable to list the locks associated with a process and information about the locks i.e How many threads share this lock etc.
Kindly tell my how to extract this information from a process ID.
My case:
i have run sysbench command
sysbench --test=threads --thread-locks=100 --max-time=20s run
i want to list locks that sysbench just created and information about the locks i.e which threads the sharing this lock etc
linux
add a comment |Â
up vote
0
down vote
favorite
I am unable to list the locks associated with a process and information about the locks i.e How many threads share this lock etc.
Kindly tell my how to extract this information from a process ID.
My case:
i have run sysbench command
sysbench --test=threads --thread-locks=100 --max-time=20s run
i want to list locks that sysbench just created and information about the locks i.e which threads the sharing this lock etc
linux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am unable to list the locks associated with a process and information about the locks i.e How many threads share this lock etc.
Kindly tell my how to extract this information from a process ID.
My case:
i have run sysbench command
sysbench --test=threads --thread-locks=100 --max-time=20s run
i want to list locks that sysbench just created and information about the locks i.e which threads the sharing this lock etc
linux
I am unable to list the locks associated with a process and information about the locks i.e How many threads share this lock etc.
Kindly tell my how to extract this information from a process ID.
My case:
i have run sysbench command
sysbench --test=threads --thread-locks=100 --max-time=20s run
i want to list locks that sysbench just created and information about the locks i.e which threads the sharing this lock etc
linux
edited May 9 at 11:21
asked May 9 at 10:57
Muhammad Umer Saeed
11
11
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
you can get lock process list using below command
lslocks
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
add a comment |Â
up vote
0
down vote
If you're talking about file locks,
lsof -p PID
will list all files opened by process with PID
.
lsof -c processname
will list all files opened by processname
.
Note that lsof
lists also files opened only for read i.e. without file locks. The mode under which a file is open is specified as the fourth character in the FD (File Descriptor) column in the output:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
you can get lock process list using below command
lslocks
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
add a comment |Â
up vote
0
down vote
you can get lock process list using below command
lslocks
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
add a comment |Â
up vote
0
down vote
up vote
0
down vote
you can get lock process list using below command
lslocks
you can get lock process list using below command
lslocks
answered May 9 at 11:05
jayeshkh007
1093
1093
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
add a comment |Â
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
lslocks does not list the locks associated with a process in my case I am running sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run Locks associated with sysbench are not listing in lslocks
â Muhammad Umer Saeed
May 9 at 11:17
add a comment |Â
up vote
0
down vote
If you're talking about file locks,
lsof -p PID
will list all files opened by process with PID
.
lsof -c processname
will list all files opened by processname
.
Note that lsof
lists also files opened only for read i.e. without file locks. The mode under which a file is open is specified as the fourth character in the FD (File Descriptor) column in the output:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
add a comment |Â
up vote
0
down vote
If you're talking about file locks,
lsof -p PID
will list all files opened by process with PID
.
lsof -c processname
will list all files opened by processname
.
Note that lsof
lists also files opened only for read i.e. without file locks. The mode under which a file is open is specified as the fourth character in the FD (File Descriptor) column in the output:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If you're talking about file locks,
lsof -p PID
will list all files opened by process with PID
.
lsof -c processname
will list all files opened by processname
.
Note that lsof
lists also files opened only for read i.e. without file locks. The mode under which a file is open is specified as the fourth character in the FD (File Descriptor) column in the output:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
If you're talking about file locks,
lsof -p PID
will list all files opened by process with PID
.
lsof -c processname
will list all files opened by processname
.
Note that lsof
lists also files opened only for read i.e. without file locks. The mode under which a file is open is specified as the fourth character in the FD (File Descriptor) column in the output:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
edited May 9 at 11:11
answered May 9 at 11:03
dr01
15.2k114768
15.2k114768
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
add a comment |Â
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
I have run sysbench command sysbench --test=threads --thread-locks=100 --max-time=20s run
â Muhammad Umer Saeed
May 9 at 11:15
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
now i want to list the locks that sysbench just created and find information about the locks i.e which threads are sharing these locks
â Muhammad Umer Saeed
May 9 at 11:16
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Then please edit your question and add this information there.
â dr01
May 9 at 11:17
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
Edited thanks a lot
â Muhammad Umer Saeed
May 9 at 11:26
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442731%2fgetting-information-about-locks-associated-with-a-process%23new-answer', 'question_page');
);
Post as a guest
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
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
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