Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
osak
tools
Commits
1dafcdf8
Commit
1dafcdf8
authored
Oct 30, 2018
by
Lennart Klebl
Browse files
Small bash script for some fun with the lipnsa-data
parent
f8703e36
Changes
1
Hide whitespace changes
Inline
Side-by-side
lipnsa-auswertung-danach.sh
0 → 100755
View file @
1dafcdf8
#!/bin/bash
# TODO Copy files automatically from inserted USB key.
Efifile
=
$(
mktemp
)
Memfile
=
$(
mktemp
)
Drivefile
=
$(
mktemp
)
for
i
in
*
/
;
do
var
=
$(
ls
$i
|
head
-1
)
cat
$i
/
$var
/meminfo |
grep
MemTotal |
awk
'{print $2/1024/1024}'
>>
$Memfile
cat
$i
/
$var
/lsblk |
grep
disk |
awk
'{print $4}'
|
grep
-v
'^[0-9]\.[0-9]G'
|
grep
-v
"[0-9]*M"
>>
$Drivefile
cat
$i
/
$var
/efi
>>
$Efifile
done
echo
--------
EFI
---------
echo
$(
cat
$Efifile
|
grep yes
|
wc
-l
)
ja,
$(
cat
$Efifile
|
grep
no |
wc
-l
)
nein.
echo
--------
RAM
---------
cat
$Memfile
|
sort
-n
| gnuplot
-e
"set terminal dumb; plot '<cat' with lines"
echo
--------
HDD
---------
cat
$Drivefile
|
sort
-n
| gnuplot
-e
"set terminal dumb; plot '<cat' with lines"
rm
$Memfile
$Drivefile
$Efifile
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