This commit is contained in:
bwcx_jzy 2023-03-15 16:27:08 +08:00
parent a5b55e7fd1
commit a99eaf3843
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
3 changed files with 7 additions and 1 deletions

View File

@ -65,8 +65,12 @@ function getPid() {
fi
echo "$JAVA_PID"
}
if [ ! -f "/usr/bin/lsb_release" ]; then
echo "os name:$(cat /etc/redhat-release)"
else
echo "os name:$(/usr/bin/lsb_release -a | grep Description | awk -F : '{print $2}' | sed 's/^[ \t]*//g')"
fi
echo "os name:$(/usr/bin/lsb_release -a | grep Description | awk -F : '{print $2}' | sed 's/^[ \t]*//g')"
echo "os version:$(uname -r)"
echo "hostname:$(hostname)"
# 启动时间

View File

@ -41,6 +41,7 @@
<p>系统名{{ record.machineSsh && record.machineSsh.osName }}</p>
<p>系统版本{{ record.machineSsh && record.machineSsh.osVersion }}</p>
<p>CPU型号{{ record.machineSsh && record.machineSsh.osCpuIdentifierName }}</p>
<p>主机名{{ record.machineSsh && record.machineSsh.hostName }}</p>
<p>开机时间{{ formatDuration(record.machineSsh && record.machineSsh.osSystemUptime) }}</p>
</template>
{{ text || "未知" }}

View File

@ -41,6 +41,7 @@
<p>系统名{{ record.osName }}</p>
<p>系统版本{{ record.osVersion }}</p>
<p>CPU型号{{ record.osCpuIdentifierName }}</p>
<p>主机名{{ record.hostName }}</p>
<p>开机时间{{ formatDuration(record.osSystemUptime) }}</p>
</template>
{{ text || "未知" }}