• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1696
  • Last Modified:

SCO Unix Disk Near Full

Dear All

I'm have a SCO Unix OpenServer v5.0.4 running Informix database. I have had a problem with my tape drive recently and have had to remove it and i haven't been doing backups since more than a week.

After doing a # dfpace command to see the available free space, i found that on the / (root) partition there is only  /         :     Disk space:  75.37 MB of 1059.64 MB available ( 7.11%). I believe that since i'm not doing any full backups some log files of some sort and not being purged.

What are the files that i can safely delete such that i can find some space.

This is urgent!
0
callikan
Asked:
callikan
1 Solution
 
shivsaCommented:
Try the following command, you may have to change the syntex slightly for your version of unix ( see man page using 'man find' )

#  find / -mount -size 500k -print

This will list all files over the size 500k, try this with different sizes until you hit the big files which u do not need like core files/ dump files and which u think is not useful.
Start for example at 100000k,(100mb) then down until you get results.

if u have doubt post it here we will help u.


then check all the log files under / partition, which can also be deleted.

0
 
shivsaCommented:
Other places to look:

/usr/spool/mail
if u find any big file and u think u do not need it make it null
# cat /dev/null > file_name
/usr/spool/lp/logs     -> The requests file under this directory can become quite large.
 -> To clear the log files here do the following:

Make sure no print jobs are pending
# lpstat -o
# /usr/lib/lpshut
# cat /dev/null > /usr/spool/lp/logs/requests
# cat /dev/null > /usr/spool/lp/logs/lpsched
# /usr/lib/lpsched        

/usr/adm   or /var/adm                 -> The messages file and the syslog file can become quite large.  Also check wtmp and
 utmp here.  To clear these:

# cat /dev/null > /usr/adm/file_name

NOTE: If utmp and wtmp are cleared, this should be followed with shutdown and reboot.

also try to find core files too and delete them.

find / -type f -name core
find / -type f -name "*.tar"
if u find tar files and u need those compress it/zip it.
with compress and gzip command.

0
 
callikanAuthor Commented:
I didi a search for core files but didn't find any. But my question remains, what are the files that are staying on my drive because i'm not backing up my drive? Or howcome files are being purged when i do a backup ?

Also what are the steps you quoted below actually doing and are they safe?

"Make sure no print jobs are pending
# lpstat -o
# /usr/lib/lpshut
# cat /dev/null > /usr/spool/lp/logs/requests
# cat /dev/null > /usr/spool/lp/logs/lpsched
# /usr/lib/lpsched"

       
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
yuzhCommented:
It is safe to delete the tmp files and the core files ( core files should be deleted any way)

Here's what you need to do:
   delete all core files
   find / -name core -exec rm {} \;
   
  delete tmp files:
   cd /tmp
   pwd                 # make sure that you are in /tmp
   rm *

   cd /usr/tmp
   pwd                 # make sure that you are in /tmp
   rm -r *

    To find out where the disk usage:
   df -k
   or
   cd /
   du -sk *          (out put each dir in KB)

   Files that can be truncated :
/usr/spool/lp/logs/lpsched, /usr/spool/lp/logs/requests

/usr/adm/messages, /usr/adm/syslog, /usr/lib/cron/log

/var/scohttp/logs/access_log, /var/scohttp/logs/error_log, /var/scohttp/logs/startup_errors

/usr/local/lib/apache/var/log/*

/etc/utmp, /etc/wtmp

/etc/utmpx, /etc/wtmpx

/tcb/audittmp (this directory may contain audit files; they can be removed)

/usr/spool/uucppublic (if you use uucp)

/usr/spool/uucp/.Log (sub-directories therein may contain log files)

/usr/mmdf/log/*.log

/usr/mmdf/lock/home/*, /usr/spool/mail/*


Any of these could be very large. Truncate by typing

  > /usr/spool/lp/logs/requests

That's a ">" followed by the name of the file

Good luck
============
yuzh





   

0
 
shivsaCommented:
yes  callikan,
they are safe and known to release a good chunk of space on root filesystem.
about these steps.
"Make sure no print jobs are pending
# lpstat -o                              <- to check if any request is there or not.
# /usr/lib/lpshut                      <- shutdown the printing.
# cat /dev/null > /usr/spool/lp/logs/requests                  <-  purging the request file
# cat /dev/null > /usr/spool/lp/logs/lpsched                     <- purging the sched file
# /usr/lib/lpsched                                            <- restart printing.
0
 
callikanAuthor Commented:
I did all you said, but i have only been able to salvage around 8 MB of free space. I have found that there are a lot of files in the folder named /usr/adm/sa. Are they safe to delete ? Also i still have the impression that the disk size is decreasing slowly, maybe by around 20K an hour or so. What could be causing that?

Thanks for your previous replies.
0
 
shivsaCommented:
if disk size is growing like u said then it means some process is keep dumping on logs files. and it is making your root disk full.

/usr/adm/sa is looks like culprit.

sar command keep system activity report in this directory and it is filling yout disk space.
do u have any running script which keep on taking all this data nd dumping to this dir.
u might be having dirs like
/usr/adm/sa/sa1 or something like that.

0
 
shivsaCommented:
/usr/adm/sa/sadd            daily data file
/usr/adm/sa/sardd           daily report file

u can delete it if u do not want these records.
also
check your cron file to see if this script is running from there.
sometime admin guy put this in rc script also so as soon as system bootup they start this script all the time.

for more information
man sar
0
 
gheistCommented:
Seems like You use filesystem files for Informix.
So they take their fair space at least.
You can change backup device in onconfig file to be /dev/null and do fake backup to free some space
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now