- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- need a script that will change the limits in the /...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
тАО03-18-2008 08:39 AM
тАО03-18-2008 08:39 AM
Any help is appreciated.
Thank you,
Paul Romanek
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2008 08:54 AM
тАО03-18-2008 08:54 AM
Re: need a script that will change the limits in the /etc/security/limits file
what is the operating system you are talking about? Linux? If so you should post the question in Linux room:
http://forums12.itrc.hp.com/service/forums/familyhome.do?familyId=118
Anyway /etc/security/limits is an ascii file, I think it is to be edited manually to insert/modify something but that is just a thought, I don't know if there is a tool to change contents of that file.
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2008 09:10 AM
тАО03-18-2008 09:10 AM
Re: need a script that will change the limits in the /etc/security/limits file
These per-user limits are settable by the "ulimit" command.
Setting the number of open files (ulimit -n) to any value that is greater than the system-wide "nfile" kernel parameter allows any user to cause the machine to hang, simply by opening more files than the system can handle.
This does not quite crash the system, but it often comes close to that: essential services like inetd and/or sshd may crash when they cannot open a file whenever they need to. If the situation gets bad enough, a hard reboot may be the only way to recover (if all the file handles are in use, nobody can log in anymore!)
There are two limits: a "hard" limit and a "soft" limit. The soft limit can be adjusted by the user, from 0 to the value of the hard limit. The hard limit can be decreased, but not increased by an ordinary user. Any child processes inherit the limit values from their parent.
The default value for the soft "number of open files" per-user limit is set with the kernel parameter "maxfiles". The respective hard limit is set with the kernel parameter "maxfiles_lim".
My strategy with these limit values:
- Set "nfile" to very large value (your best estimate x4 or x8 is not an exaggeration). Making this value large costs very little memory.
- Set "maxfiles_lim" so that your most file-hungry application can live comfortably, allowing some room for growth.
- Set "maxfiles" so that (maxfiles * number of expected users) < nfile.
Now normal users will generally hit the per-user limit before hitting the system-wide limit. When starting the big, file-hungry application, you (or an informed user) can run "ulimit -n
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2008 02:41 PM
тАО03-18-2008 02:41 PM
Re: need a script that will change the limits in the /etc/security/limits file
I would like to make this change via the ulimit command. So basically what I need is a script that will remsh to a list servers that I have created. Once it's sucessfully remsh to a server in the list I would like the script to make a copy of the file /etc/security/limits then run the command ulimit -1 then exit and go on to the next server in the list. The script will be on a HP-UX server but the actually command will be on a AIX server. Any help appreciated.
-Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2008 08:49 PM
тАО03-18-2008 08:49 PM
SolutionQuestions about foreign devil OSes will get this thread removed.
for sys in $(< list-of-systems); do
remsh $sys -n "cp /etc/security/limits /etc/security/limits.old; ulimit -1"
done
- Tags:
- foreign devil tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2008 08:09 AM
тАО03-19-2008 08:09 AM
Re: need a script that will change the limits in the /etc/security/limits file
Sorry for bringing that other terrible terrible O.S. into this forum;)