lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ver_linux script
Hi Tim.

>>>>> Alan,Tim: Enclosed is a version that fixes both this alias
>>>>> problem and other prospective ones without destroying the
>>>>> users' environment or spawning a subshell. Can it be used?

>>>> [mega snippage]

>>> Um, I'm just curious, what happened to the patch that
>>> started this whole snowball? i.e. the proc/version vs.
>>> uname change.

>> I've no idea. I'm not even sure of the reasoning behind the
>> proposal to make that change...

> Perhaps I was a little bit unclear. My question was more
> like: "When you wrote up that patch, why did you choose not
> to include the /proc/version part?"

Probably because (a) I never thought about it, and (b) I had no
idea of the reason why it might be useful anyway...

> You included it in a patch that you previously wrote.

True.

> The reason behind that change was some discussion dating
> back a bit where someone thought it would be useful to
> see the compiler that was used to build the kernel with,
> because of all the problems with people having strange
> results with different compilers.

> /proc/version lists the compiler that was used. uname -a
> does not.

> Yes, ver_linux does print out your compiler, but that is
> not necessarily the one that was used to build the kernel.

> Is this a worthwhile goal?

Yes.

> Am I being clear?

You are - and, now that I understand your comments, I would say
that BOTH are required, so that the bug-fixer can see both the
compiler used to make the kernel AND the one that would be used
to remake it...

My tweaked version to deal with that is now enclosed, along with
the output it gives on one of my non-development systems that has
the `ls -F` alias in use...

Best wishes from Riley.

* Copyright (C) 2000, Memory Alpha Systems.
* All rights and wrongs reserved.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* http://www.memalpha.cx/Linux/Kernel/

#!/bin/sh
cat <<.EOF

NOTE: This script expects to be run with the same PATH that you use when
compiling the kernel or application you are having problems with.
If such is not the case, please disregard the following, set your
PATH to the one you use, and rerun this script.

==} The following software versions appear to be installed:

.EOF
echo "/proc/version :-"
cat /proc/version | sed 's/) /)£/g' | tr '£' '\n' | sed 's/^/ /'
echo "uname -a :-"
\uname -a | sed 's/\(#[0-9]*\) /\1£/' | tr '£' '\n' | sed 's/^/ /'
echo
\insmod -V 2>&1 | \awk 'NR==1 {print "Kernel modules ",$NF}'
echo "Gnu C " `\gcc --version 2> /dev/null || echo '<None>'`
\ld -v 2>&1 | awk -F\) '{print $1}' | \awk \
'/BFD/{print "Binutils ",$NF}'
\ls -l `ldd /bin/sh | \awk '/libc/{print $3}'` | \sed -e 's/\.so$//' \
| \awk -F'[.-]' '{print "Linux C Library " $(NF-2)"."$(NF-1)"."$NF}'
echo -n "Dynamic linker "
\ldd -v > /dev/null 2>&1 && \ldd -v || \ldd --version | \head -1
\ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | \awk -F. \
'{print "Linux C++ Library " $4"."$5"."$6}'
\ps --version 2>&1 | \awk 'NR==1{print "Procps ", $NF}'
\mount --version | \awk -F\- '{print "Mount ", $NF}'
\hostname -V 2>&1 | \awk 'NR==1{print "Net-tools ", $NF}'
# Kbd needs 'loadkeys -h',
\loadkeys -h 2>&1 | \awk \
'(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}'
# while console-tools needs 'loadkeys -V'.
\loadkeys -V 2>&1 | \awk \
'(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}'
\expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}'
echo
echo "Modules Loaded :-"
cat /proc/modules | \sed -e "s/ .*$//" | \sort -f | tr '\n' ' ' \
| sed 's/^/ /'
cat <<.EOF


==} If some fields are empty or look unusual, then it is possible that
==} you have very old versions thereof.

.EOF

NOTE: This script expects to be run with the same PATH that you use when
compiling the kernel or application you are having problems with.
If such is not the case, please disregard the following, set your
PATH to the one you use, and rerun this script.

==} The following software versions appear to be installed:

/proc/version :-
Linux version 2.2.12-20 (root@porky.devel.redhat.com)
(gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release))
#1 Mon Sep 27 10:07:24 EDT 1999
uname -a :-
Linux Consulate.UFP.CX 2.2.12-20 #1
Mon Sep 27 10:07:24 EDT 1999 i486 unknown

Kernel modules 2.1.121
Gnu C <None>
Binutils 2.9.1.0.24
Linux C Library 2.1.2
Dynamic linker ldd (GNU libc) 2.1.2
Procps 2.0.4
Mount 2.9u
Net-tools 1.53
Console-tools 1999.03.02
Sh-utils 2.0

Modules Loaded :-
3c503 8390 fat ide-floppy lockd nfs nfsd ppp slhc sunrpc vfat

==} If some fields are empty or look unusual, then it is possible that
==} you have very old versions thereof.

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.064 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site