Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
5974c5fa
Commit
5974c5fa
authored
Sep 28, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e789dee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
go/neo/t/neotest
go/neo/t/neotest
+35
-2
No files found.
go/neo/t/neotest
View file @
5974c5fa
...
...
@@ -384,11 +384,44 @@ pyver() {
printf
"# %-16s: %s
\n
"
"
$showas
"
"
$ver
"
}
# show data/versions
# lspci1 <pcidev> <field> - show <field> from lspci information about <pcidev>
lspci1
()
{
lspci
-vmm
-s
$1
|grep
"^
$2
:
\\
s*"
|sed
-e
"s/^
$2
:
\\
s*//"
}
# show date/hardware/versions
header
()
{
echo
-n
"# "
;
date
--rfc-2822
echo
"#
`
whoami
`
@
`
hostname
--fqdn
`
(
$myaddr
)"
;
echo
-n
"# "
;
grep
"^model name"
/proc/cpuinfo |head
-1
|sed
-e
's/model name\s*: //'
echo
-n
"# cpu: "
;
grep
"^model name"
/proc/cpuinfo |head
-1
|sed
-e
's/model name\s*: //'
# disk under .
mntpt
=
`
stat
-c
'%m'
.
`
# mountpoint of current filesystem
mntdev
=
`
findmnt
-n
-o
source
$mntpt
`
# mountpoint -> device
blkdev
=
`
echo
$mntdev
|sed
-e
's/[0-9]*$//'
`
# /dev/sda3 -> /dev/sda
blkdev1
=
`
basename
$blkdev
`
# /dev/sda -> sda
echo
"#
$blkdev1
:
`
lsblk
-dn
-o
MODEL
$blkdev
`
rev
`
lsblk
-dn
-o
REV,SIZE
$blkdev
`
"
# all NICs
find /sys/class/net
-type
l
-not
-lname
'*virtual*'
|
\
while
read
nic
;
do
nicname
=
`
basename
$nic
`
# /sys/class/net/eth0 -> eth0
echo
-n
"#
$nicname
: "
nicdev
=
`
realpath
$nic
/device
`
# /sys/class/net/eth0 -> /sys/devices/pci0000:00/0000:00:1f.6
case
"
$nicdev
"
in
*
pci
*
)
pcidev
=
`
basename
$nicdev
`
# /sys/devices/pci0000:00/0000:00:1f.6 -> 0000:00:1f.6
#lspci -s $pcidev
echo
"
`
lspci1
$pcidev
Vendor
`
`
lspci1
$pcidev
Device
`
rev
`
lspci1
$pcidev
Rev
`
"
;;
*
)
echo
"
$nicdev
(TODO)"
;;
esac
done
echo
-n
"# "
;
uname
-a
echo
-n
"# "
;
python
--version
echo
-n
"# "
;
go version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment