Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault. I've tried with an empty dict: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array> <key>SoftResourceLimits</key> <dict> </dict> </dict> </plist> And also with some dummy values: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array> <key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer> <key>CPU</key> <integer>10000000000</integer> <key>Data</key> <integer>10000000000</integer> <key>FileSize</key> <integer>10000000000</integer> <key>MemoryLock</key> <integer>10000000000</integer> <key>NumberOfFiles</key> <integer>8192</integer> <key>NumberofProcesses</key> <integer>150</integer> <key>ResidentSetSize</key> <integer>100000000</integer> <key>Stack</key> <integer>10000</integer> </dict> </dict> </plist> Do I at least have the format correct? I couldn't find any examples with google to work from. Cheers, Greeg
Which build of the OS? On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
The build is 10.4.10. On 9-Jul-07, at 9:20 AM, Dave Zarzycki wrote:
Which build of the OS?
On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
Sadly, in retrospect, it looks like the soft/hard limit code in Tiger (not Leopard) contains an easily confusable implementation. Can you wait until Leopard? davez On Jul 9, 2007, at 11:00 AM, Greg Dingle wrote:
The build is 10.4.10.
On 9-Jul-07, at 9:20 AM, Dave Zarzycki wrote:
Which build of the OS?
On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
No, sorry, can't wait until Leopard. I want to use the resource limits for a program currently running on a production server. What is thing that is easily confused? I have tried both soft/hard limits -- that is not what you mean, is it? Is the implementation actually broken? I thought somebody here could just clarify the form for setting the limits. Greg On 9-Jul-07, at 1:28 PM, Dave Zarzycki wrote:
Sadly, in retrospect, it looks like the soft/hard limit code in Tiger (not Leopard) contains an easily confusable implementation. Can you wait until Leopard?
davez
On Jul 9, 2007, at 11:00 AM, Greg Dingle wrote:
The build is 10.4.10.
On 9-Jul-07, at 9:20 AM, Dave Zarzycki wrote:
Which build of the OS?
On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
Syntactically, what you added to your property list is correct. The bug in launchd (fixed in Leopard) is difficult to explain. I think the most pragmatic thing to do on a Tiger based system is to do is wrap the daemon in a quick shell script and have it adjust the resource limit you want. For example: #!/bin/sh ulimit -c 0 exec /usr/sbin/serverd davez On Jul 9, 2007, at 1:38 PM, Greg Dingle wrote:
No, sorry, can't wait until Leopard. I want to use the resource limits for a program currently running on a production server.
What is thing that is easily confused? I have tried both soft/hard limits -- that is not what you mean, is it? Is the implementation actually broken? I thought somebody here could just clarify the form for setting the limits.
Greg
On 9-Jul-07, at 1:28 PM, Dave Zarzycki wrote:
Sadly, in retrospect, it looks like the soft/hard limit code in Tiger (not Leopard) contains an easily confusable implementation. Can you wait until Leopard?
davez
On Jul 9, 2007, at 11:00 AM, Greg Dingle wrote:
The build is 10.4.10.
On 9-Jul-07, at 9:20 AM, Dave Zarzycki wrote:
Which build of the OS?
On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
Ok, thanks for the help. On 9-Jul-07, at 1:43 PM, Dave Zarzycki wrote:
Syntactically, what you added to your property list is correct. The bug in launchd (fixed in Leopard) is difficult to explain. I think the most pragmatic thing to do on a Tiger based system is to do is wrap the daemon in a quick shell script and have it adjust the resource limit you want. For example:
#!/bin/sh
ulimit -c 0
exec /usr/sbin/serverd
davez
On Jul 9, 2007, at 1:38 PM, Greg Dingle wrote:
No, sorry, can't wait until Leopard. I want to use the resource limits for a program currently running on a production server.
What is thing that is easily confused? I have tried both soft/hard limits -- that is not what you mean, is it? Is the implementation actually broken? I thought somebody here could just clarify the form for setting the limits.
Greg
On 9-Jul-07, at 1:28 PM, Dave Zarzycki wrote:
Sadly, in retrospect, it looks like the soft/hard limit code in Tiger (not Leopard) contains an easily confusable implementation. Can you wait until Leopard?
davez
On Jul 9, 2007, at 11:00 AM, Greg Dingle wrote:
The build is 10.4.10.
On 9-Jul-07, at 9:20 AM, Dave Zarzycki wrote:
Which build of the OS?
On Jul 7, 2007, at 4:16 PM, Greg Dingle wrote:
Hi, I'm just trying to get the resource limits working with launchd and a plist. Whatever I try I get a segmentation fault.
I've tried with an empty dict:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> </dict>
</dict> </plist>
And also with some dummy values:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>TEST</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/bin/ls</string> </array>
<key>SoftResourceLimits</key> <dict> <key>Core</key> <integer>10000000000</integer>
<key>CPU</key> <integer>10000000000</integer>
<key>Data</key> <integer>10000000000</integer>
<key>FileSize</key> <integer>10000000000</integer>
<key>MemoryLock</key> <integer>10000000000</integer>
<key>NumberOfFiles</key> <integer>8192</integer>
<key>NumberofProcesses</key> <integer>150</integer>
<key>ResidentSetSize</key> <integer>100000000</integer>
<key>Stack</key> <integer>10000</integer> </dict>
</dict> </plist>
Do I at least have the format correct? I couldn't find any examples with google to work from.
Cheers,
Greeg
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
participants (2)
-
Dave Zarzycki
-
Greg Dingle