Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marcus Klang
Host Monitor
Commits
4fdab485
Commit
4fdab485
authored
Jul 05, 2021
by
Peter Möller
Browse files
Added flag for uptime
parent
a40a2798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Synology/host-monitor.sh
View file @
4fdab485
...
...
@@ -58,6 +58,7 @@ CPUBugs=""
# Ex: CPUBugs='cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit'
Kernel
=
"
$(
uname
-r
2>/dev/null
)
"
# Ex: Kernel=3.10.105
Architecture
=
"
$(
uname
-m
2>/dev/null
)
"
# Ex: Architecture=x86_64
Uptime
=
"
$(
awk
'{print int($1/86400)}'
/proc/uptime
)
"
# Are we in a Virtual environment? No, not on a Synology!
VMenv
=
""
...
...
@@ -102,7 +103,7 @@ ListeningPorts="$(netstat -tulpn 2>/dev/null | egrep "LISTEN" | egrep -v "\-\s*$
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# sysinfo
# Assemble the Flags string
Flags
=
"
\"
selinux:
$SELinux
\"
,
\"
kernel:
${
Kernel
}
\"
,
\"
arch:
${
Architecture
:-
--
}
\"
,
\"
fail2ban:
$Fail2Ban
\"
"
Flags
=
"
\"
selinux:
$SELinux
\"
,
\"
kernel:
${
Kernel
}
\"
,
\"
arch:
${
Architecture
:-
--
}
\"
,
\"
fail2ban:
$Fail2Ban
\"
,
\"
Uptime-days:
$Uptime
\"
"
# partitions
OUTPUT
=
""
...
...
Write
Preview
Supports
Markdown
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