![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sendmail is eating high memory | neel.gurjar | SUN Solaris | 6 | 10-02-2007 05:42 AM |
| This application is eating up the CPU | pandu345 | SUN Solaris | 11 | 08-12-2006 08:43 PM |
| What are you eating ? | Sergiu-IT | What's on Your Mind? | 31 | 06-29-2005 10:50 AM |
| Eating memory | Maestin | UNIX for Dummies Questions & Answers | 4 | 06-06-2002 02:11 AM |
| Hosting Service Eating Space | cindy | UNIX for Dummies Questions & Answers | 3 | 04-21-2001 04:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
/proc is eating my disk man
hi
I have an sun ultra 5 running a firewall which has logging enabled (essential). The disk is sliced up with /proc on / (c0t0d0s0). / is sliced at 3 gig. My problem is this, one afternoon, a manager asked me to retrieve some firewall logs, so i went into the relevant directory (also on the / slice) and typed 'ls -l', for some reason the last 6 days logs were empty (0 bytes), so my first instinct was to run 'df -k' to see how much space was left on /, as i thought it was at 100%, so at root i used 'du -sk *' to check what was eating the space, everything was fine apart from /proc which reported 2.6 gig. I delved deeper and indeed found directories ie 156 and 24967 which both came in at nearly a gig each. Everthing I have read has said that /proc is virtual and these direcotries dont actuall eat any space, but if this is the case how come DF and DU report on it and how come when DF reports 100% on / because of these so called virtual files, It doesnt allow me to write anything to the disk, Ive even tried to create afile on / using 'touch file' with no joy Any help on this extremely frustrating matter would be greatly appreciated regards Gary |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks perdarabo
I inherited this firewall, and believe me, i am in total agreement about the logs on root thing, but at the moment the logs are extremely minimal in size and were used as an example of my inability to write to the disk. I also accept that df is reporting ok after trying df -k /proc, my apologies. However why when i run du -sk * on root does it report 2.6 gig on /proc and subsequently stop me writing to that disk. If /proc is virtual and is a reflection of processes running, does that mean that 2.6 gig of my disk space on root is being used by o/s and firewall daemons/processes, because that is all thats running on the box ( the o/s has been hardened and stripped down to basics), if so, i would find that hard to comprehend. (the firewall manufacturer does not indicate anything about 3 gig of space to run in its minimum spec).With all due respect to your suggestion of using kill -9 on the process ids, im sure you can appreciate that in a production environment this is not something i can do. Put basically, if there are 2.6 gigs being used by a few processes then something must be wrong, and I still need a workable suggestion if anyone has one Any help would be greatly appreciated |
|
||||
|
/proc is a seperate filesystem. Just like /usr ot /var is a seperate filesystem. /var is a mount point. Do a "du -sk /var/*". I'll bet that you find some files there. Do you understand that the files in /var have no bearing at all in the space consumed in root? /proc is the same way. It is a mount point. What's more the filesystem that is mounted there is not real. If you can't grasp that, just ignore it. You don't look in /var for files to delete when root is full do you? Well don't look in /proc either. Or /usr. Or /tmp. And so on. You need to find files in root to delete. Removing a file from /var does not return space to the root fileststem. Neither would /proc.
If you want more space in your root filesystem, you must delete some files that reside there. Deleing files in other filesystems won't help. The space in root is consumed by files that reside in root. When a file resides somewhere else it doen't eat up space in root. As for how it works, type: df -n / /proc and you can see the filesystem type. When you open a file on / the open system call see that / is a ufs filesystem. So it calls the ufs code to open the file. The ufs code really does read a disk somewhere to get its info. On the other hand, when you open a file in /proc, the open system call sees that the file is in a proc filesystem so it calls the proc code. The proc code scans the currently running processes instead of reading a physical disk. And the read, stat, and write system calls do the same thing. This is called the filesystem switch. It was first used to put nfs into the kernel. |
||||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|
|
The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
|
| 421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop bash split boot: cannot open kernel/sparcv9/unix check if file exists command copy/move folder in unix curses.h cut command in unix find grep find mtime find null character in a unix file from ip can we get machine name +unix glance unix grep or grep recursive inaddr_any inappropriate ioctl for device known problems with fork unix c ksh if last login from unix lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp script snoop unix solaris change ip address stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix interview questions unix mtime unix.com vi substitute |