- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: a problem about ulimit
Operating System - HP-UX
1825003
Members
2797
Online
109678
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2006 03:56 AM
тАО09-29-2006 03:56 AM
my system is
rx2620dl[/]# uname -a
HP-UX rx2620dl B.11.23 U ia64 1531644726 unlimited-user license
when I run command ulimit -n 8000
rx2620dl[/]#ulimit -n 8000
rx2620dl[/]#ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 8000
but kctune -q maxfiles_lim is still 8192
i want to know why maxfiles_lim did not change to 8000 after running ulimit -n 8000.
could you also tell me something about how to use ulimit? thanks a lot
rx2620dl[/]# uname -a
HP-UX rx2620dl B.11.23 U ia64 1531644726 unlimited-user license
when I run command ulimit -n 8000
rx2620dl[/]#ulimit -n 8000
rx2620dl[/]#ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 8000
but kctune -q maxfiles_lim is still 8192
i want to know why maxfiles_lim did not change to 8000 after running ulimit -n 8000.
could you also tell me something about how to use ulimit? thanks a lot
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2006 04:02 AM
тАО09-29-2006 04:02 AM
Re: a problem about ulimit
ulimit changes the limits for your session only. ulimit does not actually change any kernel parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2006 04:08 AM
тАО09-29-2006 04:08 AM
Re: a problem about ulimit
does ulimit -n will impact all the process?
could you give me some detailed information.thanks!
could you give me some detailed information.thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2006 05:08 AM
тАО09-29-2006 05:08 AM
Solution
There are two kernel parameters for open files in a single process: maxfiles and maxfiles_lim. These are imposed to prevent a runaway process from consuming all the file handles in the system table and seriously affecting all the processes (ie, not even root can login under that condition).
So when you login, ulimit is set to maxfiles. Your program can call setrlimit() to change the local limit, or you can use ulimit -n to perform the same task for your current environment and all your processes will now inherit the new value. But maxfiles is static and just represents a starting point, a low limit for 'average' users.
maxfiles_lim is the hard limit and prevents setrlimit() as well as ulimit -n from exceeding the maximum open files for any process. maxfiles_lim will never change until root changes it. setrlimit/ulimit only affect your current environment. maxfiles and maxfiles_lim will never change unless root changes them.
Note that a lot of (well-meaning but ill-informed) vendors tell you to set maxfiles=maxfiles_lim which totally defats the purpose of maxfiles. You give everyone a low value to start and then a good programmer will use setrlimit to adjust the program's limit. Failing good programming, the sysadmin can run the program in a script that calls ulimit -n.
Bill Hassell, sysadmin
So when you login, ulimit is set to maxfiles. Your program can call setrlimit() to change the local limit, or you can use ulimit -n to perform the same task for your current environment and all your processes will now inherit the new value. But maxfiles is static and just represents a starting point, a low limit for 'average' users.
maxfiles_lim is the hard limit and prevents setrlimit() as well as ulimit -n from exceeding the maximum open files for any process. maxfiles_lim will never change until root changes it. setrlimit/ulimit only affect your current environment. maxfiles and maxfiles_lim will never change unless root changes them.
Note that a lot of (well-meaning but ill-informed) vendors tell you to set maxfiles=maxfiles_lim which totally defats the purpose of maxfiles. You give everyone a low value to start and then a good programmer will use setrlimit to adjust the program's limit. Failing good programming, the sysadmin can run the program in a script that calls ulimit -n.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP