#8048: command to gather build report on a platform/hardware combination
---------------------------+------------------------------------------------
Reporter: mvngu | Owner: tbd
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.5.1
Component: misc | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by drkirkby):
I had a look at this and have a few comments.
* Overall, I was very impressed. It has nice output.
* I believe it should be released under "GPL 2, or at your option, any
later version".
* It would be useful to know if CPU throttling is enabled or not. This
can cause problems building ATLAS for example.
* I would see if `pwd`/local/bin/sage-banner exists, and if so grab the
sage version from there.
* I would show the full output of gcc -v, rather than just part of it.
* It would be useful to know if there is a server listening on port 8000
(default for Sage). I don't know how to do that though - I could find out
on Solaris no doubt.
* I would show the output of the following three commands:
{{{
drkir...@hawk:~$ command -v gcc
/usr/local/gcc-4.4.4-multilib/bin/gcc
drkir...@hawk:~$ command -v g++
/usr/local/gcc-4.4.4-multilib/bin/g++
drkir...@hawk:~$ command -v gfortran
/usr/local/gcc-4.4.4-multilib/bin/gfortran
}}}
('command -v' is portable - the use of 'which' is not). This will allow
us to see if the compilers are a mix of compilers from places like
{{{/usr/bin}}} and {{{/usr/local/bin}}}.
* I don't know if you are aware of the
[http://partmaps.org/era/unix/award.html Useless Use of Cat Award] - well
worth reading, as it is both educational and funny. Several of your
commands use {{{cat}}} when it is not necessary. Both {{{sed}}} and
{{{awk}}} can read from a file, so there is no need to {{{cat}}} the file
and pipe it to these programs - it just creates another process, which
slows things down. It's obviously not significant on small files, but it
is on larger ones. It does make the code longer too.
{{{
HW_RELEASE=$(cat /etc/lsb-release | sed -e "s/DISTRIB_/ /g" | tr -d '\r\n'
| sed -e "s/^ //g" 2> /dev/null)
}}}
could be changed to:
{{{
HW_RELEASE=$(sed "s/DISTRIB_/ /g" /etc/lsb-release | tr -d '\r\n' | sed
"s/^ //g" 2> /dev/null)
}}}
(There is no need for the -e option to {{{sed}}} if there is only one
command like here). One could even combine the {{{sed}}} into one, but
that gets more complex to write. Likewise
{{{
HW_CPU_NUM=$(cat /proc/cpuinfo | grep "physical id" | uniq | grep -c
"physical id")
}}}
Could be changed to:
{{{
HW_CPU_NUM=$(grep "physical id" /proc/cpuinfo | uniq | grep -c "physical
id")
}}}
by simply removing the unnecessary {{{cat}}}. Unless you are guaranteed
the output of the first grep command is in sorted order, you should pipe
to {{{sort}}} before {{{uniq}}}, as {{{uniq}}} only looks at adjacent
lines. See below, where the word ''hello'' is in the file twice, but uniq
does not indicate this:
{{{
drkir...@hawk:~$ cat test
hello
fred
hello
jim
drkir...@hawk:~$ uniq test
hello
fred
hello
jim
drkir...@hawk:~$ sort test | uniq
fred
hello
jim
}}}
* Given the number of different linux systems, I wonder if it might not
be better to simply print the contents of {{{/etc/lsb-release}}},
{{{/etc/release}}} or whatever else exists, rather than try to parse them
to get a distribution from them. It might be safer.
* The comment on line 148 ({{{# function to return memory info for
linux}}}) is wrong.
* Although it would take 1 second to run, I think the output of:
{{{
vmstat 1 2
}}}
could be useful, as it allows one to see more what is happening on a
system at the point of failure.
Overall, this looks very useful. I was quite impressed with it.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8048#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.