Opened 15 years ago

Closed 15 years ago

#20587 closed defect (fixed)

error in org.macports.smokeping.plist

Reported by: schneider.pj@… Owned by: markd@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: smokeping launchd daemondo org.macports.smokeping.plist Cc:
Port: smokeping

Description

Hi there,

first of all I want to thank you for MacPorts, this is great software! Thank you!

I discovered a problem that I wanted to report: The file org.macports.smokeping.plist supplied with smokeping in MacPorts leads launchd to do a "throtteling respawn" every 10s. This uses system ressources and creates tons of crap in the logfiles.

This does not affect functionallity, because smokeping discovers that there already is a file called /var/run/smokeping.pid. But smokeping always logs this error :-)

Would be nice if anyone could fix this.

Thanks a lot.

Peter

Attachments (1)

Bild 1.png (490.7 KB) - added by schneider.pj@… 15 years ago.
Screenshot Console-logs of smokeping

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by tobypeterson

Is smokeping crashing? If so, please provide crash logs.

Changed 15 years ago by schneider.pj@…

Attachment: Bild 1.png added

Screenshot Console-logs of smokeping

comment:2 Changed 15 years ago by schneider.pj@…

No, it does not crash. Launchd just tries to relaunch it, but it discovers that it already is running.

Added a screenshot to clarify.

comment:3 Changed 15 years ago by blb@…

Owner: changed from macports-tickets@… to markd@…

comment:4 Changed 15 years ago by tobypeterson

In that case, I'd guess that the tool is just daemonizing (fork, parent exits), so launchd loses track of it.

comment:5 Changed 15 years ago by schneider.pj@…

This is true, smokeping is daemonizing on startup. I thought this is why it uses daemondo with launchd?

comment:6 Changed 15 years ago by markd@…

I guess smokeping does daemonize on startup. Well in that case I should have added the '--nodaemon' option to the startupitem keyword. Like this:

startupitem.executable ${prefix}/bin/smokeping --nodaemon

Can you try that and tell me if that fixes it? I'd be happy to modify the portfile but I don't have time to test it.

comment:7 Changed 15 years ago by schneider.pj@…

You're great, markd! :)

This seems to do the job:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Debug</key>
	<false/>
	<key>Label</key>
	<string>org.macports.smokeping</string>
	<key>OnDemand</key>
	<false/>
	<key>ProgramArguments</key>
	<array>
		<string>/opt/local/bin/daemondo</string>
		<string>--label=smokeping</string>
		<string>--start-cmd</string>
		<string>/opt/local/bin/smokeping</string>
		<string>--nodaemon</string>
		<string>;</string>
		<string>--pid=exec</string>
	</array>
	<key>RunAtLoad</key>
	<false/>
</dict>
</plist>

I just added the nodaemon-option and everything seems fine now.

If I find anything else that's broken with this, I'll report it. Thanks ;-)

comment:8 Changed 15 years ago by markd@…

Great to hear. I'll update the port and ui_msg in an hour or two. Thanks!

comment:9 Changed 15 years ago by markd@…

Resolution: fixed
Status: newclosed

Added --nodaemon in r55128.

Note: See TracTickets for help on using tickets.