How to check no. of files open currently


 
Thread Tools Search this Thread
Operating Systems Solaris How to check no. of files open currently
# 1  
Old 08-11-2005
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 are open currently before I increase it.

Thanks in advance.
# 2  
Old 08-11-2005
The ulimit (-n) is the number of files that can be opened by any single process, not by the system as a whole, so it's for a specific process you need to know this information.

There are several ways to find this information, the easiest being to install lsof and use that. You can however see which filedescriptors are opened by a proceess by looking in the /proc filesystem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to check if a file is open in editor?

Hi there! I'm developing a program that allows the user to open and edit files using both an editor and the terminal. Once the user has finished editing the file an update is sent to the logbook that compares the file before and after it was edited - this can only be done if the file is closed (I... (23 Replies)
Discussion started by: cherryTango
23 Replies

2. Shell Programming and Scripting

Check unused ports in a given range and assign an open one

Hi. I need to add code to my KSH script to automatically assign an open port number from a pre-defined range to an Oracle listener. Should I use: lsof -i or netstat -vatn or something else? Thanks. (9 Replies)
Discussion started by: user052009
9 Replies

3. Shell Programming and Scripting

To check if a file is open and in use (logs are being written to it)

Hello Experts, I need to write a shell script to check if a file is open and something is being written to it. I want to know how OS handles it. I checked with lsof command but it is not working. For a test I did this. while true; do echo `date` >>abc.txt; done then I checked lsof |... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies

4. IP Networking

Command to check if open proxy works

Hello, please what is the least server resources intensive linux command to veriffy an open proxy works. I mean one should probably send and receive any data via this proxy? and if data found it returns true Assuming proxy is 1.2.3.4:1080 I used this: curl -x $proxy $url... (1 Reply)
Discussion started by: postcd
1 Replies

5. UNIX for Dummies Questions & Answers

Check port 2222 is open on a remote host

I am able to connect to a remote host using the legacy IP and port 2222. Today the remote has a new IP I am unable to connect. How to check if the remote host is blocking or if its my server is unable to connect. Err Msg : telnet: Unable to connect to remote host: Connection refused Err... (5 Replies)
Discussion started by: ITDev01
5 Replies

6. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

7. Shell Programming and Scripting

avoid open file to check field.

Hi Everyone, # cat a.txt 94,aqqc,62345907, 5,aeec,77, # cat 1.pl #!/usr/bin/perl use strict; use warnings; use Date::Manip; open(my $FA, "/root/a.txt") or die "$!"; while(<$FA>) { chomp; my @tmp=split(/\,/, $_); if (index($tmp, "qq") ne -1) { ... (4 Replies)
Discussion started by: jimmy_y
4 Replies

8. OS X (Apple)

Check for open application

Hi there, Is there any command to check if a particular application is open on a mac? thanks :) (3 Replies)
Discussion started by: davewg
3 Replies

9. Solaris

How to check number of files is currenty open by Solaris 10 and Linux

Hi, Anyone know the command as how many files are open in Solaris 10 and Linux - i.e. currently open - real time Thanks (1 Reply)
Discussion started by: civic2005
1 Replies

10. Shell Programming and Scripting

Check open ports every ...

Hello, i need a script (bash type maybe?..), which would check open ports on 127.0.0.1 and then compare open ports with "registered/allowed" port list and try to kill the program who uses unregistered ports. It would be great that script would be started lets say every 5 or 10 minutes. You see i... (2 Replies)
Discussion started by: MorchiuS
2 Replies
Login or Register to Ask a Question