Re: How to read /proc/locks in safe mode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il giorno ven, 15/07/2011 alle 11.57 -0400, Przemek Klosowski ha
scritto:
> 
> I can't think of anything to lock all the other processes on your
> system while your awk/cat is running, other than raising the priority
> of your process high enough.
> 
> Perhaps if you explained what you are trying to accomplish by your 
> processing of /proc/locks, people have some suggestions. Clearly your 
> situation is unusual---why do you have thousands of active locks? I 
> think a dozen or so is the norm (I have a fairly busy desktop with
> many sessions and programs open, and 20 locks are active right now). 

thanks Przemek

It's a server, and every user (>300) have ad least a lock on a specific
portion of the same file

The file /proc/locks contain also many other  (<5000) lines than those
lock and this virtual file is continuously modified.

If I try copy it (cp /proc/locks /tmp/l or cat /proc/locks>/tmp/l) two
times in succession, the result is always very different and the
abnormal line (more than 8 field) are like attachment of previous
message.

So, if I process this file with awk the result many time is
undefined ...

My goal is extract the lock line of a specific process an see if this
process lock a specific file and extract the offset lock.

This procedure work if none of user login or logout on the server, but
this condition is rare...

today have check the lslk utilities, but even it, if user login/logout
and work do not show the correct list: some time the result is wrong...

Thanks

-- 
Dario Lesca <d.lesca@xxxxxxxxxx>

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux