mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09:35 +08:00
Fix get Memory & Swap
This commit is contained in:
parent
d811702ab9
commit
3b9f0e2bcc
4
bench.sh
4
bench.sh
@ -9,8 +9,8 @@
|
||||
cname=$( awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' )
|
||||
cores=$( awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo )
|
||||
freq=$( awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' )
|
||||
tram=$( free -m | awk 'NR==2 {print $2}' )
|
||||
swap=$( free -m | awk 'NR==4 {print $2}' )
|
||||
tram=$( free -m | awk '/Mem/ {print $2}' )
|
||||
swap=$( free -m | awk '/Swap/ {print $2}' )
|
||||
up=$( awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60;d=$1%60} {printf("%ddays, %d:%d:%d\n",a,b,c,d)}' /proc/uptime )
|
||||
opsy=$( cat /etc/issue.net | awk 'NR==1 {print}' )
|
||||
arch=$( uname -m )
|
||||
|
Loading…
x
Reference in New Issue
Block a user