Script to leak file handles


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script to leak file handles
# 1  
Old 03-01-2012
Script to leak file handles

This is a strange one.

We have an issue where our system is leaking SCTP file handles. There are people working on this and in the mean time we have a monitoring script that alarms when we need to perform actions to manually clear them. For testing purposes I want to write a script that purposfully leaks file handles and fast (leaks about 4000 in a few minutes). The problem is I have absolutely no idea how to do this or where to start and (surprisingly) it is not something people commonly want to do so the internet has not been helpful.

Does anyone know if it is possible to write a script (ksh Solaris) to leak file handles?
If so, would anyone be able to give me some pointers to get me started?

---------- Post updated at 06:07 PM ---------- Previous update was at 03:44 PM ----------

Just to let you know that I found it was easier to fake the output of netstat to make it look as if more file handles were in use than actually were, so I no longer need help with this. Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

The Way Systemd Handles System Calls

Hi everyone, I have a question about the process management, and deep level system functionality of system calls between SystemD and SystemV? Does SystemD use the same system calls (fork(), exec(), bind() etc...) as SystemV? or Vice Versa? If they both use the same or very very similar sys... (2 Replies)
Discussion started by: Lost in Cyberia
2 Replies

2. UNIX for Advanced & Expert Users

sendmails works, but opens 43 file handles per email -> problem

I'm using Sendmail 8.13.8 on a CentOS 5.5 vServer (Virtuozzo). I'm using a loop in PHP to send a lot of HTML-mails via sendmail. Each mail is a mail with individual statistics for our users, so its not mass mailing, bcc is not an option. It all works fine, but when I take a closer look there... (2 Replies)
Discussion started by: ZX81
2 Replies

3. UNIX for Advanced & Expert Users

How UNIX/AIX handles a file deep down, say it's being read while another one tries to rename it?

Hi Thinkers, On AIX 5.3, we have a monitor program that reads the log file and searching for a certain string pattern that we define(say "transactionException"), if it sees it then it will raise an alert by sending an email. Because the log file XXX.log is rolling into XXX.log.0, XXX.log.1,... (2 Replies)
Discussion started by: TheGunMan
2 Replies

4. Shell Programming and Scripting

memory leak in igawk script

Hi, We are having igawk statement calling gawk function and processing a master file, each gawk function have rules and action. We are using associative array to keep the output of each rule and finally printing the associative array. We are seeing the memory is growing incrementally in TOP... (1 Reply)
Discussion started by: satvelucbe
1 Replies

5. Shell Programming and Scripting

Monitor open file handles used by a process

We have a process that is running out of file handles. Is there some command line way to determine this that we can include into a cron script? Please let me know JAK (3 Replies)
Discussion started by: jakSun8
3 Replies

6. Shell Programming and Scripting

How printf handles empty variables

See attached file that includes code, input and output. I am processing a colon delimited input file and building a ":" (colon) delimited output file. My printf statement prints contents of each of 20 variables and puts them into a record file. I am pushing out approximately 120 records. The... (2 Replies)
Discussion started by: Skyybugg
2 Replies

7. Shell Programming and Scripting

perl help with pipes and file handles (simple issue)

Hello, I have a program which opens a pipe for communication using file handle and forks 5 child processes. @waitlist = (1,2,3,4,5); foreach $item (@waitlist) { pipe *{$item},RETHAND; unless ($pid = fork()) { # Child process print RETHAND... (1 Reply)
Discussion started by: the_learner
1 Replies

8. Shell Programming and Scripting

SSH in batch mode and File-Handles in a loop

Hi all I try to execute SSH commands on several hosts in a while-loop. There seems to be a problem with file-handle, first cycle works correct but no other one will follow due to the while condition is false even that there are many more host entries (lines) in all_hosts.dat. ... (3 Replies)
Discussion started by: DaveCutler
3 Replies

9. UNIX for Advanced & Expert Users

File Handles

Hi, perhaps you can answer my question.....;) How can I check, how many file handles are used and how can i increase the value for maximum file handles??? (3 Replies)
Discussion started by: sjaeger
3 Replies
Login or Register to Ask a Question
clusvcmgrd(8)                                                  Red Hat Cluster Suite                                                 clusvcmgrd(8)

NAME
rgmanager - Resource Group (Cluster Service) Manager Daemon DESCRIPTION
rgmanager handles management of user-defined cluster services (also known as resource groups). This includes handling of user requests including service start, service disable, service relocate, and service restart. The service manager daemon also handles restarting and relocating services in the event of failures. HOW IT WORKS
The service manager is spawned by an init script after the cluster infrastructure has been started and only functions when the cluster is quorate and locks are working. During initialization, the service manager runs scripts which ensure that all services are clear to be started. After that, it determines which services need to be started and starts them. When an event is received, members which are no longer online have their services taken away from them. The event should only occur in the case that the member has been fenced whenever fencing is available. When a cluster member determines that it is no longer in the cluster quorum, the service manager stops all services and waits for a new quorum to form. COMMAND LINE OPTIONS
-f Run in the foreground (do not fork). -d Enable debug-level logging. -w Disable internal process monitoring (for debugging). -N Do not perform stop-before-start. Combined with the -Z flag to clusvcadm, this can be used to allow rgmanager to be upgraded with- out stopping a given user service or set of services. SEE ALSO
clusvcadm(8) Jan 2005 clusvcmgrd(8)