1832609 Members
2413 Online
110043 Solutions
New Discussion

ulimit and korn shell

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

ulimit and korn shell

Hi everyone

I'm a little confused about the ulimit settings for a posix user

I've been asked to look at a file system and users limits after a programme stopped it's file creation at exactly 2 gig

1. Upon checking the filesystem , I can see that largfiles is enabled

f_flag: 16

2.As the user , who's shell is ksh

$ulimit
4194303 (this is the limit for ksh!)

I am able to create the below file using prealloc which exceeds 2 gig

-rw-rw-rw- 1 dssadmin users 2200000000 Jan 13 16:59 dssadmin.test

This proves the filesystem setting is ok , but exceeds the file limit size set by ulimit ?

Can anyone explain this ?

Regards

Steve
take your time and think things through
5 REPLIES 5
steven Burgess_2
Honored Contributor

Re: ulimit and korn shell

sorry

I'm a little confused about the ulimit settings for a posix user

SHOULD BE

I'm a little confused about the ulimit settings for a ksh user

Steve



take your time and think things through
James R. Ferguson
Acclaimed Contributor

Re: ulimit and korn shell

Hi Steve:

If this is 11.0, have a look at patch PHCO_27418.

Regards!

...JRF...
steven Burgess_2
Honored Contributor

Re: ulimit and korn shell

Thanks James

From the patch description

5. ksh ulimit does not report 'unlimited' for filesize.
This causes users to incorrectly assume that ksh
does not handle large files.

What about the entry from this doc

SHELL: ulimit cannot be set to unlimited in a Korn shell

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063227899

Thanks in advance

I seem to have a conflict here with what ulimit states when the user and what
size of file can be created

Steve
take your time and think things through
James R. Ferguson
Acclaimed Contributor

Re: ulimit and korn shell

Hi (again) Steve:

The document you cite is old. From the patch text you can read, too:

/begin_quote/

Problem Reproduction:
--------------------
* Ensure that the file size limit for the current session is not set (i.e. it is unlimited).
* Invoke ksh
* Execute the builtin command - ulimit
The shell would output: 4194303
The correct behaviour would be to output: unlimited

/end_quote/

There's more. You might try downloading and installing the patch.

Regards!

...JRF...
Mike Stroyan
Honored Contributor
Solution

Re: ulimit and korn shell

The 2GB limit is very likely to be because the program is not configured to use largefiles. A program needs to either be compiled in 64-bit mode or compiled with explicit large file options. Many programs also need source code changes to get rid of the assumption that file sizes and offsets can be represented by ints. See /usr/share/doc/lg_files.txt for a full discussion of the topic.