changing the setting for open files


 
Thread Tools Search this Thread
Operating Systems Solaris changing the setting for open files
# 1  
Old 05-30-2005
changing the setting for open files

i am trying to change the max number of files you can open under this
enviroment
Solaris , bash .
i first check the current setting by
ulimit -a
returns like this.
------------------------------------
data seg size (kbytes) unlimited
file size (blocks) unlimited
open files 256

i then run the perl script which keeps opening files.

inside this perl program or before running this perl script, i change
the setting by
ulimit -n 1024

Yet i could only open files up to 256. Seems like the setting i changed
is not in effect. Am I doing wrong or do you have to change the file
/etc/system to take effect ?

If possible , i want to avoid rebooting the system.
Thanks in advance.
# 2  
Old 06-01-2005
I actually ran into this one before, setting different limits will have no effect since you are using perl.

The stdio(3C) manpage notes that only 255 files may be opened using fopen(), and only file descriptors 0 through 255 can be used in a stream. Since perl calls open() and then fdopen(3C) with the resulting file descriptor, perl is limited to 256 simultaneous open files.

Last edited by reborg; 06-01-2005 at 08:54 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing path in many files

I have many html files in a directory tree and want to change the a path declaration within the files. Files will look as below I want to remove "geopdf/" so I get as example href=../../../geo1937/geo02n01/geo0201r00010016.pdf rather than keeping the entry as ... (1 Reply)
Discussion started by: kristinu
1 Replies

2. Shell Programming and Scripting

ftp files ntrans setting

Hi all, am transfer some set files to remote machine from unix like put file1 put file2 put file3 put fileend4 But on remote machine files are getting placed like this file1 fileend4 file2 file3 Are their is any sequence of file transfer like alphabetic order or... (3 Replies)
Discussion started by: vivek1489
3 Replies

3. Shell Programming and Scripting

Moving files and changing name

So I am trying to get my juices flowing on another korn shell scripting project I need to do. I hope my examples here will allow someone to get me pointed in the right direction. I hope I am clear with what I am trying to do. Example: /incomplete/file1v1c1 /incomplete/temp1v1c1... (2 Replies)
Discussion started by: linuxn00b
2 Replies

4. Red Hat

dhcp not setting dns and changing to garbage

I have 2 problems. Dhcp is not setting dns and after I manually set my dns it changes to garbage. I literally just used command to set dns which is a good copy of resolv.conf: sudo cp /home/bob/Desktop/scripts_9-12-2011/resolv.conf /etc/resolv.confHere is a copy of my resolv.conf. #... (5 Replies)
Discussion started by: cokedude
5 Replies

5. Shell Programming and Scripting

Changing one number in all files using awk

Hi I want to change the number 70 mentioned in my file to 76 by using awk. I know how to change all same digits but not one particular number. I have 29 files almost similar to this. One of my files looks like #Input file for 200K NPT molecular dynamics of final 70%XL made from 58.5%... (3 Replies)
Discussion started by: ananyob
3 Replies

6. SuSE

Setting the max open files value

I'm trying to set the open files value to 4000 on a SLES 9 system. Current values:ulimit -n 1024 I can set it using this:ulimit -n 4000 ulimit -n 4000 But this obviously sets it only for the shell session where I run the command to set it. I want to set this to 4000 for all time. ... (3 Replies)
Discussion started by: blowtorch
3 Replies

7. UNIX for Dummies Questions & Answers

Recursively changing permissions on files

Please excuse for double posting, but since this seems like a " yep, me dummy question", I feel I should post here.:o Just joined after using the site as a guest.. (Very Good Stuff in here.. thanks folks.) I am in the process of hardening a Solaris 10 server using JASS. I also must use DISA... (1 Reply)
Discussion started by: altamaha
1 Replies

8. Solaris

changing IP thru editing files

I attempted to change the IP of my Solaris 9 box by changing these files: /etc/hosts /etc/hostname.dmfe0 And when I rebooted my system, the changes did not come up through the reboots. I have searched high and low and this is how you change the IP address permanently. Can anyone tell me what... (2 Replies)
Discussion started by: bluridge
2 Replies

9. UNIX for Dummies Questions & Answers

copy directory without changing ownership setting

hi currently i am migrating some directories over to a new server. is there any command (rcp or ftp or anything) for me to use without changing the ownership and permission of the directory? i am copying some directories from unix machine to linux machine. what is the exact command? thanks... (2 Replies)
Discussion started by: legato
2 Replies

10. UNIX for Dummies Questions & Answers

Setting Default Permissions for Files

Hi, I am setting up an area on a unix server where multiple people will be editing web pages. Can anyone tell me how to set it up the directory and subdirectories so that when a user creates a new file, it defaults to permissions of 664 or 775? I've tried using umask but from what I can... (1 Reply)
Discussion started by: robbieg
1 Replies
Login or Register to Ask a Question