Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Think you found the answer already, but for the others:
This error usually occurs if you start the apcupsd twice. If "/etc/init.d/apcupsd stop" doesn't delete the Lockfile, then "joe /var/lock/LCK*" (or what ever the name of the Lockfile is)schows you the PID of the previous apcupsd-process. With "ps -p PID" you look up if it's really a apcupsd running. Then "kill PID"(the one you found out above) schould do the trick. Then "/etc/init.d/apcupsd start" schould be able to create the Lockfile.
I'm having the same problem, and there's no instance of apcupsd running. It never gets off the ground--during boot when the process would start, I get the same message "unable to create USP lock file."
OK, I figured out how to make apcupsd work again. I found various references via Google and it seems there's a bug in the apcupsd software that makes it not release a lock file after a power failure. I had tested it by pulling the power plug (=power failure) and the system shut down properly via apcupsd, very nice. But upon rebooting apcupsd would not start again because of this error--the lockfile still existing.
I deleted the file named /var/lock/apcupsd and then I was able to restart apcupsd.
Now if I only knew how to make that happen automatically next time the power goes out or I test the thing!
But at least that is one way to get it running again.
All right, here's how I got this situation fixed on my Mandrake 9.2 system.
I edited /etc/rc.d/init.d/apcupsd by inserting the line:
rm -f /var/lock/apcupsd
case "$1" in
where there are two pre-existing lines with rm commands.
That worked. I tested it by pulling the plug from the wall. After the five-minute interval I'd set in the configuration file, the system shut down correctly; I then powered off the USP as the program instructs you to, and restored the mains power, powered on the USP, the computer rebooted and USP monitoring is in place again.