Skip to content
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

monitor_metrics.py lslocks doesn't show file path #37

Open
hueyvle opened this issue Apr 11, 2023 · 3 comments
Open

monitor_metrics.py lslocks doesn't show file path #37

hueyvle opened this issue Apr 11, 2023 · 3 comments

Comments

@hueyvle
Copy link

hueyvle commented Apr 11, 2023

I ran it in centos7 container and opensuse 15 (baremetal), lslocks doesn't show the path of files being locked by p4d. These are locks caused by p4 stats. p4d version 2022.1/2361553

# lslocks -o +BLOCKER
COMMAND           PID  TYPE SIZE MODE  M START END PATH                            BLOCKER
anacron          2723 POSIX   0B WRITE 0     0   0 /var/spool/anacron/cron.weekly  
anacron          2723 POSIX   0B WRITE 0     0   0 /var/spool/anacron/cron.monthly 
p4d              7165 FLOCK   0B READ  0     0   0                                 
p4d              7165 FLOCK   0B READ  0     0   0                                 
p4d              7165 FLOCK   0B READ  0     0   0                                 
rhsmcertd         102 FLOCK   0B WRITE 0     0   0 /run/lock/subsys/rhsmcertd      
lvmetad            97 POSIX   3B WRITE 0     0   0 /run/lvmetad.pid                
crond             101 FLOCK   4B WRITE 0     0   0 /run/crond.pid    

lsof actually displays correctly

p4d       7165      root   18uR     REG              259,1  3984678912   28442608 /opt/perforce/depot/db.revdx
p4d       7165      root   19uR     REG              259,1 23456456704   28442609 /opt/perforce/depot/db.revhx
p4d       7165      root   20uR     REG              259,1  8059305984   28442611 /opt/perforce/depot/db.revsx

R=full file read lock, W=full file write lock
You might consider using lsof as it is more reliable.

@nagonzalez
Copy link

@hueyvle : we ran into this issue and patched monitor-metrics.py to collect lock info for p4d commands even if path is null. Would you be interested in that ? Happy to submit PR if so.

@hueyvle
Copy link
Author

hueyvle commented Jan 25, 2024

@nagonzalez Sure, where is your commit?

@nagonzalez
Copy link

#49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants