cancel
Showing results for 
Search instead for 
Did you mean: 

ulimit -n

 
Highlighted
Super Advisor

ulimit -n

recently upgraded to a hp rx6600/hp unix 11.23 and the ulimit -n 4096 statemenet is returning an error 'invalid option'...is this option no longer supported or is there a setting someplace else that needs to be tweeked ??
9 REPLIES 9
Highlighted
Exalted Contributor

Re: ulimit -n

Shalom,

I just tried the command on an rx2600 and it worked just fine for me.

I did it as root.

This is a valid option.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Highlighted
Honored Contributor

Re: ulimit -n

way to go
http://wiki.linuxquestions.org/wiki/Ulimit
It's kind of fun to do the impossible
Highlighted
Honored Contributor

Re: ulimit -n

Hi Thaler,

I did the same and it worked for me too from user root.
[root@mlynx root]# ulimit -n 4096
[root@lmynx root]#


Regards,
Asif Sharif
Regards,
Asif Sharif
Highlighted
Exalted Contributor

Re: ulimit -n

BTW, you have mis-posted to Linux.

I figured out it was an HP-UX question.

No such thing as HP Unix. It's called HP-UX, a minor thing.

I suggest you Ignore the Linux advice and have this question moved to HP-UX forum.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Highlighted
Honored Contributor

Re: ulimit -n

Donald,
Can you cut and paste what you actually see?

I just tried on an rx2600 running 11.23 and it worked fine.

# ulimit -n 4096
# ulimit -n
4096
# uname -a
HP-UX xxx B.11.23 U ia64 0358113402 unlimited-user license

To clarify SEP's comment, HP-UX is the name of (one of) HP's UNIX system. The fact that you mentioned 11.23 made it clear what you were referring to, but putting it in the right forum to start with would have caused less confusion :-)


Andrew
Highlighted
Honored Contributor

Re: ulimit -n


As root

[/root] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194300
stack(kbytes) 262144
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 8192

As non-root

$ ulimit -n
ksh: ulimit: bad option(s)
$ whereis ulimit
ulimit: /usr/bin/ulimit /usr/share/man/man2.Z/ulimit.2
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4294967292
stack(kbytes) 262144
memory(kbytes) unlimited
coredump(blocks) 4194303

so nofiles is NOT defined for this user.

But i dont have explanation for that..
Highlighted
Acclaimed Contributor

Re: ulimit -n

>limit -n 4096 is returning an error 'invalid option'. Is this option no longer supported?

You can't use ksh. You must use sh or dtksh.

>Santhosh: But I don't have explanation for that..

You should have realized that you changed your shell to ksh.
Highlighted
Honored Contributor

Re: ulimit -n

ulimit is not a Unix command, it is a shell built-in. The POSIX shell (and dtksh) have a larger set of ulimit options, but recently, ksh allowed no options at all (ulimit -a produced an error). This does not mean that the limits do not exist in the environment, just ksh can't report them. Check the man page for ksh on your system and you'll see that ulimit -n is not a valid option. If you have to use ksh, you'll need to alias the ulimit command to /usr/bin/ulimit (alias ulimit=/usr/bin/ulimit).

Or you can use the POSIX shell which is a superset of ksh-1988 or change your shell to dtksh (ksh-1993).


Bill Hassell, sysadmin
Highlighted
Acclaimed Contributor

Re: ulimit -n

>Bill: you'll need to alias the ulimit command to /usr/bin/ulimit

This is only good for looking but not touching, since a child can't change the parent.