cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci/modules/log LogParser.cpp
Date: 15 Aug 2006 00:00:12 -0000	[thread overview]
Message-ID: <20060815000012.7554.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-08-15 00:00:12

Modified files:
	ricci/modules/log: LogParser.cpp 

Log message:
	log module: improve kernel logs handling, update tags to parse for CS5 logs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.5&r2=1.6

--- conga/ricci/modules/log/LogParser.cpp	2006/08/11 16:27:28	1.5
+++ conga/ricci/modules/log/LogParser.cpp	2006/08/15 00:00:10	1.6
@@ -39,17 +39,30 @@
 
 
 
-static const char* cluster[] = {"dlm",
+static const char* cluster[] = {"cluster",
+				"modclusterd",
+				"dlm",
 				"gulm",
 				"cman",
+				"cman_tool",
+				"ccs",
+				"ccs_tool",
 				"ccsd",
 				"fence",
 				"fenced",
 				"clvmd",
 				"gfs",
-				"clurgmgrd"};
+				"gfs2",
+				"openais",
+				"groupd",
+				"qdiskd", 
+				"dlm_controld",
+				"gfs_controld",
+				"clurgmgrd",
+				"rgmanager"};
 
-static const char* cluster_service_manager[] = {"clurgmgrd"};
+static const char* cluster_service_manager[] = {"clurgmgrd",
+						"rgmanager"};
 
 static const char* LVS[] = {"ipvs",
 			    "ipvsadm",
@@ -57,10 +70,12 @@
 			    "piranha-gui"};
 
 static const char* storage[] = {"gfs",
+				"gfs2",
 				"lvm",
 				"clvm",
 				"clvmd",
 				"end_request",
+				"buffer",
 				"scsi",
 				"md",
 				"raid0",
@@ -68,10 +83,15 @@
 				"raid4",
 				"raid5",
 				"cdrom",
+				"ext2",
+				"ext3",
+				"ext3-fs",
+				"swap", 
 				"mount",
 				"automount"};
 
 static const char* selinux[] = {"selinux",
+				"security",
 				"pam",
 				"audit"};
 
@@ -201,8 +221,12 @@
   vector<String> words = utils::split(entry);
   if (words.size() < 6)
     throw String("invalid log entry format");
-  if (words[4] == "last" && words[5] == "message")
-    throw String("LogEntry: last message repeatition");
+  if (words[4] == "last" && 
+      words[5] == "message")
+    throw String("LogEntry: last message repetition");
+  if (words[5] == "printk:" && 
+      entry.find("suppressed") != entry.npos) 
+    throw String("LogEntry: printk repetition");
   
   // get current year (not present in log files)
   char buff[100];
@@ -236,31 +260,17 @@
     tags.insert(pid);
   }
   vector<String>::size_type idx = 5;
-  if (domain == "kernel")
-    if (words[5][words[5].size()-1] == ':') {
-      domain = utils::rstrip(utils::to_lower(words[5]), ":");
-      tags.insert(domain);
+  if (domain == "kernel") {
+    domain = utils::rstrip(utils::to_lower(words[5]), ":");
+    tags.insert(domain);
+    if (words[5][words[5].size()-1] == ':')
       idx = 6;
-    }
+  }
   
   // message
   for ( ; idx<words.size(); idx++)
     msg += words[idx] + " ";
   msg = utils::strip(msg);
-  // replace illegal XML characters
-  i = 0;
-  while ((i = msg.find_first_of("\"<>", i)) != msg.npos) {
-    switch (msg[i]) {
-      case '<':
-	msg[i] = '(';
-	break;
-      case '>':
-	msg[i] = ')';
-	break;
-      default:
-	msg[i] = '\'';
-    }
-  }
   
   // tags (misc)
   for (vector<String>::size_type j=4; j<6; j++) {



             reply	other threads:[~2006-08-15  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15  0:00 kupcevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-05 21:40 [Cluster-devel] conga/ricci/modules/log LogParser.cpp kupcevic
2007-02-05 21:25 kupcevic
2006-11-08 20:14 rmccabe
2006-08-11 16:27 kupcevic
2006-06-14 21:18 kupcevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060815000012.7554.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).