1823144 Members
3583 Online
109647 Solutions
New Discussion юеВ

Re: System tuning

 
SOLVED
Go to solution
Allan Palma Faylona
Contributor

System tuning

My "/" directory is currently running out of disk space. Like in /var i can delete files in /var/adm/syslog, /var/tombstones,
/var/preserve.. etc.. What files can i delete in the "/" that are not needed and so with /opt


thanks
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: System tuning

Could you post a bdf output ?

You could check for large files in /

# find / -xdev -type f -size +1000 -exec ll {} \;

should be nothing more then /sbin + /etc.

Regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: System tuning

Allan,

Look for core files (find / -name core). Look at /dev for non-device files (find /dev -type f) - these can occur when someone mistypes a tape device file in a backup - like /dev/rmt/Om (that's a capital "o", rather than a zero).


Pete

Pete
Sanjay Kumar Suri
Honored Contributor

Re: System tuning

You can also use SAM --> Routine tasks --> System Log files to trim the log files created in the system.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Naveej.K.A
Honored Contributor

Re: System tuning

hi,

is it that all the conventional filesystems are in / itself??

then cleanup /var/tmp and /tmp

also cleanup -p -c 2 and make sure that there are no superceded patches (twice)
and do a cleanup -c 2 to execute the cleanup

with best wishes
Naveej
practice makes a man perfect!!!
Bharat Katkar
Honored Contributor
Solution

Re: System tuning

Hi,
Check whether /var /opt /usr are seperate file systems, if so then it will not affect the size of root.
Check if any user has created unknowingly some directories or file under root, if so try moving them to some other filesystem. Also trim the log file for e.g.
# > /var/adm/syslog/syslog.log

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Geoff Wild
Honored Contributor

Re: System tuning

From /

du -sk * |sort -n

That will give you a sorted list of dirs/files by size - from ther, check out directories which are not mounted...

You can also run that command from anywhere...

Example - here's my workstation:

# du -sk * |sort -n
0 SD_CDROM
0 adviser.out
0 bin
0 cdrom
0 lib
0 lost+found
0 mnt
0 oracle
0 tempspace
0 tmp_mnt
1 dead.letter
1 hosts
1 net
2 z
3 sh_history
16 dev
315 Mail
3115 tmp
31199 sbin
50990 etc
53001 stand
103141 app
186101 home
1382069 opt
1670723 usr
2397259 var

var, usr,opt,home,app,stand - all mounted.

But I have 50 MB in etc...

# cd etc
# du -sk * |sort -n
0 aliases
0 arp
0 audomon
.
.
.
697 lvmconf
11628 opt
14492 vx
21658 namedb

Ahh - 21 MB wasted in /etc/namedb

What I can do is make that a separtae filesystem and that would free up 21 MB for /

Rgds....Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor

Re: System tuning

Your / directory is filling up due to applications that install themselves in a directory without your permission, or you are leaving a bunch of root 'droppings' in root's HOME directory. You may also have had a spelling error during a manual backup. To find the spelling error, use this:

find /dev -type f -exec ll {} \;

There must be *NO* regular files in /dev.

As far as / files, there must be *NO* regular files in /. Of course, the (wrong) location for root's HOME is /, so create a /root directory, then move all useful regular files to /root (delete any junk files, if "core" exists, find the name of the process with: file core, then delete it). Then, change root's HOME directory in /etc/passwd using vipw.

Now analyze / for the largest directories:

du -kx / | sort -rn | head -20

Notice I said directories, not files. You're not interested in large files until you find large directories. Here are typical sizes for the biggest directories:

73336 /
33104 /etc
32616 /sbin
14736 /etc/vx
13896 /etc/opt
12536 /etc/vx/type
8504 /etc/opt/resmon

Now if you find any other directories other than these at the top of the list, finf out what they are for (they aren't part of HP-UX) and move them. For applications, move them to /opt. If the application is so primitive that it can't be moved, move the entire structure to /opt/ and then create a symbolic link from the /directory to the new location in /opt.


Bill Hassell, sysadmin