SCO Unix Disk Near Full

Posted on 2003-12-10
Last Modified: 2013-12-05
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!
Question by:callikan
LVL 24

Expert Comment

ID: 9910577
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.

LVL 24

Expert Comment

ID: 9910597
Other places to look:

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.


Author Comment

ID: 9911128
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"

LVL 38

Expert Comment

ID: 9912224
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
   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


/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/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


Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

LVL 24

Expert Comment

ID: 9913575
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.

Author Comment

ID: 9918361
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.
LVL 24

Expert Comment

ID: 9918397
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.

LVL 24

Accepted Solution

shivsa earned 300 total points
ID: 9918404
/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.
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
LVL 61

Expert Comment

ID: 9918758
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now