Zero link count files in proc


 
Thread Tools Search this Thread
Operating Systems Solaris Zero link count files in proc
# 1  
Old 08-26-2014
Oracle Zero link count files in proc

Hi Experts,

I had encountered an issue where the zero link process was holding too much amount of data on a Solaris server. I was able to terminate the process after which the space of the file system was released.


40G /proc/8567/fd/2

Can you please let me know if there are any special patches released by Oracle to address this issue.
Thanks in advance.
# 2  
Old 08-26-2014
Why do you think a patch is required ?

This was caused by a process that had its stderr redirected to a file that was later removed, more than likely by someone wrongly thinking the disk space was going to be released. This is the way Unix works.

To recover the space, instead of killing the process, you could have blanked the file instead with this command:

Code:
: >  /proc/8567/fd/2

This User Gave Thanks to jlliagre For This Post:
# 3  
Old 08-26-2014
Oracle

Thank you for your response jilliagre.

Can you please let me know how do we prevent the "stderr" of the process from hanging and occupying the space this way.
# 4  
Old 08-26-2014
One way would be to redirect stderr to /dev/null
# 5  
Old 08-26-2014
A better way would be to figure out what the process is trying hard to tell you when writing forty gigabytes of error messages, then fix the root cause.

Last edited by jlliagre; 08-26-2014 at 06:33 AM..
# 6  
Old 08-26-2014
Quote:
Originally Posted by dhanu1985
Thank you for your response jilliagre.

Can you please let me know how do we prevent the "stderr" of the process from hanging and occupying the space this way.
Don't use redirected stdout or stderr for logging. Use proper logging where the log file isn't tied to the running process.
# 7  
Old 08-26-2014
Even proper logging will misbehave this way if you blithely delete the file while it's in use. It's a very common beginner administration mistake. Just truncate the file instead of deleting it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error files count while coping files from source to destination locaton as well count success full

hi All, Any one answer my requirement. I have source location src_dir="/home/oracle/arun/IRMS-CM" My Target location dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct" my source text files check with below example.text file content $fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies

2. Linux

Getting warning that hard link count is wrong

I run a find command to search from root directory. find / -inum 344334 The output gives the below warning: find: WARNING: Hard link count is wrong for /proc/1. This may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to... (2 Replies)
Discussion started by: ravisingh
2 Replies

3. UNIX for Dummies Questions & Answers

Is there a way to completely remove an inode when the Link count is 2 ?

Currently my data is organised in a volume which has a cache directory (where all the files are first created or transferred). After that there are suitable directories on the volume which in their subdirs, contain files hardlinked to files in the cache. This is done so that the same inode... (1 Reply)
Discussion started by: abcdino
1 Replies

4. Solaris

Impact of zero link count files in proc

Greetings I want to confirm about HUGE and old files with linkcount 0 in proc file system. what is their impact on size of root File system? (3 Replies)
Discussion started by: mr_os
3 Replies

5. Shell Programming and Scripting

How to find link files

How to find the link files. i have main file, now i want to find all the files linked to it. (4 Replies)
Discussion started by: aju_kup
4 Replies

6. UNIX for Dummies Questions & Answers

_/proc/stat vs /proc/uptime

Hi, I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
Discussion started by: coderd
0 Replies

7. Linux

Concept of link count in linux

Hi All, Please explain me the concept of link counts when you try to view the contents of any file or directory using ls command. -sh-3.00$ ls -lrt total 194 drwxr-xr-x 2 root root 4096 Aug 12 2004 srv drwxr-xr-x 2 root root 4096 Aug 12 2004 mnt drwxr-xr-x 2 root root ... (1 Reply)
Discussion started by: vaibhav.kanchan
1 Replies

8. Shell Programming and Scripting

cat /proc/ files

Hi, I need to write a shell script that should lists only the files that starts with alphabet from the /proc dir and then I have to cat those files and redirect to a file. But my below script is not working. It is reading the first file properly but not the subsequent files. Please throw a... (2 Replies)
Discussion started by: royalibrahim
2 Replies

9. Shell Programming and Scripting

link files together

if I have 1000 files, named file1, file2, ... ,file1000. for each one, I want to append a line, for example "this is the end of file#". then, I want to link them all together. how can I do that by using a simple script? (1 Reply)
Discussion started by: fredao
1 Replies

10. UNIX for Dummies Questions & Answers

Link files....

How do you identify the type of a link in the output of the ls -l command? (1 Reply)
Discussion started by: Tom Bombadil
1 Replies
Login or Register to Ask a Question