cas
by Adam Stokes
cas | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5b8ab1f753b53321b1c36d4b7e2eb23465357b70
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Mon Apr 27 20:36:15 2009 -0400
- dont remember
diff --git a/cas b/cas
index dd7faeb..20d353b 100755
--- a/cas
+++ b/cas
@@ -207,7 +207,7 @@ class CasApplication(object):
else:
filterString = "*/%s" % (debugKernel,)
self.casLog.info("Extracting debug kernel with filter %s" % (filterString,))
- # FIXME: bug in extract where vmlinux not being placed in defined
+ # DONE: bug in extract where vmlinux not being placed in defined
# destination.
self.rpmTool.extract(debuginfo, self.storagePath,
filter=filterString,
15 years
cas
by Adam Stokes
cas | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5ac7783d21bc7dc663a5c6e10ad3cc31671391ba
Author: uzr <uzr(a)shinzo.(none)>
Date: Mon Apr 27 16:16:45 2009 -0400
- typo, changed self.dst to self.storagePath
diff --git a/cas b/cas
index 2b82c40..dd7faeb 100755
--- a/cas
+++ b/cas
@@ -185,7 +185,7 @@ class CasApplication(object):
# we've got corefile prepped, timestamp, and debugkernel identified
# chdir into work directory and proceed
- os.chdir(self.dst)
+ os.chdir(self.storagePath)
corefileArch = self.util.getElfArch(corefile)
self.casLog.debug("core arch %s" % (corefileArch,))
15 years
cas.spec
by Adam Stokes
cas.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 304e5f16109220c8807452a2cae6965ecddab302
Author: uzr <uzr(a)shinzo.(none)>
Date: Mon Apr 27 16:10:09 2009 -0400
- rel bump
diff --git a/cas.spec b/cas.spec
index c5994ad..a373ca9 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.14
-Release: 4%{?dist}
+Release: 6%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
15 years
lib/cas
by Adam Stokes
lib/cas/rpmutils.py | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit a5a1c75d01a8059670fc66306cfe1189f06894b8
Author: uzr <uzr(a)shinzo.(none)>
Date: Mon Apr 27 16:09:44 2009 -0400
- removed chdir function and pushed it to main application
routine
diff --git a/lib/cas/rpmutils.py b/lib/cas/rpmutils.py
index a35c850..170fcf4 100644
--- a/lib/cas/rpmutils.py
+++ b/lib/cas/rpmutils.py
@@ -40,10 +40,6 @@ class RPMBase(object):
self.cpio_args = "-imudv"
self.filter_results = []
- if not os.path.isdir(self.dst):
- os.makedirs(self.dst)
- os.chdir(self.dst)
-
# pipe to handle extraction, e.g. rpm2cpio kernel.rpm | cpio -imud */vmlinux
p1 = Popen([self.rpm2cpio, self.rpm], stdout=PIPE)
p2 = Popen([self.cpio,self.cpio_args,self.filter], stdin=p1.stdout,
15 years
lib/cas
by Adam Stokes
lib/cas/db.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit ab70b848a58ce366c6187b0c41dbebe68694720d
Author: uzr <uzr(a)shinzo.(none)>
Date: Mon Apr 27 16:09:22 2009 -0400
- hopefully fixed sql statemen tin gettimestampdebug
diff --git a/lib/cas/db.py b/lib/cas/db.py
index 10cf84e..6d1d01a 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -88,7 +88,8 @@ class CasStorage(object):
values = (timestamp,)
self.cursor.execute('''SELECT rpm,debugpath
FROM debuginfo, timestamp
- where timestamp LIKE "%%%s%%"''' % values)
+ where timestamp.timestamp LIKE "%%%s%%"
+ AND debuginfo.debug_id = timestamp.debug_id''' % values)
return self.cursor.fetchone()
# JOB METHODS
15 years
cas
by Adam Stokes
cas | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 29f3ac52528c9e77987b89b603b2feb1a0e64a47
Author: uzr <uzr(a)shinzo.(none)>
Date: Mon Apr 27 16:08:44 2009 -0400
- fixed bug to define CRASH_32 in cmd when processing
32bit on x86_64
diff --git a/cas b/cas
index 77b063c..2b82c40 100755
--- a/cas
+++ b/cas
@@ -182,6 +182,10 @@ class CasApplication(object):
corefile = CoreHandler(self.filename, self.storagePath, self.casLog).run()
self.casLog.info("Corefile prepared, processing %s" % (corefile,))
debuginfo, debugKernel = TimestampHandler(corefile, self.casLog, self.db).run()
+
+ # we've got corefile prepped, timestamp, and debugkernel identified
+ # chdir into work directory and proceed
+ os.chdir(self.dst)
corefileArch = self.util.getElfArch(corefile)
self.casLog.debug("core arch %s" % (corefileArch,))
@@ -223,7 +227,7 @@ class CasApplication(object):
CRASH_32)
self.casLog.info("Current machine suitable for processing 32 bit core, "\
"running crash.")
- cmd = "./crash -i crash.in > crash.out"
+ cmd = "%s -i crash.in > crash.out" % (CRASH_32,)
cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
cmdData = cmdPipe.communicate()
# pull status code to verify crash even ran to completeness
15 years
cas lib/cas
by Adam Stokes
cas | 9 +++------
lib/cas/db.py | 11 ++++++-----
lib/cas/rpmutils.py | 4 ++++
3 files changed, 13 insertions(+), 11 deletions(-)
New commits:
commit 05b30c567a8efb2c0be371b83ea6b845a90c04df
Author: adam stokes <ajs(a)redhat.com>
Date: Mon Apr 27 14:18:58 2009 -0400
- attempting to fix bug in extraction of debug kernels now
diff --git a/cas b/cas
index dcdd788..77b063c 100755
--- a/cas
+++ b/cas
@@ -171,7 +171,7 @@ class CasApplication(object):
# Add job to database, this allows us to purge
# data based on job date creation then by other
# means. (i.e. identifier == a bugzilla #)
- self.db.addJob(self.identifier, dateFormatted)
+ self.db.addJob(self.identifier, dateFormatted, self.email)
def run(self):
# setup directory structure
@@ -183,11 +183,6 @@ class CasApplication(object):
self.casLog.info("Corefile prepared, processing %s" % (corefile,))
debuginfo, debugKernel = TimestampHandler(corefile, self.casLog, self.db).run()
- # change to destination directory
- if not os.path.isdir(self.storagePath):
- os.makedirs(self.storagePath)
- os.chdir(self.storagePath)
-
corefileArch = self.util.getElfArch(corefile)
self.casLog.debug("core arch %s" % (corefileArch,))
@@ -208,6 +203,8 @@ class CasApplication(object):
else:
filterString = "*/%s" % (debugKernel,)
self.casLog.info("Extracting debug kernel with filter %s" % (filterString,))
+ # FIXME: bug in extract where vmlinux not being placed in defined
+ # destination.
self.rpmTool.extract(debuginfo, self.storagePath,
filter=filterString,
return_results=False)
diff --git a/lib/cas/db.py b/lib/cas/db.py
index 2b7b8cc..10cf84e 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -38,7 +38,8 @@ class CasStorage(object):
self.cursor.execute("""create table jobs (
job_id integer primary key autoincrement,
identifier integer,
- date text)
+ date text,
+ email text)
""")
self.cursor.execute("""create table debuginfo (
debug_id integer primary key autoincrement,
@@ -107,11 +108,11 @@ class CasStorage(object):
"""
pass
- def addJob(self, identifier, date):
+ def addJob(self, identifier, date, email="noone(a)example.com"):
""" add job to db """
- values = (str(date), int(identifier))
- self.cursor.execute('''INSERT into jobs (date,identifier)
- values ("%s",%d)''' % values)
+ values = (str(date), int(identifier), str(email))
+ self.cursor.execute('''INSERT into jobs (date,identifier,email)
+ values ("%s",%d, "%s")''' % values)
self.commit()
return
diff --git a/lib/cas/rpmutils.py b/lib/cas/rpmutils.py
index 170fcf4..a35c850 100644
--- a/lib/cas/rpmutils.py
+++ b/lib/cas/rpmutils.py
@@ -40,6 +40,10 @@ class RPMBase(object):
self.cpio_args = "-imudv"
self.filter_results = []
+ if not os.path.isdir(self.dst):
+ os.makedirs(self.dst)
+ os.chdir(self.dst)
+
# pipe to handle extraction, e.g. rpm2cpio kernel.rpm | cpio -imud */vmlinux
p1 = Popen([self.rpm2cpio, self.rpm], stdout=PIPE)
p2 = Popen([self.cpio,self.cpio_args,self.filter], stdin=p1.stdout,
15 years
cas cas-admin cas.conf cas.spec lib/cas
by Adam Stokes
cas | 6 ++----
cas-admin | 2 +-
cas.conf | 2 +-
cas.spec | 2 +-
lib/cas/db.py | 1 +
5 files changed, 6 insertions(+), 7 deletions(-)
New commits:
commit cdabea3cad6d0531e27c7541fcf8fd01856dc9ae
Author: adam stokes <ajs(a)redhat.com>
Date: Mon Apr 27 13:41:25 2009 -0400
- altered regex to hopefully grab more range of kernel debugs
- added commit to addJob
diff --git a/cas b/cas
index 3245adb..dcdd788 100755
--- a/cas
+++ b/cas
@@ -188,7 +188,7 @@ class CasApplication(object):
os.makedirs(self.storagePath)
os.chdir(self.storagePath)
- corefileArch = self.util.getElfArch(self.filename)
+ corefileArch = self.util.getElfArch(corefile)
self.casLog.debug("core arch %s" % (corefileArch,))
# Read current machine arch to see if we can bypass func and proceed
@@ -198,7 +198,7 @@ class CasApplication(object):
self.casLog.debug("local machine arch %s" % (currentMachineArch,))
# check if an installed vmlinux can be used (symlink to save space)
- local_vmlinux = "/%s" % debugKernel
+ local_vmlinux = "/%s" % (debugKernel,)
if currentMachineArch == corefileArch and os.path.isfile(local_vmlinux):
self.casLog.info("Using local debug kernel")
os.symlink(local_vmlinux, "%s/%s" %
@@ -211,8 +211,6 @@ class CasApplication(object):
self.rpmTool.extract(debuginfo, self.storagePath,
filter=filterString,
return_results=False)
- # define absolute path to debugkernel
- debugKernel = os.path.abspath(debugKernel)
self.casLog.info("checking debug kernel %s" % (debugKernel,))
diff --git a/cas-admin b/cas-admin
index 0a4ef82..7ee4551 100755
--- a/cas-admin
+++ b/cas-admin
@@ -12,7 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-""" casprint - fingerprinting utility for cas
+""" cas-admin - fingerprinting utility for cas
"""
import os
import ConfigParser
diff --git a/cas.conf b/cas.conf
index ed1117d..75a6609 100644
--- a/cas.conf
+++ b/cas.conf
@@ -6,7 +6,7 @@ kernels=/mnt/kernels
# Compose emacs regular expression for determing what
# kernel debug rpms you wish to search for
-rpmFilter=.*kernel-debuginfo-[0-9].*\.rpm
+rpmFilter=.*kerne.+-debuginfo-[0-9].*\.rpm
# Define where to store necessary debug information
# NOTE: This is a temporary storage area for when
diff --git a/cas.spec b/cas.spec
index fe6936b..c5994ad 100644
--- a/cas.spec
+++ b/cas.spec
@@ -3,7 +3,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
Version: 0.14
-Release: 3%{?dist}
+Release: 4%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
diff --git a/lib/cas/db.py b/lib/cas/db.py
index d18c03b..2b7b8cc 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -112,6 +112,7 @@ class CasStorage(object):
values = (str(date), int(identifier))
self.cursor.execute('''INSERT into jobs (date,identifier)
values ("%s",%d)''' % values)
+ self.commit()
return
# SERVER METHODS
15 years
lib/cas
by Adam Stokes
lib/cas/db.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8aa2c87ee774e1b8ab443cac6c5cd50255dd4d43
Author: adam stokes <ajs(a)redhat.com>
Date: Mon Apr 27 09:41:51 2009 -0400
- stupid quotes
diff --git a/lib/cas/db.py b/lib/cas/db.py
index c76021f..d18c03b 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -87,7 +87,7 @@ class CasStorage(object):
values = (timestamp,)
self.cursor.execute('''SELECT rpm,debugpath
FROM debuginfo, timestamp
- where timestamp LIKE '"%%%s%%"''' % values)
+ where timestamp LIKE "%%%s%%"''' % values)
return self.cursor.fetchone()
# JOB METHODS
15 years
[PATCH] - Popen() uses os.execvp() by default so the output redirection doesn't work unless shell=True is used, then the command string is execute through the shell.
by Flavio Leitner
---
cas | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cas b/cas
index e380203..3245adb 100755
--- a/cas
+++ b/cas
@@ -228,8 +228,8 @@ class CasApplication(object):
CRASH_32)
self.casLog.info("Current machine suitable for processing 32 bit core, "\
"running crash.")
- cmd = "cd " + os.path.join(self.storagePath) + " && ./crash -i crash.in > crash.out"
- cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE)
+ cmd = "./crash -i crash.in > crash.out"
+ cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
cmdData = cmdPipe.communicate()
# pull status code to verify crash even ran to completeness
sts, out, err = (cmdPipe.returncode, cmdData[0].strip(),
@@ -242,8 +242,8 @@ class CasApplication(object):
casProcessMachine = platform.uname()[1]
# The machine is suitable for processing the core through crash.
self.casLog.info("Current machine suitable for processing core, running crash.")
- cmd = "cd " + os.path.join(self.storagePath) + " && ./crash -i crash.in > crash.out"
- cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE)
+ cmd = "./crash -i crash.in > crash.out"
+ cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
cmdData = cmdPipe.communicate()
# pull status code to verify crash even ran to completeness
sts, out, err = (cmdPipe.returncode, cmdData[0].strip(),
--
1.6.2.3
15 years