<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Resource Limits - Revision history</title>
		<link>https://www.slackwiki.com/index.php?title=Resource_Limits&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.40.0</generator>
		<lastBuildDate>Wed, 08 Apr 2026 10:36:46 GMT</lastBuildDate>
		<item>
			<title>Beder at 01:35, 2 January 2013</title>
			<link>https://www.slackwiki.com/index.php?title=Resource_Limits&amp;diff=819&amp;oldid=prev</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Resource_Limits&amp;diff=819&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:35, 2 January 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Solution =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Solution =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To increase the hard limits for users, you will need to create '''/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sbin&lt;/del&gt;/initscript''' and place appropriate commands inside it.  The easiest way is to copy the file '''/sbin/initscript.sample''' to '''/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sbin&lt;/del&gt;/initscript''' and edit the copy, but you are certainly free to &quot;roll your own.&quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; If you decide to create your own, make sure it is executable or it will not work.  &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To increase the hard limits for users, you will need to create '''/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;etc&lt;/ins&gt;/initscript''' and place appropriate commands inside it.  The easiest way is to copy the file '''/sbin/initscript.sample''' to '''/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;etc&lt;/ins&gt;/initscript''' and edit the copy, but you are certainly free to &quot;roll your own.&quot;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using the following '''/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sbin&lt;/del&gt;/initscript''' file:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using the following '''/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;etc&lt;/ins&gt;/initscript''' file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  PATH=/bin:/sbin:/usr/bin:/usr/sbin&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  PATH=/bin:/sbin:/usr/bin:/usr/sbin&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  1024&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  1024&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notice that the hardlimit is now 4096 (as specified in /&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sbin&lt;/del&gt;/initscript), but the softlimit is still 1024.  In other words, you will still need to use /etc/profile (or some other shell init file - see below for recommendation) to raise the desired users' softlimits.  With some creative scripting, you can be more selective about which users have what limits.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notice that the hardlimit is now 4096 (as specified in /&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;etc&lt;/ins&gt;/initscript), but the softlimit is still 1024.  In other words, you will still need to use /etc/profile (or some other shell init file - see below for recommendation) to raise the desired users' softlimits.  With some creative scripting, you can be more selective about which users have what limits.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rather than editing the system /etc/profile, it's recommended to create a custom file in /etc/profile.d and make it executable.  This way, you don't have to worry about trying to merge your changes to /etc/profile when doing Slackware upgrades to new versions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rather than editing the system /etc/profile, it's recommended to create a custom file in /etc/profile.d and make it executable.  This way, you don't have to worry about trying to merge your changes to /etc/profile when doing Slackware upgrades to new versions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 02 Jan 2013 01:35:09 GMT</pubDate>
			<dc:creator>Beder</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Resource_Limits</comments>
		</item>
		<item>
			<title>Rworkman: Move from old wiki</title>
			<link>https://www.slackwiki.com/index.php?title=Resource_Limits&amp;diff=48&amp;oldid=prev</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Resource_Limits&amp;diff=48&amp;oldid=prev</guid>
			<description>&lt;p&gt;Move from old wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Purpose =&lt;br /&gt;
&lt;br /&gt;
This page does not attempt to explain the different types of system resource limits or when it is (or is not) appropriate to change them; see '''man ulimit''' and [[http://google.com Google]] for that discussion.&lt;br /&gt;
&lt;br /&gt;
However, some users run into problems with the linux kernel's default limit settings, so we'll attempt to explain how to modify them to suit special needs.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
The default settings provided by the kernel are sane values for most multi-user machines.  Issuing the command '''ulimit -Hn''' should show the following:&lt;br /&gt;
 user@host:~$ ulimit -Hn&lt;br /&gt;
 1024&lt;br /&gt;
and '''ulimit -n''' should show this:&lt;br /&gt;
 user@host:~$ ulimit -n&lt;br /&gt;
 1024&lt;br /&gt;
&lt;br /&gt;
The first command shows the hard limit set by the kernel, and the second command shows the soft limit set by the user.  An unprivileged user can increase the soft limit (up to the hard limit value), and he is also able to lower the hard limit (but then is unable to increase it, as an unprivileged user cannot raise the hard limit at all).&lt;br /&gt;
&lt;br /&gt;
There are some situations which might require a larger hard limit for users, and the obvious &amp;quot;solution&amp;quot; is to add a line in /etc/profile to increase it.  However, this will not work, because normal users cannot increase their hard limits (as indicated above).&lt;br /&gt;
&lt;br /&gt;
= Solution =&lt;br /&gt;
&lt;br /&gt;
To increase the hard limits for users, you will need to create '''/sbin/initscript''' and place appropriate commands inside it.  The easiest way is to copy the file '''/sbin/initscript.sample''' to '''/sbin/initscript''' and edit the copy, but you are certainly free to &amp;quot;roll your own.&amp;quot;  If you decide to create your own, make sure it is executable or it will not work.  &lt;br /&gt;
&lt;br /&gt;
Using the following '''/sbin/initscript''' file:&lt;br /&gt;
&lt;br /&gt;
 PATH=/bin:/sbin:/usr/bin:/usr/sbin&lt;br /&gt;
 export PATH&lt;br /&gt;
 &lt;br /&gt;
 # Increase the hardlimit for open files&lt;br /&gt;
 ulimit -Hn 4096&lt;br /&gt;
 &lt;br /&gt;
 # Execute the program.&lt;br /&gt;
 eval exec &amp;quot;$4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You should get the following after a reboot:&lt;br /&gt;
 user@host:~$ ulimit -Hn&lt;br /&gt;
 4096&lt;br /&gt;
 &lt;br /&gt;
 user@host:~$ ulimit -n&lt;br /&gt;
 1024&lt;br /&gt;
&lt;br /&gt;
Notice that the hardlimit is now 4096 (as specified in /sbin/initscript), but the softlimit is still 1024.  In other words, you will still need to use /etc/profile (or some other shell init file - see below for recommendation) to raise the desired users' softlimits.  With some creative scripting, you can be more selective about which users have what limits.&lt;br /&gt;
&lt;br /&gt;
Rather than editing the system /etc/profile, it's recommended to create a custom file in /etc/profile.d and make it executable.  This way, you don't have to worry about trying to merge your changes to /etc/profile when doing Slackware upgrades to new versions.&lt;br /&gt;
&lt;br /&gt;
= Other Resources =&lt;br /&gt;
&lt;br /&gt;
* '''man initscript'''&lt;br /&gt;
* '''man ulimit'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</description>
			<pubDate>Fri, 29 May 2009 00:17:30 GMT</pubDate>
			<dc:creator>Rworkman</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Resource_Limits</comments>
		</item>
</channel></rss>