Skip to contentSkip to conversation

ORT - Oops Reporting Tool

ANNOUNCE Michał Piotrowski 4 participants 7 messages Jun 24, 2005 – Jun 26, 2005 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi all,

Here is our (see copyright section ;)) simple script that help to create a bug report:
http://stud.wsi.edu.pl/~piotrowskim/files/ort/beta/ort-b1.tar.bz2
<http://stud.wsi.edu.pl/%7Epiotrowskim/files/ort/ort-a5.tar.bz2>

Why do we do this?
Because many people don't have time to prepare a good (with all importrant pieces of information) bug report.

How does it work?
It creates file with information about your system (software, hardware, used modules etc.), add file with oops into it and in the future sends it to the chosen mainterner or lkml.

How can you help?
If you know something about bash scripting you can review it, add some useful features and make some optimalisations. Or just send me an idea.

Regards,
Michał Piotrowski

#1 lore raw
Quoted 1 line · Michał Piotrowski

If you know something about bash scripting you can review it, add some useful features and make some optimalisations. Or just send me an idea.

why does it have to be run as root? the only things i see missing are the "Capabilities" output from lspci -vvv when running as a user.

otherwise: great script, could be even included in ../scripts ?

thanks,
Christian.

Signature · 3 lines
BOFH excuse #145:

Flat tire on station wagon with tapes.  ("Never underestimate the bandwidth of a station wagon full of tapes hurling down the highway" Andrew S. Tannenbaum)
#2 lore raw

On Fri, 24 Jun 2005 15:42:37 +0200 Christian wrote:

| Micha__ Piotrowski schrieb:
| > If you know something about bash scripting you can review it, add some 
| > useful features and make some optimalisations. Or just send me an idea.
| 
| why does it have to be run as root? the only things i see missing are 
| the "Capabilities" output from lspci -vvv when running as a user.

'lsusb -v' also needs root permissions, but yes, other than those 2 commands, root is not needed AFAIK.

| otherwise: great script, could be even included in ../scripts ?

---
~Randy

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 3 lines · Paolo Ciarrocchi

The commands that are requiring root capabilties are:
lspci -vvv lsusb -v

i still dislike the idea being forced to be root, does the attached patch looks ok?

thank you,
Christian.

Signature · 3 lines
BOFH excuse #211:

Lightning strikes.
ort.sh renamed from ort.sh.orig +8 -4
@@ -34,7 +34,6 @@ EM_CLI=mutt
 
 help() {
     echo "Usage: [root@mylinuxbox ~]$ ./ort.sh oops.txt"
-    echo "You need to be root [uid=0] to run the script"
     exit 1
 }
 
@@ -53,7 +52,12 @@ cmd_line() {
 check_uid() {
     if [ $UID != "0" ]
 	then
-	    help
+	    echo -n "You should be root [uid=0] to run the script, continue? [y,n]  "
+	    read c
+	    if [ "$c" != "y" ]; then
+		echo "Aborted."
+		exit 1
+	    fi
     fi
 }
 
@@ -274,7 +278,7 @@ point_7_4() {
 
 point_7_5() {
     echo -e "\n[7.5.] PCI information" >> $ORT_F
-    lspci -vvv >> $ORT_F
+    env PATH=/bin:/usr/bin:/sbin:/usr/sbin lspci -vvv >> $ORT_F
 }
 
 point_7_6() {
@@ -286,7 +290,7 @@ point_7_6() {
 
 point_7_7() {
     echo -e "\n[7.7.] USB information" >> $ORT_F
-    lsusb -v >> $ORT_F
+    env PATH=/bin:/usr/bin:/sbin:/usr/sbin lsusb -v >> $ORT_F
 }
 
 point_7_8() {
#5 lore raw

Hi,

Quoted 10 lines · Christian Kujau
Quoted 3 lines · Paolo Ciarrocchi

The commands that are requiring root capabilties are:
lspci -vvv lsusb -v

i still dislike the idea being forced to be root, does the attached patch looks ok?

Maybe something like that

sudo lspci -vvv
sudo lsusb -v

?

Regards,
Michał Piotrowski

#6 lore raw
In reply to Christian Kujau

2005/6/26, Christian Kujau <[email protected]>:

Quoted 8 lines
Quoted 4 lines · Paolo Ciarrocchi

The commands that are requiring root capabilties are:
lspci -vvv
lsusb -v

i still dislike the idea being forced to be root, does the attached patch looks ok?

Just for my understanding, why do you dislike to be forced to be root ? You are reporting a kernel problem, I don't see any problem in being root, but I donìt have a clear understing of pro and cons.

Quoted 13 lines
ort.sh 2005-06-25 23:54:32.000000000 +0200 renamed from ort.sh.orig 2005-06-25 23:42:22.000000000 +0200 +0 -1
@@ -34,7 +34,6 @@ EM_CLI=mutt
 
 help() {
    echo "Usage: [root@mylinuxbox ~]$ ./ort.sh oops.txt"
-    echo "You need to be root [uid=0] to run the script"
    exit 1
 }
 
@@ -53,7 +52,12 @@ cmd_line() {
 check_uid() {
    if [ $UID != "0" ]

ort.sh 2005-06-25 23:54:32.000000000 +0200 cmd_line() { · line 62

Quoted 10 lines
ort.sh 2005-06-25 23:54:32.000000000 +0200 renamed from ort.sh.orig 2005-06-25 23:42:22.000000000 +0200 +6 -1
       then
-           help
+           echo -n "You should be root [uid=0] to run the script, continue? [y,n]  "
+           read c
+           if [ "$c" != "y" ]; then
+               echo "Aborted."
+               exit 1
+           fi
    fi
 }

This is fine with me.

ort.sh 2005-06-25 23:54:32.000000000 +0200 point_7_4() { · line 281

Quoted 6 lines
ort.sh 2005-06-25 23:54:32.000000000 +0200 renamed from ort.sh.orig 2005-06-25 23:42:22.000000000 +0200 +1 -1
@@ -274,7 +278,7 @@ point_7_4() {
 
 point_7_5() {
    echo -e "\n[7.5.] PCI information" >> $ORT_F
-    lspci -vvv >> $ORT_F
+    env PATH=/bin:/usr/bin:/sbin:/usr/sbin lspci -vvv >> $ORT_F

What's the benefit of this change ?

Quoted 14 lines
ort.sh 2005-06-25 23:54:32.000000000 +0200 renamed from ort.sh.orig 2005-06-25 23:42:22.000000000 +0200 +1 -1
 }
 
 point_7_6() {
@@ -286,7 +290,7 @@ point_7_6() {
 
 point_7_7() {
    echo -e "\n[7.7.] USB information" >> $ORT_F
-    lsusb -v >> $ORT_F
+    env PATH=/bin:/usr/bin:/sbin:/usr/sbin lsusb -v >> $ORT_F
 }
 
 point_7_8() {
Signature · 1 line
Paolo
#7 lore raw
In reply to Michał Piotrowski

Hi all,

Here is our (see copyright section ;)) simple script that help to create a bug report:
http://stud.wsi.edu.pl/~piotrowskim/files/ort/beta/ort-b2.tar.bz2

Why do we do this?
Because many people don't have time to prepare a good (with all importrant pieces of information) bug report.

How does it work?
It creates file with information about your system (software, hardware, used modules etc.), add file with oops into it and in the future sends it to the chosen mainterner or lkml.

How can you help?
If you know something about bash scripting you can review it, add some useful features and make some optimalisations. Or just send me an idea.

Changelog:
- Paul TT {
- I wrote a yes_no function tho check answer to "[Y/n]" questions
- I added some extra checks when multiple answer asked, if the reply is blank, bash primt out a lot of unary expected errors
- added detection of PAGER env variable
}
- Paolo Ciarrocchi - kernel-ort-doc.patch

Regards,
Michał Piotrowski