[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: [qube-users] Qube 2 Disk Full



Stephen Sloan wrote:

> Well I did it. My earlier attempts to deal with the disk full warning
> resulted in my breaking the GUI. So I restored my Qube using the restore
> disk and proceeded to load all of the updates. And now, without loading
> anything else, I'm still getting the dreaded "Disk Full" message. The disk > usage shows 486.7 MB used by the operating system. My question: Has anyone
> come up with a durable solution to this problem? In the past I've
> successfully moved the tmp directory to the home partition, but that doesn't
> provide much help once you start loading other applications.

Hi there!

I hate that, too, and you would think I would be in position to do
something about it!  Anyway, the active monitor levels are kept in
/usr/lib/perl5/site_perl/Cobalt/Product_wg.pm.  But, this is not where
the values are kept for active monitor: to make the system run faster,
the values are copied into
/usr/lib/perl5/site_perl/auto/Repair/repair_examine.pl.

Look for the lines in repair_examine.pl:

$DiskYel    = 80;  # If a disk is more than this percent full, yellow alert
$DiskRed    = 90;  # If a disk is more than this percent full, red alert

and change them to whatever you like.  Perhaps 85 and 95.  However, this
will change the levels for ALL the disk partitions.   To change just the
levels for the root file system, you need to do a little more.

Put the patch below into a text file, say /tmp/repair.patch, and run
the following as root on your qube2:

# patch -p0 < /tmp/repair.patch
# perl -MAutoSplit -e
'autosplit("/usr/lib/perl5/site_perl/Cobalt/Repair.pm", "/usr/lib/perl5/site_perl/auto", 0, 1, 1)'

Runs of /usr/local/sbin/monitor will be a bit slower with this patch,
since Product.pm is included when repair_examine is called, but you will not get the active monitor warning.

Naturally, untested, unwaranted, etc., and the next OS update will blow
this change away.  Still, works for me.  I'll see about getting this
into the next update, since I'm tired of this problem on my personal
qube2 at home.  I'll do the same for a low-memory problem so that I
don't get emails asking me to add more ram when there is already 140MB...


Byron
--
Byron Servies
Sun Cobalt Server Appliances

----------------------------- CUT HERE -----------------------
*** Product.pm.orig     Thu Jul 19 11:14:53 2001
--- Product.pm  Thu Jul 19 11:15:19 2001
***************
*** 116,121 ****
--- 116,123 ----
             $Discuss_skel
             $DiskYel
             $DiskRed
+            $DiskRootYel
+            $DiskRootRed
             $Df_cmd
             $Dns_cgi
             $Dns_notification
*** Product_wg.pm.orig  Thu Jul 19 11:15:00 2001
--- Product_wg.pm       Thu Jul 19 11:15:41 2001
***************
*** 515,520 ****
--- 515,522 ----
  $CollRed    = 4015;  # Collision rate of this percent is a red alert
$DiskYel = 80; # If a disk is more than this percent full, yellow alert
  $DiskRed    = 90;  # If a disk is more than this percent full, red alert
+ $DiskRootYel = 85; # If a disk is more than this percent full, yellow alert
+ $DiskRootRed = 95;  # If a disk is more than this percent full, red alert
  $LoadYel    = 3;   # If the load average is this high, yellow alert
  $LoadRed    = 6;   # If the load average is this high, red alert
$QuotYel = 85; # If a user or group hits this % of quota, yellow alert
*** Repair.pm.orig      Thu Jul 19 11:15:04 2001
--- Repair.pm   Thu Jul 19 11:16:14 2001
***************
*** 44,49 ****
--- 44,53 ----
  # Return value: none
  {
      my ($service) = @_;
+
+     require Cobalt::Product;
+     import Cobalt::Product qw(:DEFAULT);
+
      print STDERR "Checking the state of $service\n" if ($Debug);

      # Get our IP address so we know what address to connect to
***************
*** 102,108 ****
      elsif ($service eq "filesystem")
        {
        # Check the overall usage for each partition
!       Cobalt::Monitor::mon_diskwatch("/",$DiskYel,$DiskRed);
        Cobalt::Monitor::mon_diskwatch("/var",$DiskYel,$DiskRed);
        Cobalt::Monitor::mon_diskwatch("/home",$DiskYel,$DiskRed);
        }
--- 106,112 ----
      elsif ($service eq "filesystem")
        {
        # Check the overall usage for each partition
!       Cobalt::Monitor::mon_diskwatch("/",$DiskRootYel,$DiskRootRed);
        Cobalt::Monitor::mon_diskwatch("/var",$DiskYel,$DiskRed);
        Cobalt::Monitor::mon_diskwatch("/home",$DiskYel,$DiskRed);
        }