Added the class definition for a filesystem parameter.
authorarjen <arjen>
Sat, 3 Nov 2007 10:30:10 +0000 (10:30 +0000)
committerarjen <arjen>
Sat, 3 Nov 2007 10:30:10 +0000 (10:30 +0000)
New issue type: 'property out of range'.

src/database/create.sql
src/gcm_daemon/classes/gnucomo_db_version.php
src/gcm_daemon/gcm_daemon.php

index 500c79b..1b62eea 100644 (file)
 -- DBA create the database and give access permissions.
 --
 --  $Log: create.sql,v $
 -- DBA create the database and give access permissions.
 --
 --  $Log: create.sql,v $
---  Revision 1.21  2007-10-23 11:25:42  arjen
+--  Revision 1.22  2007-11-03 10:30:10  arjen
+--  Added the class definition for a filesystem parameter.
+--  New issue type: 'property out of range'.
+--
+--  Revision 1.21  2007/10/23 11:25:42  arjen
 --  Fixed the Failure and warning issues.
 --
 --  Revision 1.20  2007/01/11 13:47:35  arjen
 --  Fixed the Failure and warning issues.
 --
 --  Revision 1.20  2007/01/11 13:47:35  arjen
@@ -546,6 +550,21 @@ CREATE TABLE "parameter_class"
 INSERT INTO parameter_class (name, property_name, description, property_type, notify)
   VALUES ('package', 'version', 'The installed version of the package', 'STATIC', 't');
 
 INSERT INTO parameter_class (name, property_name, description, property_type, notify)
   VALUES ('package', 'version', 'The installed version of the package', 'STATIC', 't');
 
+INSERT INTO parameter_class (name, property_name, description, property_type, notify)
+  VALUES ('filesystem', 'device', 'Volume on which the filesystem resides', 'STATIC', 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, notify)
+  VALUES ('filesystem', 'size', 'Total size in kilobytes', 'STATIC', 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)
+  VALUES ('filesystem', 'used', 'Number of kilobytes used', 'DYNAMIC', 0, 1000000, 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)
+  VALUES ('filesystem', 'available', 'Number of kilobytes available', 'DYNAMIC', 1000, 1000000, 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, notify)
+  VALUES ('filesystem', 'Inodes', 'Total number of i-nodes', 'STATIC', 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)
+  VALUES ('filesystem', 'Iused', 'Number of i-nodes used', 'DYNAMIC', 0, 1000000, 't');
+INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)
+  VALUES ('filesystem', 'Ifree', 'Number of i-nodes available', 'DYNAMIC', 1000, 1000000, 't');
+
 --
 --
 
 --
 --
 
@@ -711,6 +730,7 @@ COPY "type_of_issue" FROM stdin;
 9      Error detected  5       An Error is reported in the log t       t       1       \N      \N
 10     Failure detected        5       A Failure is reported in the log        t       t       1       \N      \N
 11     Warning detected        3       A Warning is reported in the log        t       t       1       \N      \N
 9      Error detected  5       An Error is reported in the log t       t       1       \N      \N
 10     Failure detected        5       A Failure is reported in the log        t       t       1       \N      \N
 11     Warning detected        3       A Warning is reported in the log        t       t       1       \N      \N
+12     property out of range   5       The DYNAMIC property of a parameter is out of range     t       t       1       \N      \N
 \.
 
 CREATE UNIQUE INDEX type_of_issue_type_of_issue_key ON type_of_issue USING btree (type_of_issueid);
 \.
 
 CREATE UNIQUE INDEX type_of_issue_type_of_issue_key ON type_of_issue USING btree (type_of_issueid);
@@ -719,7 +739,7 @@ CREATE UNIQUE INDEX toi_name ON type_of_issue USING btree (name);
 
 CREATE INDEX toi_active ON type_of_issue USING btree (active);
 
 
 CREATE INDEX toi_active ON type_of_issue USING btree (active);
 
-SELECT setval ('"type_of_issue_type_of_issue_seq"', 11, true);
+SELECT setval ('"type_of_issue_type_of_issue_seq"', 12, true);
 
 --
 --
 
 --
 --
index c927b0b..9bb9024 100644 (file)
@@ -632,6 +632,37 @@ case 43:
      $dbms->query("DROP TABLE log_adv_daemon");
      $dbms->query("DROP TABLE log_adv");
 
      $dbms->query("DROP TABLE log_adv_daemon");
      $dbms->query("DROP TABLE log_adv");
 
+   case 51:
+
+     $local_sql = "INSERT INTO type_of_issue (name, suggested_priority, description, active)";
+     $local_sql .= " VALUES ('property out of range',5,'The DYNAMIC property of a parameter is out of range', true) ";
+     $dbms->query($local_sql);
+
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, notify)";
+     $local_sql .= " VALUES ('filesystem', 'device', 'Volume on which the filesystem resides', 'STATIC', 't')";
+     $dbms->query($local_sql);
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, notify)";
+     $local_sql .= " VALUES ('filesystem', 'size', 'Total size in kilobytes', 'STATIC', 't')";
+     $dbms->query($local_sql);
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)";
+     $local_sql .= " VALUES ('filesystem', 'used', 'Number of kilobytes used', 'DYNAMIC', 0, 1000000, 't')";
+     $dbms->query($local_sql);
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)";
+     $local_sql .= " VALUES ('filesystem', 'available', 'Number of kilobytes available', 'DYNAMIC', 1000, 1000000, 't')";
+     $dbms->query($local_sql);
+
+   case 52:
+
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, notify)";
+     $local_sql .= " VALUES ('filesystem', 'Inodes', 'Total number of i-nodes', 'STATIC', 't')";
+     $dbms->query($local_sql);
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)";
+     $local_sql .= " VALUES ('filesystem', 'Iused', 'Number of i-nodes used', 'DYNAMIC', 0, 1000000, 't')";
+     $dbms->query($local_sql);
+     $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, min, max, notify)";
+     $local_sql .= " VALUES ('filesystem', 'Ifree', 'Number of i-nodes available', 'DYNAMIC', 1000, 1000000, 't')";
+     $dbms->query($local_sql);
+
 //These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN
 /*
 TODO:
 //These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN
 /*
 TODO:
index 278c29e..bf8eded 100755 (executable)
    Gnucomo-0.0.8: September 4th 2003
 
  $Log: gcm_daemon.php,v $
    Gnucomo-0.0.8: September 4th 2003
 
  $Log: gcm_daemon.php,v $
- Revision 1.22  2007-10-23 11:23:52  arjen
+ Revision 1.23  2007-11-03 10:31:12  arjen
+ Added the class definition for a filesystem parameter.
+ New issue type: 'property out of range'.
+
+ Revision 1.22  2007/10/23 11:23:52  arjen
  Record the date when adding the number of abuses for an IP address
  in the abuse list.
 
  Record the date when adding the number of abuses for an IP address
  in the abuse list.
 
@@ -77,7 +81,7 @@
 
 */
 
 
 */
 
-// $Id: gcm_daemon.php,v 1.22 2007-10-23 11:23:52 arjen Exp $
+// $Id: gcm_daemon.php,v 1.23 2007-11-03 10:31:12 arjen Exp $
 
 ini_set('include_path', '.:./classes:../phpclasses');
 ini_set('html_errors', 'false');
 
 ini_set('include_path', '.:./classes:../phpclasses');
 ini_set('html_errors', 'false');
@@ -97,7 +101,7 @@ $purge_date     ="";            // Purge log entries until this date. Default: n
 $project_name   = "gnucomo";    // name of the entire project
 $app_name       = "gcm_daemon"; // name of the application running
 $developrelease = "FALSE";      // Indicates if special debug settings are needed
 $project_name   = "gnucomo";    // name of the entire project
 $app_name       = "gcm_daemon"; // name of the application running
 $developrelease = "FALSE";      // Indicates if special debug settings are needed
-$db_version     = 51;           // The db_version indicates what the level of
+$db_version     = 53;           // The db_version indicates what the level of
                                 // the database should be. If the database is
                                 // old an update will be generated.
 $gcmd_version   = 5;            // This value indicates the active version of
                                 // the database should be. If the database is
                                 // old an update will be generated.
 $gcmd_version   = 5;            // This value indicates the active version of