<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Increasing nofiles in ulimit in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963499#M814520</link>
    <description>Russell,&lt;BR /&gt;&lt;BR /&gt;ulimit is a shell builtin as well as separate binary.&lt;BR /&gt;&lt;BR /&gt;the ulimit which gets called when you just type ulimit at the prompt is different from the ulimit executable called as /bin/ulimit or /usr/bin/ulimit.&lt;BR /&gt;&lt;BR /&gt;in fact plainly ulimit -a does not work at the command prompt - say 'wrong option(s).&lt;BR /&gt;&lt;BR /&gt;man ksh says this -&lt;BR /&gt;&lt;BR /&gt;ulimit [n] if n is given impose a size limit of 'n' 512 byte blocks on files written by child processes. if n is not given the current limit is printed.&lt;BR /&gt;&lt;BR /&gt;i am unable to find the man page for the ulimit command as opposed to the ulimit shell builtin.&lt;BR /&gt;&lt;BR /&gt;i believe that when you call the ulimit command from within your script as /bin/ulimit, it calls the ulimit command and from command prompt it calls the shell builtin. that's why your variance in output.&lt;BR /&gt;&lt;BR /&gt;wonder why i cannot find a man page for ulimit command.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;- ramd.</description>
    <pubDate>Thu, 01 May 2003 11:30:34 GMT</pubDate>
    <dc:creator>Ramkumar Devanathan</dc:creator>
    <dc:date>2003-05-01T11:30:34Z</dc:date>
    <item>
      <title>Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963493#M814514</link>
      <description>We are experiencing problems running overnight jobs and I identified that the threshold of nfile was being reached at the point when the job fell over.  I subsequently increased the nfile paramter from 6010 to 12020 and rebooted the server. I can see now that the threshold is much higher and is not now being reached.&lt;BR /&gt;&lt;BR /&gt;We are still however experiencing problems intermittanly.&lt;BR /&gt;&lt;BR /&gt;I have been advised to check that values returned by performing 'ulimit -a' from command line, and within the application (which runs the job that is failing).&lt;BR /&gt;&lt;BR /&gt;From within the application, the following is reported :&lt;BR /&gt;&lt;BR /&gt;Ulimit..BeforeJob (ExecSH): Executed command: "/bin/ulimit -a"&lt;BR /&gt;*** Output from command was: ***&lt;BR /&gt;time(seconds)        unlimited&lt;BR /&gt;file(blocks)         unlimited&lt;BR /&gt;data(kbytes)         1048576&lt;BR /&gt;stack(kbytes)        8192&lt;BR /&gt;memory(kbytes)       unlimited&lt;BR /&gt;coredump(blocks)     4194303&lt;BR /&gt;nofiles(descriptors) 1024&lt;BR /&gt;&lt;BR /&gt;and from command line, issuing a ulimit -a returns :&lt;BR /&gt;&lt;BR /&gt;time(seconds)        unlimited&lt;BR /&gt;file(blocks)         unlimited&lt;BR /&gt;data(kbytes)         1048576&lt;BR /&gt;stack(kbytes)        8192&lt;BR /&gt;memory(kbytes)       unlimited&lt;BR /&gt;coredump(blocks)     4194303&lt;BR /&gt;nofiles(descriptors) 512&lt;BR /&gt;&lt;BR /&gt;This poses a couple of questions ...&lt;BR /&gt;&lt;BR /&gt;I do not understand why the value of nofiles is different running a shell initiated by the app to opening a shell normally, but I suspect that the following lines taken from the application 'environment configuration file' may influence it ...&lt;BR /&gt;&lt;BR /&gt;# Locate "osh" and exec it if found&lt;BR /&gt;ULIMIT=`(ulimit) 2&amp;gt;/dev/null`&lt;BR /&gt;&lt;BR /&gt;if [ $? = 0 -a "$ULIMIT" != "unlimited" ] ; then&lt;BR /&gt;if [ $? = 0 -a "$ULIMIT" -lt 2113674 ] ; then&lt;BR /&gt;    if [ -f $ORACLE_HOME/bin/osh ] ; then&lt;BR /&gt; exec $ORACLE_HOME/bin/osh&lt;BR /&gt;    else&lt;BR /&gt; for D in `echo $PATH | tr : " "`&lt;BR /&gt; do&lt;BR /&gt;     if [ -f $D/osh ] ; then&lt;BR /&gt;  exec $D/osh&lt;BR /&gt;     fi&lt;BR /&gt; done&lt;BR /&gt;    fi&lt;BR /&gt;  fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I cannot get my head around why when typing `ulimit` which returns the text 'unlimited' it contiues to report the stats listed at the start (nofiles(descriptors) 1024) instead of unlimited.&lt;BR /&gt;&lt;BR /&gt;How do I get the value of nofiles higher than 1024 ?&lt;BR /&gt;&lt;BR /&gt;The value of the parameters maxfiles (Soft limit) is 512, and maxfiles_lim (Hard limit) is 2048&lt;BR /&gt;&lt;BR /&gt;Do these need to be increased ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help&lt;BR /&gt;&lt;BR /&gt;Russell&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2003 10:36:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963493#M814514</guid>
      <dc:creator>Russell Gould</dc:creator>
      <dc:date>2003-05-01T10:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963494#M814515</link>
      <description>you can use &lt;BR /&gt;&lt;BR /&gt;#ulimit -Hn  2048</description>
      <pubDate>Thu, 01 May 2003 10:45:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963494#M814515</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-05-01T10:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963495#M814516</link>
      <description>Thanks for this.&lt;BR /&gt;&lt;BR /&gt;I did try ulimit -Hf and -Sf Unlimited, and indeed Hn 2048, but when you run ulimit again, it does not report the new values ?&lt;BR /&gt;&lt;BR /&gt;I therefore am not sure as to whether the new value has been taken or not.&lt;BR /&gt;&lt;BR /&gt;Any ideas ?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Russ</description>
      <pubDate>Thu, 01 May 2003 10:50:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963495#M814516</guid>
      <dc:creator>Russell Gould</dc:creator>
      <dc:date>2003-05-01T10:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963496#M814517</link>
      <description>Hi Russell,&lt;BR /&gt;&lt;BR /&gt;Did you run ulimit as root?&lt;BR /&gt;&lt;BR /&gt;The effective user id and current user id when you run it from command line determine the value of ulimit's output.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;$ id&lt;BR /&gt;uid=102(ramd) gid=20(users)&lt;BR /&gt;$ ulimit&lt;BR /&gt;unlimited&lt;BR /&gt;$&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;# id&lt;BR /&gt;uid=0(root) gid=3(sys) groups=0(root),1(other)&lt;BR /&gt;(lp)&lt;BR /&gt;# ulimit&lt;BR /&gt;4194303&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;I guess you shuold perform all operations as root to have any effect.&lt;BR /&gt;&lt;BR /&gt;- ramd.</description>
      <pubDate>Thu, 01 May 2003 10:58:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963496#M814517</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-05-01T10:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963497#M814518</link>
      <description>Can you try this&lt;BR /&gt;&lt;BR /&gt;$ulimit -Sn `ulimit -Hn`&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2003 11:05:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963497#M814518</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-05-01T11:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963498#M814519</link>
      <description>Same thing happens whether I'm a normal user or a UID 0 account.&lt;BR /&gt;&lt;BR /&gt;I have also tried ulimit -Sn `ulimit -Hn`&lt;BR /&gt;&lt;BR /&gt;This does seem to increase limit to 2048&lt;BR /&gt;&lt;BR /&gt;Should I use this in my application environment ? Why is it not taking ulimit and returning it as unlimited ?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2003 11:17:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963498#M814519</guid>
      <dc:creator>Russell Gould</dc:creator>
      <dc:date>2003-05-01T11:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963499#M814520</link>
      <description>Russell,&lt;BR /&gt;&lt;BR /&gt;ulimit is a shell builtin as well as separate binary.&lt;BR /&gt;&lt;BR /&gt;the ulimit which gets called when you just type ulimit at the prompt is different from the ulimit executable called as /bin/ulimit or /usr/bin/ulimit.&lt;BR /&gt;&lt;BR /&gt;in fact plainly ulimit -a does not work at the command prompt - say 'wrong option(s).&lt;BR /&gt;&lt;BR /&gt;man ksh says this -&lt;BR /&gt;&lt;BR /&gt;ulimit [n] if n is given impose a size limit of 'n' 512 byte blocks on files written by child processes. if n is not given the current limit is printed.&lt;BR /&gt;&lt;BR /&gt;i am unable to find the man page for the ulimit command as opposed to the ulimit shell builtin.&lt;BR /&gt;&lt;BR /&gt;i believe that when you call the ulimit command from within your script as /bin/ulimit, it calls the ulimit command and from command prompt it calls the shell builtin. that's why your variance in output.&lt;BR /&gt;&lt;BR /&gt;wonder why i cannot find a man page for ulimit command.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;- ramd.</description>
      <pubDate>Thu, 01 May 2003 11:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963499#M814520</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-05-01T11:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963500#M814521</link>
      <description>The limit that ulimit is reporting is maxfiles (soft) and maxfiles_lim. Those refer to the maximum per process limits rather than the system-wide number of files (nfiles). It is those two that need to be increased and the changed will then be reflected in ulimit.&lt;BR /&gt;&lt;BR /&gt;When a process fails, it is important to immediately capture the return code, S{?}; a well written application will return the errno value and that will be of great importance in finding the underlying problem.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 May 2003 13:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963500#M814521</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-05-01T13:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963501#M814522</link>
      <description>You could set it in the .profile of the user running the night jobs. Thats what we do.&lt;BR /&gt;&lt;BR /&gt;You could do it in /etc/profile as I do.&lt;BR /&gt;&lt;BR /&gt;ulimit -n 4096&lt;BR /&gt;&lt;BR /&gt;All users get that limit for nofiles.&lt;BR /&gt;&lt;BR /&gt;Its probably better to set it user by user, guess I was lazy.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 01 May 2003 13:24:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963501#M814522</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-05-01T13:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Increasing nofiles in ulimit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963502#M814523</link>
      <description>Regarding ulimit:&lt;BR /&gt;&lt;BR /&gt;ksh has *NO* options for ulimit (as you've seen from the man page). The options shown above (ulimit -a or ulimit -Sc, etc) are only available in the default POSIX shell where all the options are defined in the man page for sh-posix. The external ulimit command (if I remember correctly) is nothing but a POSIX shell script so whiole it will accept the POSIX shell options, it cannot change the parent shell's environment.&lt;BR /&gt;&lt;BR /&gt;Unlike Solaris and other Unices, the default shell is not Bourne but a POSIX shell, in the case of HP-UX the POSIX shell is generally a superset (more capabilities) of the Korn shell (which is also a POSIX-compliant shell).&lt;BR /&gt;&lt;BR /&gt;So if you change your login shell to /usr/bin/sh, you'll have all the options available. But note that ulimit is simply a shell command to call the setrlimit system routine. Any program can call this routine and manipulate the ulimit values within the kernel limits. For instance, the soft limit (maxfiles) can be increased by setrlimit (or ulimit) but not to exceed maxfiles_hard. The ulimit builtin has both -S and -H options to allow setting a new soft or hard limit for the current environment and child processes.&lt;BR /&gt;&lt;BR /&gt;However, when you start a process, you may actually be running another shell script which then modifies the environment for the 'real' application program. Since most manufacturers try to write 'portable' shell code, they often miss HP-UX specific features and behavior is not exactly what is intended. In this case, it is best to rewrite the startup script and specify #!/usr/bin/sh as the first line, then modify the ulimit lines to take advantage for HP-UX capabilities.&lt;BR /&gt;&lt;BR /&gt;And do the vendor a favor and forward the resultant changes on to their support staff so their scripts can be improved. I get suspicious of long startup scripts that do not have large case statements concerning specific Unix flavors as in:&lt;BR /&gt;&lt;BR /&gt;case $OPSYSTEM in&lt;BR /&gt;HP-UX ) ..do HP-UX things..;;&lt;BR /&gt;SOLARIS ) ..do Solaris things..;&lt;BR /&gt;AIX ) ..do AIX things..;;&lt;BR /&gt;* ) ..print a warning and do general things..;;&lt;BR /&gt;esac</description>
      <pubDate>Thu, 01 May 2003 13:41:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/increasing-nofiles-in-ulimit/m-p/2963502#M814523</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-05-01T13:41:57Z</dc:date>
    </item>
  </channel>
</rss>

