Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getdtablesize(2) [hpux man page]

getdtablesize(2)						System Calls Manual						  getdtablesize(2)

NAME
getdtablesize() - get the size of the per-process file descriptor table SYNOPSIS
DESCRIPTION
The function returns the maximum number of file descriptors that can currently be stored in a process' file descriptor table. This maximum number is also known as the soft limit for open files, and can be adjusted up to the hard limit by calling The entries in the descriptor table are numbered with small integers starting at 0 (zero). The function returns the total number of file descriptors that a process can have open simultaneously. Each process is limited to a cur- rent maximum (soft limit) and a fixed upper bound (hard limit) of open file descriptors. This limit is at least 32. The system-defined limits are configurable. See the descriptions of the and kernel parameters in maxfiles_lim(5) and maxfiles(5), respectively, for informa- tion about changing the system-defined, per-process limit on open file descriptors. RETURN VALUES
The function returns the size of the descriptor table (soft limit), and is always successful. SEE ALSO
close(2), getrlimit(2), open(2), select(2), setrlimit(2), sysconf(2), maxfiles(5), maxfiles_lim(5). STANDARDS CONFORMANCE
getdtablesize(2)

Check Out this Related Man Page

getdtablesize(3C)					   Standard C Library Functions 					 getdtablesize(3C)

NAME
getdtablesize - get the file descriptor table size SYNOPSIS
#include <unistd.h> int getdtablesize(void); DESCRIPTION
The getdtablesize() function is equivalent to getrlimit(2) with the RLIMIT_NOFILE option. RETURN VALUES
The getdtablesize() function returns the current soft limit as if obtained from a call to getrlimit() with the RLIMIT_NOFILE option. ERRORS
No errors are defined. USAGE
There is no direct relationship between the value returned by getdtablesize() and OPEN_MAX defined in <limits.h>. Each process has a file descriptor table which is guaranteed to have at least 20 slots. The entries in the descriptor table are numbered with small integers starting at 0. The getdtablesize() function returns the current maximum size of this table by calling the getrlimit() function. SEE ALSO
close(2), getrlimit(2), open(2), setrlimit(2), select(3C) SunOS 5.11 1 Mar 1996 getdtablesize(3C)
Man Page

15 More Discussions You Might Find Interesting

1. Programming

File Descriptors

Hi, I have written a daemon process, to perform certain operations in the background. For this I have to close, the open file descriptors, Does anybody know how to find out the number of open file descriptors ? Thanks in Advance, Sheetal (2 Replies)
Discussion started by: s_chordia
2 Replies

2. Programming

files

if i am opening a file in one process how can i cause that other process can't open thae same file??? (3 Replies)
Discussion started by: dbargo
3 Replies

3. UNIX for Dummies Questions & Answers

file number limits in Solaris 8

What is the kernel parameter ( or other) that sets the maximum number of open files by the o/s (3 Replies)
Discussion started by: blp001
3 Replies

4. Programming

maximum number of times - a file can be opened

Hi All, We can find the maximum of open file descriptors in hold with respect to a process. As default size was 256 (with getrlimit) and the hard limt was 65536 I tried changing the limit to 1024(with setrlimit) successfully changed the limit but still I couldnt have as many open file... (3 Replies)
Discussion started by: matrixmadhan
3 Replies

5. UNIX for Dummies Questions & Answers

Explanation of error message(s)

I am completely new to Unix, have ordered the books recommended in this forum, however where would I find an explanation of error messages, the one that I'm looking at states +kern.maxfiles limit exceeded by uid 1002, please see tuning(7). All I know is that we have the latest BSD version. (2 Replies)
Discussion started by: jkm
2 Replies

6. UNIX for Dummies Questions & Answers

can I limit the size of a directory?

Hi, I am not root, but I need to limit the size of my directory, so that it cannot contain more than 200M of stuff inside. Is this possible? Also, how can I see the total size of that directory? If I do ls -ltrd, it does not give me the size of all the files inside the directory. And if I do df... (6 Replies)
Discussion started by: JamesByars
6 Replies

7. AIX

Process limit on OS level

Hi, Would like to know where do i find these process limit on OS level as my MQ is prompting this error... An attempt to create an MQ process was rejected by the operating system due to a process limit (2 Replies)
Discussion started by: giriplug
2 Replies

8. UNIX for Advanced & Expert Users

file size limit?

hi, how can I find out what the limit of a file size is on unix? thanks (6 Replies)
Discussion started by: JamesByars
6 Replies

9. UNIX for Dummies Questions & Answers

Directory size limit

Hey everyone I'm trying to limit the size a directory can be under Solaris 10. I can find plenty of guides to do it for user home directories, ut what I'm after is an absolute limit, regardless of the user. For example: I want /export/example/ to never pass say 5 GB, no matter what user is... (3 Replies)
Discussion started by: goodvikings
3 Replies

10. AIX

AIX6.1 Remove file descriptor from specified process

Hi, How to release file description area from specified process. Problem is that process started - open one file ( ~2GB ) - file has been removed - process still shown that file is used by process and can't release space on filesystem. It is not allowable to kill process !!! Regs,... (3 Replies)
Discussion started by: KrzysiekPi
3 Replies

11. UNIX for Dummies Questions & Answers

character limit via awk

I'm using a command that outputs the total size of the files that I've specified. I'd like to introduce a character limit that appends an ellipsis to the lines that go beyond the specified amount. du -chs {query} | sed 's!.*/!!' | awk '{print substr($0,0,25)""}' That's what I have so far.... (4 Replies)
Discussion started by: Light_
4 Replies

12. Solaris

Open File Descriptors Current vs. Max

Hello all, I have been tasked with finding the current open file descriptors versus the limit set. In Linux, this can be done like so: cat /proc/sys/fs/file-nr 3391 969 52427 | | | | | | | | maximum open file descriptors | total free allocated... (2 Replies)
Discussion started by: LinuxRacr
2 Replies

13. Solaris

Can't solve the "Too many open files" error

I keep getting "Too many open files" in /var/adm/messages that I do not know how to fix. I've searched for solution on this forum and have increased the file descriptors limit but the problem persists. The problem is happening in a solaris zone.... /var/adm/messages log example May... (8 Replies)
Discussion started by: JT-KGY
8 Replies

14. Red Hat

PAE kernel memory limit

What is the limit of LowMem and HighMem in PAE enable kernel. (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

15. Red Hat

Process to use open files

I would like to test open files usage in my system, if I want to create a process ( or script ) that can use a certain amount ( eg. 1000 ) of open files , is it possible to create such process ( or script ) ? (3 Replies)
Discussion started by: ust
3 Replies