mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Show host uptime information
This commit is contained in:
parent
f0fc877f4e
commit
02e01ba04f
3 changed files with 14 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
# Please contact info@sixtyfps.io for more information.
|
||||
# LICENSE END
|
||||
|
||||
uptime=`uptime | awk 'BEGIN{FS="up |,"}{print $2}'`
|
||||
cpu_count=`sysctl -n hw.ncpu`
|
||||
cpu_vendor=`sysctl -n machdep.cpu.vendor`
|
||||
cpu_model=`sysctl -n machdep.cpu.brand_string`
|
||||
|
@ -17,6 +18,7 @@ partitions=`df -lk | tail -n+2 | sed 's/\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^
|
|||
|
||||
sixtyfps-viewer `dirname $0`/sysinfo.60 --load-data - <<EOT
|
||||
{
|
||||
"uptime": "$uptime",
|
||||
"cpu_count": "$cpu_count",
|
||||
"cpu_vendor": "$cpu_vendor",
|
||||
"cpu_model": "$cpu_model",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue