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

Re: lockfile--what is it?



On Fri, Feb 22, 2036 at 04:30:32AM -0800, Steve Winston wrote:
> What is lockfile /var/run/update-menus.pid?
> In slink, when I run install after apt-get, etc., I
> get the following message:
> "update-menus -
> cannot remove lockfile /var/run/update-menus.pid"
>    I can't find any reference to this file. This has
> just started to appear.
> What is a lockfile anyway? How is this affecting my 
> system's performance? Should I worry? Should I remove
> it? How?
> thanks, steve w.

Lockfiles just inform other processes not to mess around with the
resources 'cause another process already is.  So, you either had an
update-menus crap out on you or you have a zombie process.  The file
just contains the process id.  First, try:
	$ ps aux | grep `cat /var/run/update-menus.pid`
	(Those are grave accents not apostrophes!)
If that turns up nothing besides the grep process then its okay to
remove it.  If it turns up a running "/usr/bin/update-menus" try:
	$ kill `cat /var/run/update-menus.pid`
Then check to see if it's still running with the first command. If so,
you may need to specify a different signal:
	$ kill -9 `cat /var/run/update-menus.pid`
You can also do this from top.

p.s. It doesn't effect system performance one iota, unless you have a
zombie process or a process stuck in an infinite loop (eating CPU).

-- 
+----------------------------------------------------+
| Eric G. Miller                        egm2@jps.net |
| GnuPG public key: http://www.jps.net/egm2/gpg.asc  |
+----------------------------------------------------+


Reply to: