1753802 Members
8225 Online
108805 Solutions
New Discussion юеВ

Root at 97%.

 
SOLVED
Go to solution
Bill Hassell
Honored Contributor

Re: Root at 97%.

> # du -xk /|sort -nrk1,1|more
> 1130616 /
> 536928 /cdrom/DataProtector6.0
> 536928 /cdrom
> 283632 /mnt
> 283440 /mnt/dd/ptc
> 283440 /mnt/dd
> 202896 /etc


MAJOR errors here! The du -x option looks only at the / filesystem, so /cdrom is not a mountpoint for a CD, it is apparently a copy of a DataProtector CD stored in the / filesystem. Blow it away. You'll get 536 MB back immediately. It is not needed in / and should never have been put there. This is what /tmp and /var are for.

The second mistake is /mnt which has something that should not be in /...move it to /var or some other location and optionally put in a symlink to keep the functionality (if any). Personally, I would just move /mnt to /var and wait for something to break. That way you'll know what is there and ask why it is in root.

The third problem is /etc: 200 MB is too large for /etc unless you have hundreds of LUNs with lots of alternate paths. /etc/vx seems to verify this, but post the results of:

du -kx /etc | sort -rnk1 | head -20

Then also look in /etc for the bigger files:

ll /etc | sort -rnk5 | head -20

Post the results to see what is occupying space in the /etc directory.

Core files...
Before you remove the core files, find out what program created them like this:

file /opt/omni/gui/help/C/help_topics/core
file /var/adm/syslog/core
file /var/sam/core

This will tell you the name of the failing program. Look for patches or contact the owner of the program to get the problem fixed. Then you can blow them away.

/ directory:
Lots of mistakes here. They aren't occupying a lot of space but do indicate that root users are making mistakes and not repairing the problem:

> -r--r--r-- 1 bin bin 994 Nov 11 2009 .profile
> -rw------- 1 root sys 0 May 11 2010 .sh_history
> drwxr-xr-x 2 root sys 96 Apr 30 2008 .ssh
> drwxr-xr-x 6 root sys 96 Apr 30 2008 .sw
> -rw-r--r-- 1 root sys 12252 May 27 2010 mbox

These indicate that root's home directory is /, the worst possible location, but unfortunately the default for many Unix systems. Root's home should be in /root and all the root 'droppings' (files, directories) moved there. Then change /etc/passwd to reflect root's new home.

More notes:
> -rw-r--r-- 1 root sys 0 May 30 2008 devnull
> -rw-rw-rw- 1 root root 2691 Nov 12 2009 null

These are spelling errors. A root user made the mistake and used /null and /devnull when it should have been /dev/null. Blow them away.

-rw-rw-rw- 1 root sys 146959 Jan 19 12:51 out.txt
-rw-rw-rw- 1 root sys 146959 Jan 19 12:52 out1.txt

Junk files that should not be in /. Probably because root said to create these files with no path (bad habit. Should have been /tmp/out.txt. Moving root's home will mitigate the mistake but root users need to manage their junk files.

-rw-r--r-- 1 root sys 0 Sep 22 20

This is a filename with special characters in it. Use the command:

ll -b /

and you'll see the non-display characters. Needs to be removed.


Bill Hassell, sysadmin
John Jimenez
Super Advisor

Re: Root at 97%.

Also no big deal but there was some *.txt in / out.txt etc..... do a more on those files, if not important move them or delete them, root is no place for text files.
Hustle Makes things happen
John Jimenez
Super Advisor

Re: Root at 97%.

Wow Bill took a lot of time and found many other things. He is right and when you have time you need to investigate those one at a time.
Hustle Makes things happen
J.Kimbrell
Advisor

Re: Root at 97%.

Thx All !