Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffho-packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Freifunk Hochstift
ffho-packages
Commits
c606ac89
Commit
c606ac89
authored
10 years ago
by
Michael Schwarz
Browse files
Options
Downloads
Patches
Plain Diff
Changed layout of debugreport
parent
c7adc6c1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ffpb/ffpb-debug/files/bin/ffpb-debug
+18
-5
18 additions, 5 deletions
ffpb/ffpb-debug/files/bin/ffpb-debug
with
18 additions
and
5 deletions
ffpb/ffpb-debug/files/bin/ffpb-debug
+
18
−
5
View file @
c606ac89
...
@@ -8,7 +8,7 @@ function cmd(_command)
...
@@ -8,7 +8,7 @@ function cmd(_command)
local
f
=
io.popen
(
_command
)
local
f
=
io.popen
(
_command
)
local
l
=
f
:
read
(
"*a"
)
local
l
=
f
:
read
(
"*a"
)
f
:
close
()
f
:
close
()
return
"
--- START COMMAND
"
..
_command
..
"
---
\n"
..
l
..
"
--- END COMMAND "
..
_command
..
" ---\n
\n"
return
"
#
"
..
_command
..
"
:
\n"
..
l
..
"
\n
"
end
end
-- read contents of a given file
-- read contents of a given file
...
@@ -17,7 +17,7 @@ function readFile(_file)
...
@@ -17,7 +17,7 @@ function readFile(_file)
if
f
~=
nil
then
if
f
~=
nil
then
local
l
=
f
:
read
(
"*a"
)
local
l
=
f
:
read
(
"*a"
)
f
:
close
()
f
:
close
()
return
"---
BEGIN OF FILE
"
..
_file
..
" ---\n"
..
l
..
"
--- END OF FILE "
..
_file
..
" ---
\n\n"
return
"---
Content of file
"
..
_file
..
" ---\n"
..
l
..
"
\n\n
"
else
else
return
""
return
""
end
end
...
@@ -50,18 +50,24 @@ if debugFile==nil then
...
@@ -50,18 +50,24 @@ if debugFile==nil then
print
(
'This may take some seconds, please stand by.'
)
print
(
'This may take some seconds, please stand by.'
)
-- first of all, collect some generic information about the system
-- first of all, collect some generic information about the system
debugdata
=
debugdata
..
"---- BEGIN SYSTEM INFORMATION ----\n"
debugdata
=
debugdata
..
cmd
(
"uname -n"
)
debugdata
=
debugdata
..
cmd
(
"uname -n"
)
debugdata
=
debugdata
..
cmd
(
"cat /lib/gluon/release"
)
debugdata
=
debugdata
..
cmd
(
"cat /lib/gluon/release"
)
debugdata
=
debugdata
..
cmd
(
"cat /tmp/sysinfo/model"
)
debugdata
=
debugdata
..
cmd
(
"cat /tmp/sysinfo/model"
)
debugdata
=
debugdata
..
cmd
(
"uptime"
)
debugdata
=
debugdata
..
cmd
(
"uptime"
)
debugdata
=
debugdata
..
cmd
(
"date"
)
debugdata
=
debugdata
..
cmd
(
"date"
)
debugdata
=
debugdata
..
"---- END SYSTEM INFORMATION ----\n\n"
-- now get some information about the network status
-- now get some information about the network status
debugdata
=
debugdata
..
cmd
(
"ip addr show"
)
debugdata
=
debugdata
..
"---- BEGIN IP AND ROUTUNG INFORMATION ----\n"
debugdata
=
debugdata
..
cmd
(
"ip addr show"
)
debugdata
=
debugdata
..
cmd
(
"ip route show"
)
debugdata
=
debugdata
..
cmd
(
"ip route show"
)
debugdata
=
debugdata
..
cmd
(
"ip -6 route show"
)
debugdata
=
debugdata
..
cmd
(
"ip -6 route show"
)
debugdata
=
debugdata
..
"---- BEGIN IP AND ROUTUNG INFORMATION ----\n\n"
-- get wireless status
-- get wireless status
debugdata
=
debugdata
..
"---- BEGIN WIRELESS INFORMATION ----\n"
debugdata
=
debugdata
..
cmd
(
"iw phy phy0 info"
)
debugdata
=
debugdata
..
cmd
(
"iw phy phy0 info"
)
debugdata
=
debugdata
..
cmd
(
"iw dev wlan0 info"
)
debugdata
=
debugdata
..
cmd
(
"iw dev wlan0 info"
)
debugdata
=
debugdata
..
cmd
(
"iw dev wlan0 station dump"
)
debugdata
=
debugdata
..
cmd
(
"iw dev wlan0 station dump"
)
...
@@ -71,8 +77,11 @@ if debugFile==nil then
...
@@ -71,8 +77,11 @@ if debugFile==nil then
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0-1 info"
)
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0-1 info"
)
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0 assoclist"
)
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0 assoclist"
)
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0-1 assoclist"
)
debugdata
=
debugdata
..
cmd
(
"iwinfo wlan0-1 assoclist"
)
debugdata
=
debugdata
..
"---- END WIRELESS INFORMATION ----\n\n"
-- try to get some more information about wlan hardware status
-- try to get some more information about wlan hardware status
debugdata
=
debugdata
..
"---- BEGIN HARDWARE STATUS ----\n"
_files
=
{
"reset"
,
"queues"
,
"interrupt"
}
_files
=
{
"reset"
,
"queues"
,
"interrupt"
}
for
file
in
list_iter
(
_files
)
do
for
file
in
list_iter
(
_files
)
do
debugdata
=
debugdata
..
readFile
(
ATH9K_DEBUGFS_DIR
..
"/"
..
file
)
debugdata
=
debugdata
..
readFile
(
ATH9K_DEBUGFS_DIR
..
"/"
..
file
)
...
@@ -86,14 +95,17 @@ if debugFile==nil then
...
@@ -86,14 +95,17 @@ if debugFile==nil then
for
file
in
list_iter
(
_files
)
do
for
file
in
list_iter
(
_files
)
do
debugdata
=
debugdata
..
readFile
(
ATH9K_DEBUGFS_DIR
..
"/"
..
file
)
debugdata
=
debugdata
..
readFile
(
ATH9K_DEBUGFS_DIR
..
"/"
..
file
)
end
end
debugdata
=
debugdata
..
"---- END HARDWARE STATUS ----\n\n"
-- get batman status
-- get batman status
debugdata
=
debugdata
..
"---- BEGIN BATMAN AND FASTD STATUS ----\n"
debugdata
=
debugdata
..
cmd
(
"batctl gwl"
)
debugdata
=
debugdata
..
cmd
(
"batctl gwl"
)
debugdata
=
debugdata
..
cmd
(
"batctl tl"
)
debugdata
=
debugdata
..
cmd
(
"batctl tl"
)
-- finally get fastd status
-- finally get fastd status
os.execute
(
"killall -USR1 fastd 2>/dev/null"
)
os.execute
(
"killall -USR1 fastd 2>/dev/null"
)
debugdata
=
debugdata
..
cmd
(
"logread"
)
debugdata
=
debugdata
..
cmd
(
"logread"
)
debugdata
=
debugdata
..
"---- END BATMAN AND FASTD STATUS ----\n\n"
-- write debugreport to file
-- write debugreport to file
debugFile
=
io.open
(
"/tmp/debugreport.txt"
,
"w"
)
debugFile
=
io.open
(
"/tmp/debugreport.txt"
,
"w"
)
...
@@ -108,6 +120,7 @@ siteConfig = require("gluon.site_config")
...
@@ -108,6 +120,7 @@ siteConfig = require("gluon.site_config")
if
localMode
then
if
localMode
then
print
(
'As requested, i will not send the report, here it is:'
)
print
(
'As requested, i will not send the report, here it is:'
)
print
(
debugdata
)
print
(
debugdata
)
os.execute
(
"rm /tmp/debugreport.txt"
)
os.exit
(
0
)
os.exit
(
0
)
else
else
print
(
'Sending report to Admin-Team ...'
)
print
(
'Sending report to Admin-Team ...'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment