LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-23-2011, 02:38 AM   #1
chenrvmldd
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
About ulimit instruction


yesterday,I ran ulimit -a in my OS:the terminal diplays:
/ # ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) 0
memory(kbytes) unlimited
locked memory(kbytes) unlimited
process 128
nofiles 1024
vmemory(kbytes) unlimited
locks unlimited

then I ran ulimit -s 1024 and ran ulimit -a
again the terminal displays:
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 1024
coredump(blocks) 0
memory(kbytes) unlimited
locked memory(kbytes) unlimited
process 128
nofiles 1024
vmemory(kbytes) unlimited
locks unlimited

I find that value of stack(kybytes) has been changed to 1024

But, after i restarted the my OS,i ran ulimit -a again ,the value of stack has recoverred 8192.
My question is how to make the stack permanent 1024K after I restart the OS.

i also know we can modify /etc/security/limits.conf to make it permanent

i think there must be a parameter in the kernel which is related to stack size,i want to modify the parameter and recompile the kernel to modify the stack size,

but i don't know which parameter?
Can anyone tell me?
 
Old 03-23-2011, 06:53 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I think you're confusing ulimit (a bash builtin) with pam_limits(8). Your question is about the former. The /etc/security/limits.conf file is associated with the latter.

That said, one option you have is to provide the ulimit values you want via bash's startup file(s):
  • /etc/profile (system-wide); or
  • ~/.bash_profile (user-specific); or
  • see the bash(1) manpages for others
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ulimit -s 40960 vs ulimit ulimit -s 10240 centguy Linux - Software 2 10-22-2016 11:38 PM
ulimit Serena Linux - Software 6 12-17-2014 11:04 PM
What is ulimit and what it does? brazilian_user Linux - General 3 01-30-2007 01:39 PM
Which linux instruction is equivalent to windows' instruction "tracert"? backpacker Linux - Software 1 04-04-2006 10:55 PM
Ulimit -v Help !!!!!!!!!!!!!!!!!!!!!! raees Linux - Software 1 07-04-2004 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration