web/header.html web/job_detail.html web/jobs.html web/media
by Adam Stokes
web/header.html | 2 +-
web/job_detail.html | 23 ++++++++++++++++++-----
web/jobs.html | 2 +-
web/media/css/cas-web.css | 4 ++++
4 files changed, 24 insertions(+), 7 deletions(-)
New commits:
commit a76869b6372390788226e59990be0007200e4df9
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed Apr 29 20:36:22 2009 -0400
- web-ui reading logs, checking statuses.
diff --git a/web/header.html b/web/header.html
index 6c65c4f..43a5b8c 100644
--- a/web/header.html
+++ b/web/header.html
@@ -8,7 +8,7 @@
</head>
<body>
<div id="header">
- <p><img src="/media/img/cas_logo.png"></p>
+ <p><a href="/"><img src="/media/img/cas_logo.png"></a></p>
:// <a href="/">go home</a>, <a href="/jobs.html">jobs</a>
</div>
diff --git a/web/job_detail.html b/web/job_detail.html
index a93d0ab..e39ce8a 100644
--- a/web/job_detail.html
+++ b/web/job_detail.html
@@ -1,12 +1,25 @@
<& header.html &>
<div id="content">
-<% $id %>
+<h3>Job Detail</h3>
+% open LOG_DATA, "<$work_dir/$view_log" or die $!;
+% while (<LOG_DATA>) {
+<% $_ %>
+% }
<& footer.html &>
-<%args>
-my $id;
-</%args>
<%init>
use Data::Dumper;
-my $page_id = $id;
+
+my $work_dir;
+open CONFIG, "</etc/cas.conf" or die $!;
+while (<CONFIG>) {
+ if (/^workDirectory=(.*)/) {
+ $work_dir = $1;
+ }
+}
+close CONFIG;
</%init>
+
+<%args>
+$view_log
+</%args>
diff --git a/web/jobs.html b/web/jobs.html
index 5064e46..a648b33 100644
--- a/web/jobs.html
+++ b/web/jobs.html
@@ -9,7 +9,7 @@
% foreach my $item (@{$data}) {
% my ($id, $identify, $timestamp, $email) = @{$item};
<tr>
-<td><a href="/job_detail.html?id=<% $id %>">Detail</a></td>
+<td><a href="/job_detail.html?view_log=<% $identify %>/<% $timestamp %>.log">view log</a></td>
<td><% $id %></td>
<td><% $identify %></td>
<td><% $timestamp %></td>
diff --git a/web/media/css/cas-web.css b/web/media/css/cas-web.css
index 7dbab6d..61a3278 100644
--- a/web/media/css/cas-web.css
+++ b/web/media/css/cas-web.css
@@ -15,6 +15,10 @@ td, th {
vertical-align: middle;
}
+img {
+ border: 0;
+}
+
#header {
font-size: small;
padding: 5px;
14 years, 12 months
web/job_detail.html web/jobs.html web/media
by Adam Stokes
web/job_detail.html | 12 ++++++++++++
web/jobs.html | 16 ++++++++++++----
web/media/css/cas-web.css | 6 ++++++
3 files changed, 30 insertions(+), 4 deletions(-)
New commits:
commit c85e31c692c793401b3e226fdec417cd814d4275
Author: uzr <uzr(a)shinzo.(none)>
Date: Wed Apr 29 16:17:47 2009 -0400
- working on getting arguements passed to mason
component
diff --git a/web/job_detail.html b/web/job_detail.html
new file mode 100644
index 0000000..a93d0ab
--- /dev/null
+++ b/web/job_detail.html
@@ -0,0 +1,12 @@
+<& header.html &>
+<div id="content">
+<% $id %>
+<& footer.html &>
+<%args>
+my $id;
+</%args>
+
+<%init>
+use Data::Dumper;
+my $page_id = $id;
+</%init>
diff --git a/web/jobs.html b/web/jobs.html
index 7309e96..5064e46 100644
--- a/web/jobs.html
+++ b/web/jobs.html
@@ -1,18 +1,26 @@
<& header.html &>
<div id="content">
<h3>Jobs</h3>
-<ul>
+<table>
+<tr>
+<th> </th>
+<th>id</th><th>identifier</th><th>timestamp</th><th>email</th>
+</tr>
% foreach my $item (@{$data}) {
% my ($id, $identify, $timestamp, $email) = @{$item};
-<li><% $identify %> :: <% $timestamp %></li>
+<tr>
+<td><a href="/job_detail.html?id=<% $id %>">Detail</a></td>
+<td><% $id %></td>
+<td><% $identify %></td>
+<td><% $timestamp %></td>
+<td><% $email %></td>
% }
-</ul>
+</table>
</div>
<& footer.html &>
<%init>
use DBI;
-use Data::Dumper;
my $dbh = DBI->connect("dbi:SQLite:dbname=/var/db/cas/cas.db","","");
# query all jobs
diff --git a/web/media/css/cas-web.css b/web/media/css/cas-web.css
index 7522692..7dbab6d 100644
--- a/web/media/css/cas-web.css
+++ b/web/media/css/cas-web.css
@@ -9,6 +9,12 @@ h1 {
margin: 0;
}
+td, th {
+ padding: 5px;
+ text-align: left;
+ vertical-align: middle;
+}
+
#header {
font-size: small;
padding: 5px;
14 years, 12 months
2 commits - cas.spec web/footer.html web/header.html web/index.html web/jobs.html web/media
by Adam Stokes
cas.spec | 2 +-
web/footer.html | 5 +++++
web/header.html | 18 ++++++++++++++++++
web/index.html | 6 ++++++
web/jobs.html | 22 ++++++++++++++++++++++
web/media/css/cas-web.css | 33 +++++++++++++++++++++++++++++++++
web/media/img/cas_logo.png |binary
7 files changed, 85 insertions(+), 1 deletion(-)
New commits:
commit 1478518f945f6dd926390f4eff393cfe89d88c7e
Author: adam stokes <ajs(a)redhat.com>
Date: Wed Apr 29 14:42:03 2009 -0400
- working on simple web interface
diff --git a/cas.spec b/cas.spec
index a373ca9..55aecd6 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: 6%{?dist}
+Release: 7%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
diff --git a/web/footer.html b/web/footer.html
index 4b866ea..da211cc 100644
--- a/web/footer.html
+++ b/web/footer.html
@@ -1,3 +1,5 @@
-<p>
-footer
-</p>
+<div id="footer">
+cas_web_ui © 2007-2009 Adam Stokes
+</div>
+</body>
+</html>
diff --git a/web/header.html b/web/header.html
index aeaa2e6..6c65c4f 100644
--- a/web/header.html
+++ b/web/header.html
@@ -1,3 +1,18 @@
-<p>
-(( cas ))
-</p>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <link rel="stylesheet" href="/media/css/cas-web.css" type="text/css" media="screen" />
+
+ <title><% $title %></title>
+</head>
+<body>
+<div id="header">
+ <p><img src="/media/img/cas_logo.png"></p>
+ :// <a href="/">go home</a>, <a href="/jobs.html">jobs</a>
+</div>
+
+<%init>
+my $title="cas-web-ui";
+</%init>
+
diff --git a/web/index.html b/web/index.html
index f38d280..0922ad1 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1,15 +1,6 @@
-<html>
-<head>
-<title><% $page_title %></title>
-<body>
-<& header &>
-<% $body %>
-<& footer &>
-</body>
-</html>
+<& header.html &>
+<div id="content">
+<h3>Core submission<h3>
-<% # Begin Mason code %>
-<% init %>
-my $page_title = 'home';
-my $body = 'sup there holmez';
-</%init %>
+</div>
+<& footer.html &>
diff --git a/web/jobs.html b/web/jobs.html
new file mode 100644
index 0000000..7309e96
--- /dev/null
+++ b/web/jobs.html
@@ -0,0 +1,22 @@
+<& header.html &>
+<div id="content">
+<h3>Jobs</h3>
+<ul>
+% foreach my $item (@{$data}) {
+% my ($id, $identify, $timestamp, $email) = @{$item};
+<li><% $identify %> :: <% $timestamp %></li>
+% }
+</ul>
+</div>
+<& footer.html &>
+
+<%init>
+use DBI;
+use Data::Dumper;
+my $dbh = DBI->connect("dbi:SQLite:dbname=/var/db/cas/cas.db","","");
+
+# query all jobs
+my $sth = $dbh->prepare("SELECT * FROM jobs");
+$sth->execute();
+my $data = $sth->fetchall_arrayref;
+</%init>
diff --git a/web/media/css/cas-web.css b/web/media/css/cas-web.css
new file mode 100644
index 0000000..7522692
--- /dev/null
+++ b/web/media/css/cas-web.css
@@ -0,0 +1,33 @@
+body {
+ font-family: sans-serif;
+ margin: 0;
+ padding: 5px;
+}
+
+h1 {
+ padding: 0;
+ margin: 0;
+}
+
+#header {
+ font-size: small;
+ padding: 5px;
+ width: 600px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#content {
+ font-size: small;
+ width: 600px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#footer {
+ font-size: small;
+ padding: 5px;
+ width: 600px;
+ margin-left: auto;
+ margin-right: auto;
+}
diff --git a/web/media/img/cas_logo.png b/web/media/img/cas_logo.png
new file mode 100644
index 0000000..39e2302
Binary files /dev/null and b/web/media/img/cas_logo.png differ
commit 1fd19096d27e1f52151bac69e61bd1656e6227a5
Author: adam stokes <ajs(a)redhat.com>
Date: Wed Apr 29 13:29:54 2009 -0400
adding web dir for a basic web ui
diff --git a/web/footer.html b/web/footer.html
new file mode 100644
index 0000000..4b866ea
--- /dev/null
+++ b/web/footer.html
@@ -0,0 +1,3 @@
+<p>
+footer
+</p>
diff --git a/web/header.html b/web/header.html
new file mode 100644
index 0000000..aeaa2e6
--- /dev/null
+++ b/web/header.html
@@ -0,0 +1,3 @@
+<p>
+(( cas ))
+</p>
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000..f38d280
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<title><% $page_title %></title>
+<body>
+<& header &>
+<% $body %>
+<& footer &>
+</body>
+</html>
+
+<% # Begin Mason code %>
+<% init %>
+my $page_title = 'home';
+my $body = 'sup there holmez';
+</%init %>
14 years, 12 months
doc/index.rst
by Adam Stokes
doc/index.rst | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 9ca78dc77858117dd92e41d9875ee76f600e2138
Author: adam stokes <ajs(a)redhat.com>
Date: Wed Apr 29 11:51:16 2009 -0400
small changes to documentation
diff --git a/doc/index.rst b/doc/index.rst
index 0f8079f..5bf0bb1 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -40,8 +40,6 @@ Since analyzing cores requires the same architecture specific systems the core
was generated on there will need to be systems available of those same types
in order for analyzation to work properly.
-Finally, root access to the CAS server.
-
Configuration
^^^^^^^^^^^^^
@@ -51,7 +49,7 @@ each section and describe its meaning::
[settings]
kernels=/mnt/kernels
- rpmFilter=.*kernel-debuginfo-[0-9].*\.rpm
+ rpmFilter=.*kerne.+-debuginfo-[0-9].*\.rpm
debugs=/cores/debugs
debugLevel=DEBUG
workDirectory=/cores/processed
@@ -119,7 +117,7 @@ following::
[settings]
kernels=/mnt/kernels
- rpmFilter=.*kernel-debuginfo-[0-9].*\.rpm
+ rpmFilter=.*kerne.+-debuginfo-[0-9].*\.rpm
debugs=/tmp
debugLevel=DEBUG
workDirectory=/cores
14 years, 12 months
2 commits - cas-admin lib/cas
by Adam Stokes
cas-admin | 28 +++++++++++++++-------------
lib/cas/db.py | 1 +
2 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit 2ba2ee78201e01451b5de0dde18d3fa6285fdd65
Author: adam stokes <ajs(a)redhat.com>
Date: Wed Apr 29 10:43:55 2009 -0400
add commit routine to addServer()
diff --git a/lib/cas/db.py b/lib/cas/db.py
index 6d1d01a..9b46158 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -125,6 +125,7 @@ class CasStorage(object):
if not self.cursor.fetchone():
self.cursor.execute('''INSERT into server (hostname, arch)
values ("%s","%s")''' % values)
+ self.commit()
return
def getServers(self):
commit 27cc1674d99ba13b95f9fb0cd42156b0ff10f3cd
Author: adam stokes <ajs(a)redhat.com>
Date: Wed Apr 29 10:43:38 2009 -0400
make sure func clients are reachable when building server db
diff --git a/cas-admin b/cas-admin
index 7ee4551..193427e 100755
--- a/cas-admin
+++ b/cas-admin
@@ -116,19 +116,21 @@ class CasServerHandler(object):
scheme, netloc, path, query, frag = urlparse.urlsplit(i)
hostname, port = netloc.split(":")
client = fc.Overlord(hostname)
- # Returns as {"hostname":['sts','stdout','stderr']}
- # what a pain
- client_dict = client.command.run("/bin/uname -m")
- # silly magic to get output from command module
- # since we are doing one host at a time we just pull the first
- # key from the dict and parse its return
- sts, arch, err = client_dict[client_dict.keys()[0]]
- if sts:
- self.casLog.debug(err)
- # clean up arch string
- arch = arch.strip()
- self.db.addServer(hostname, arch)
- hostname_count = hostname_count + 1
+ isClientReachable = client.run("test","ping", [])
+ if isClientReachable == 1:
+ # Returns as {"hostname":['sts','stdout','stderr']}
+ # what a pain
+ client_dict = client.command.run("/bin/uname -m")
+ # silly magic to get output from command module
+ # since we are doing one host at a time we just pull the first
+ # key from the dict and parse its return
+ sts, arch, err = client_dict[client_dict.keys()[0]]
+ if sts:
+ self.casLog.debug(err)
+ # clean up arch string
+ arch = arch.strip()
+ self.db.addServer(hostname, arch)
+ hostname_count = hostname_count + 1
self.casLog.info("Server database built with %d server(s) added." % (hostname_count,))
except ImportError:
self.casLog.debug("Please install func (http://fedorahosted.org/func) for " \
14 years, 12 months
cas
by Adam Stokes
cas | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
New commits:
commit bc4b5b97b94693a99466ecf71af08bb058cf0d01
Author: uzr <uzr(a)shinzo.(none)>
Date: Tue Apr 28 20:24:57 2009 -0400
- test if defined func minion is reachable
diff --git a/cas b/cas
index 269fb9f..412667e 100755
--- a/cas
+++ b/cas
@@ -267,24 +267,26 @@ class CasApplication(object):
for hostname, arch in serverList:
if arch == debugKernelArch:
# TODO: Randomize server selection
- # TODO: Verify remote server is reachable
casProcessMachine = hostname
self.casLog.info("Machine %s found, processing " \
"crash output" % (casProcessMachine,))
cmd = "cd " + os.path.join(self.storagePath) + " && ./crash -i crash.in > crash.out"
client = fc.Overlord(casProcessMachine,async=True)
- job_id = client.command.run(cmd)
- while True:
- status = client.job_status(job_id)
- (code, results) = status
- if code == jobthing.JOB_ID_RUNNING:
- self.casLog.status("task is running...")
- elif code == jobthing.JOB_ID_PARTIAL:
- self.casLog.status("task is running...")
- elif code == jobthing.JOB_ID_FINISHED:
- self.casLog.status("task complete; results = %s" % (results,))
- break
- sleep(5)
+ # test if client is reachable
+ isClientReachable = client.run("test", "ping", [])
+ if isClientReachable == 1:
+ job_id = client.command.run(cmd)
+ while True:
+ status = client.job_status(job_id)
+ (code, results) = status
+ if code == jobthing.JOB_ID_RUNNING:
+ self.casLog.status("task is running...")
+ elif code == jobthing.JOB_ID_PARTIAL:
+ self.casLog.status("task is running...")
+ elif code == jobthing.JOB_ID_FINISHED:
+ self.casLog.status("task complete; results = %s" % (results,))
+ break
+ sleep(5)
else:
self.casLog.info("No servers available for arch and current system not "\
"suitable for processing, please run cas-admin -h " \
14 years, 12 months
crash_32 fail to execture scripts from stdin
by Adam Stokes
[root@test-2 04.28.09.08.02.54]# cas -i 12345 -f it289435-fj-vmcore -e ajs(a)redhat.com
[.cas.] :: Starting job at /cores/12345/04.28.09.08.06.11
[.cas.] :: Corefile prepared, processing /cores/12345/04.28.09.08.06.11/it289435-fj-vmcore
[.cas.][debug] :: core arch i686
[.cas.][debug] :: local machine arch x86_64
[.cas.] :: Extracting debug kernel with filter */usr/lib/debug/lib/modules/2.6.18-128.el5PAE/vmlinux
[.cas.] :: checking debug kernel usr/lib/debug/lib/modules/2.6.18-128.el5PAE/vmlinux
[.cas.] :: Current machine suitable for processing 32 bit core, running crash.
[.cas.][debug] :: crash problem: err: /usr/local/i386/crash: line 1: mod: command not found
/usr/local/i386/crash: line 2: log: command not found
/usr/local/i386/crash: line 3: kmem: command not found
/usr/local/i386/crash: line 4: kmem: command not found
/usr/local/i386/crash: line 5: bt: command not found
/usr/local/i386/crash: line 6: bt: command not found
/usr/local/i386/crash: line 7: sys: command not found
/usr/local/i386/crash: line 8: sys: command not found, out:
[.cas.] :: Crash output processed, sending email to ajs(a)redhat.com
[.cas.] :: Job on it289435-fj-vmcore complete and located in /cores/12345/04.28.09.08.06.11.
Scott, any idea what this could be?
Thanks
--
__ __
.-----.| |_.-----.| |--.-----.-----.
|__ --|| _| _ || <| -__|__ --|
|_____||____|_____||__|__|_____|_____|
.----------------------------------.
( ajs(a)redhat.com || 919.754.4187 )
`----------------------------------'
14 years, 12 months
cas
by Adam Stokes
cas | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 03377cae14dd61298d58acd838061d841ad14515
Author: adam stokes <ajs(a)redhat.com>
Date: Tue Apr 28 08:12:53 2009 -0400
- make sure hostname defined if processing 32bit on 64bit
machine
diff --git a/cas b/cas
index 814f924..269fb9f 100755
--- a/cas
+++ b/cas
@@ -222,6 +222,9 @@ class CasApplication(object):
debugKernelArch = self.util.getElfArch(debugKernel)
# Check if we have installed crash 32bit on system
if debugKernelArch == "i686" and CRASH_32 is not None:
+ import platform
+ # Define current machine hostname, mainly used for email results.
+ casProcessMachine = platform.uname()[1]
# 32bit crash on same system.
self.util.buildCrashFile(self.storagePath, corefile, debugKernel,
crash_bin=CRASH_32)
14 years, 12 months
cas
by Adam Stokes
cas | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 4bca8ad0877022386c0a91b9661f6bd497e43e24
Author: adam stokes <ajs(a)redhat.com>
Date: Tue Apr 28 07:53:49 2009 -0400
- fixed crash script generation when CRASH_32 is detected. (Flavio Leitner)
diff --git a/cas b/cas
index 20d353b..814f924 100755
--- a/cas
+++ b/cas
@@ -224,10 +224,10 @@ class CasApplication(object):
if debugKernelArch == "i686" and CRASH_32 is not None:
# 32bit crash on same system.
self.util.buildCrashFile(self.storagePath, corefile, debugKernel,
- CRASH_32)
+ crash_bin=CRASH_32)
self.casLog.info("Current machine suitable for processing 32 bit core, "\
"running crash.")
- cmd = "%s -i crash.in > crash.out" % (CRASH_32,)
+ 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
14 years, 12 months
[PATCH] cas: fixed crash script generation when CRASH_32 is detected.
by Flavio Leitner
This patch fixes cas to generate 'crash' script using CRASH_32
binary and use it later when processing the vmcore.
Signed-off-by: Flavio Leitner <fleitner(a)redhat.com>
---
cas | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cas b/cas
index dd7faeb..144f191 100755
--- a/cas
+++ b/cas
@@ -224,10 +224,10 @@ class CasApplication(object):
if debugKernelArch == "i686" and CRASH_32 is not None:
# 32bit crash on same system.
self.util.buildCrashFile(self.storagePath, corefile, debugKernel,
- CRASH_32)
+ crash_bin=CRASH_32)
self.casLog.info("Current machine suitable for processing 32 bit core, "\
"running crash.")
- cmd = "%s -i crash.in > crash.out" % (CRASH_32,)
+ 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
--
1.6.2.3
14 years, 12 months