Sponsored Content
Top Forums UNIX for Advanced & Expert Users too many files open and questions Post 45655 by Perderabo on Monday 29th of December 2003 02:49:33 AM
Old 12-29-2003
I answer this with some trepidation since I have no idea what a 3pp is.


2 Like lsof, it shows the file descriptors in use. That is not the same thing as the number of files open.

3. ping is a program and it uses file descriptors. It would not be reasonable to write a program that uses ping in such a way as consume it's own file descriptors, but unreasonable programmers exist. And there are many other ways to allocate a file descriptor. dup()/fcntl() may rival or even surpass open()/creat(). Network connections use file descriptors. lsof will tell you what each file descriptor is doing. It really is the tool of choice.

4. setrlimit() When a program needs a lot of fd's but didn't call setrlimit, it must be considered "broken". Most likely it is leaking fd's.

5. Well I guess that even if the truss was performed years ago on another system and on an unrelated process, it is possible that the output of the truss does represent something that is related to this problem.
 

10 More Discussions You Might Find Interesting

1. Solaris

How to check no. of files open currently

I'm getting an error "too many files open" # ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 8192 coredump(blocks) unlimited nofiles(descriptors) 256 memory(kbytes) unlimited # hard limit shows 1024 I would like to know how many files... (1 Reply)
Discussion started by: max_min
1 Replies

2. UNIX for Advanced & Expert Users

Too Many files open

Hi , We are using a Tool which runs on Unix Server. Have a Event which have some join operation and tries to open files depending on the join operation. So get the error config/variants/orcl6/partitions/ml6/data/ap_PCardMap.csv (Too many open files) Can someone please... (3 Replies)
Discussion started by: shashank_recj
3 Replies

3. Solaris

Newbie questions about HOME directory files

Hi, I am newbie to Solaris and system administration in general, and I have a couple of questions about files in my HOME directory. When I perform ls -la, I get the following list of files: drwxr-xr-x 7 XXXYYY staff 17 Aug 24 07:31 . drwxr-xr-x 7 root root 7... (2 Replies)
Discussion started by: JVerstry
2 Replies

4. UNIX for Dummies Questions & Answers

cat multiple files questions

Hi-- I'm trying to figure out how to use cat more wisely. I have the following command, which works, but I'd like to understand how to get it to work more clearly and efficiently. cat 'my file.001' 'my file.002' 'my file.003' 'my file.004' 'my file.005' 'my file.006' 'my file.007' 'my... (6 Replies)
Discussion started by: rlinsurf
6 Replies

5. Solaris

Sun Open Storage Questions

Hey All, I had some minor questions regarding Sun's open storage I understand it uses standard industry hardware (is the warranty void if we were to mix and match drives?) I know it uses OpenSolaris for the storage features (but can it use any os?) Does it have to be OpenSource? I... (7 Replies)
Discussion started by: Keepcase
7 Replies

6. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

7. Shell Programming and Scripting

open files

I want to open a file and edit it using vi However, i dont want to open directories or binary files. how can i do this? Right now it opens all files without caring echo "please enter a file to edit in Vi" read file if then (2 Replies)
Discussion started by: icelated
2 Replies

8. Shell Programming and Scripting

Compare files questions

Hello, I have two files A and B. File A had a million records with each record been 10-digit number. File B had 400,000 records with each record been 10-digit number. There are some common and different records. I need to print out records in A that are not in B. Please assist. Thanks - jak (5 Replies)
Discussion started by: jakSun8
5 Replies

9. Shell Programming and Scripting

Flagging Open Files

A quick breakdown of my situation: I have 2 servers running OS 10.7, one in the US, the other in China. A folder is being synchronized via EMC's "Syncplicity". Here is my problem- When we open an Excel spreadsheet on one server, Syncplicity does not sync over the temporary file that Excel... (0 Replies)
Discussion started by: sudo
0 Replies

10. 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
fopen(3UCB)					     SunOS/BSD Compatibility Library Functions					       fopen(3UCB)

NAME
fopen, freopen - open a stream SYNOPSIS
/usr/ucb/cc [ flag ... ] file ... #include <stdio.h> FILE *fopen(file, mode) const char *file, *mode; FILE *freopen(file, mode, iop) const char *file, *mode; register FILE *iop; DESCRIPTION
The fopen() function opens the file specified by file and associates a stream with it. If the open succeeds, fopen() returns a pointer to be used to identify the stream in subsequent operations. The file argument points to a character string that contains the name of the file to be opened. The mode argument is a character string having one of the following values: r open for reading w truncate or create for writing a append: open for writing at end of file, or create for writing r+ open for update (reading and writing) w+ truncate or create for update a+ append; open or create for update at EOF The freopen() function opens the file specified by file and associates the stream pointed to by iop with it. The mode argument is used just as in fopen(). The original stream is closed, regardless of whether the open ultimately succeeds. If the open succeeds, freopen() returns the original value of iop. The freopen() function is typically used to attach the preopened streams associated withstdin, stdout, and stderr to other files. When a file is opened for update, both input and output can be performed on the resulting stream. Output cannot be directly followed by input without an intervening fseek(3C) or rewind(3C). Input cannot be directly followed by output without an intervening fseek(3C) or rewind(3C). An input operation that encounters EOF will fail. RETURN VALUES
The fopen() and freopen() functions return a NULL pointer on failure. USAGE
The fopen() and freopen() functions have transitional interfaces for 64-bit file offsets. See lf64(5). SEE ALSO
cc(1B), open(2), fclose(3C), fopen(3C), freopen(3C), fseek(3C), malloc(3C), rewind(3C), lf64(5) NOTES
Use of these functions should be restricted to applications written on BSD platforms. Use of these functions with any of the system libraries or in multithreaded applications is unsupported. To support the same number of open files as the system, fopen() must allocate additional memory for data structures using malloc(3C) after 64 files have been opened. This confuses some programs that use their own memory allocators. The fopen() and freopen() functions differ from the standard I/O functions fopen(3C) and freopen(3C). The standard I/O functions distin- guish binary from text files with an additional use of 'b' as part of the mode, enabling portability of fopen(3C) and freopen(3C) beyond SunOS 4.x systems. SunOS 5.11 30 Oct 2007 fopen(3UCB)
All times are GMT -4. The time now is 06:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy