[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


SCO Unix Disk Near Full

Posted on 2003-12-10
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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"

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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


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 900 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 62

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

650 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