Linux - Software This 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. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-24-2009, 04:29 AM
|
#1
|
Member
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73
Rep:
|
apcupsd: what is the function of a LOCKFILE?
I want to install an APC UPS Back-ups RS 800. For this I am using the apcupsd. In apcupsd.conf you can create a LOCKFILE. But I fail to understand its function. Why do I want, or do I not want a LOCKFILE?
Thanx for your advice
|
|
|
02-24-2009, 05:59 AM
|
#2
|
Member
Registered: Jun 2004
Location: colorado, USA
Distribution: slack, oBSD
Posts: 119
Rep:
|
A lock file generally indicates a file is in use. For example, the Vim editor will lock a file while you edit it, so you don't try to modify it from another terminal.
It can also mean a program (or daemon) is running and shouldn't be duplicated without first stopping the original, which will remove the lock file as it exits.
As you're being given the option to use one or not, this daemon may be different. There may be more info in the docs.
Last edited by zedmelon; 02-24-2009 at 06:01 AM.
|
|
|
02-24-2009, 06:32 AM
|
#3
|
Member
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73
Original Poster
Rep:
|
Thanx ZedMelon, I know what a lock file is
I wanted to know what the function LOCKFILE in apcupsd is. The man page says:
LOCKFILE -- <path to lockfile>
By supplying this argument, "apcupsd" tries to create a lockfile for the serial or USB port in the specified directory.
So I know it makes a lockfile for the serial or USB port, but why whould I do that? Should I? Or should I not and why?
|
|
|
02-26-2009, 12:25 AM
|
#4
|
Member
Registered: Jun 2004
Location: colorado, USA
Distribution: slack, oBSD
Posts: 119
Rep:
|
Quote:
Originally Posted by engelienart
I know what a lock file is
|
Ewps, sorry.
Well, I'm *guessing* (read: disclaimer) that since the lockfile would prevent anything else from using the port, you'd "opt out" if you want to share it with another program.
Taking my above guess as granted, an example:
I have some X-10 lighting controllers which enable my Linux box to control the lights on the front of my house. I wrote a shell script to follow a schedule and never have to remember it's getting dark or to turn them off at bedtime. They're controlled through a small RF transmitter with a male serial port on one end and female on the other. The transmitter has a pass-through characteristic I could use to share the serial port with something else, if I had anything else needing a serial connection.
To make a short story long...
Unless you catch yourself thinking, "Man, if only I had another serial port," the lock file is probably the preferred route. Also, I have no idea how you'd split signals or coordinate the time-share on the port.
|
|
|
02-27-2009, 04:02 AM
|
#5
|
Member
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73
Original Poster
Rep:
|
lmao. Ok, my xmas lights next xmas will rock!
So LOCKFILE is a good option if I don't want other progmras to use that specific port. I my case it is an obsolete function: no other program will use that port. (if it does, I 'll add the LOCKFILE option)
And thanx for your explination.
|
|
|
02-28-2009, 03:18 AM
|
#6
|
Member
Registered: Jun 2004
Location: colorado, USA
Distribution: slack, oBSD
Posts: 119
Rep:
|
Quote:
Originally Posted by engelienart
lmao. Ok, my xmas lights next xmas will rock!
|
Sure, you could use them for Christmas lights too. I bought the module that replaces a standard light switch, so they're on my regular lights. It's quite convenient, and my wife and son don't have to worry about driving home to a dark house if I'm working late.
There's a remote I never got working quite right. The X-10 hardware is neat, but not of the greatest quality. Still a fun project though. Way geeky.
BTW, I'd actually use the lockfile anyway, then you'll be certain nothing else will send a signal to the UPS's port.
--my two cents
Last edited by zedmelon; 02-28-2009 at 03:20 AM.
|
|
|
03-01-2009, 04:55 AM
|
#7
|
Member
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73
Original Poster
Rep:
|
Buy an expensive X-10 hardware? (I don't even know what it is) I 'll think of something cheaper: like telling my gf to switch the xmaslights on and off.
Thanx for your 2 cents. I 've been reading some manuals. I 'll use the standard settings and keep my fingers crossed.
|
|
|
All times are GMT -5. The time now is 07:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|