ulimit -n

Hi im a complete noob to shell commands but here is my problem i have a dedicated server i7 with 24 gig ram i have whm/cpanel on it now ive added a minecraft system to root but i cannot set the server to more than 512mb memory i was told its because the memory is being blocked and was told to do this ulimit -a then i done ulimit -n and says its at 1024 how can i make this larger please really need help as so far this has cost me alot of money and still not right many thanks and again im totally new to this world

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 193189
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) 1048576
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 193189
virtual memory          (kbytes, -v) 1048576
file locks                      (-x) unlimited

edit /etc/profile, add this to it:

ulimit -S -m 1000000
ulimit -S -v 500000

If there are other ulimit statements in there delete them. You have to be root to edit the file.

log out, then log back in.

ulimit -a

should show much larger values, like 1GB memory; 500MB of additional virtual memory.

i downloaded that file to edit but am unsure where to add that line as there is some codeing in there already i need to make a program run at 1024 mb and maybe 3gb if i need it to i can run the program at 512 but when i tell it to use more memory it wont start up

thanks for your answer jim

If you download that file and re-upload it, you can totally hose your system if you do not ensure it is a UNIX file and not a Windows file when it returns.

Edit the file on the server in place. NEVER do what you have just done.

Ah ok mark thankyou still havent sorted this im running centos 5 with cpanel ive googled like mad and still cannot get the answer

Perhaps PAM is also limiting your resouces. See the pam_limits(8) man page.

What user is the minecraft server running under?

/etc/security/limits.d/ directory is empty im running centos 5

---------- Post updated at 11:56 AM ---------- Previous update was at 11:50 AM ----------

it is a program called multicraft it sets up muliple mc servers and lets u give or take ram away etc etc etdc the guy who developed it installed it on my dedi and he says its issue with memory on dedi the program was installed in root i have looked at this file /etc/security/limits.conf and got this someone advised to edit it but where i dont know

#Each line describes a limit for a user in the form: # #<domain>        <type>  <item>  <value> # #Where: #<domain> can be: #        - an user name #        - a group name, with @group syntax #        - the wildcard *, for default entry #        - the wildcard %, can be also used with %group syntax, #                 for maxlogin limit # #<type> can have the two values: #        - "soft" for enforcing the soft limits #        - "hard" for enforcing hard limits # #<item> can be one of the following: #        - core - limits the core file size (KB) #        - data - max data size (KB) #        - fsize - maximum filesize (KB) #        - memlock - max locked-in-memory address space (KB) #        - nofile - max number of open files #        - rss - max resident set size (KB) #        - stack - max stack size (KB) #        - cpu - max CPU time (MIN) #        - nproc - max number of processes #        - as - address space limit #        - maxlogins - max number of logins for this user #        - maxsyslogins - max number of logins on the system #        - priority - the priority to run user process with #        - locks - max number of file locks the user can hold #        - sigpending - max number of pending signals #        - msgqueue - max memory used by POSIX message queues (bytes) #        - nice - max nice priority allowed to raise to #        - rtprio - max realtime priority # #<domain>      <type>  <item>         <value> #  #*               soft    core            0 #*               hard    rss             10000 #@student        hard    nproc           20 #@faculty        soft    nproc           20 #@faculty        hard    nproc           50 #ftp             hard    nproc           0 #@student        -       maxlogins       4  # End of file

---------- Post updated at 11:57 AM ---------- Previous update was at 11:56 AM ----------

sorry i messed up the code on that