From 99e953cae394627d545f0ae00f20f934a70e5e6a Mon Sep 17 00:00:00 2001 From: Cong-Cong Date: Fri, 31 May 2024 11:01:21 +0800 Subject: [PATCH] feat: print more machine info --- bin/cli.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index e5b16cd1..1d715096 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -111,8 +111,23 @@ if (!command || command === "build") { if (!command || command === "bench") { if (isGitHubActions) { - await $`lscpu -e=CPU,MHZ`; - await $`echo "CPU Usage: "$[100-$(vmstat 1 2|tail -1|awk '{print $15}')]"%"`; + await $`echo "===== System Information ====="`; + await $`uname -a`; + await $`cat /etc/os-release`; + await $`uname -r`; + await $`uptime`; + + await $`echo "===== Resource Usage ====="`; + await $`top -b -n1 | head -n10`; + await $`vmstat`; + await $`df -h`; + await $`free -h`; + + await $`echo "===== Hardware Information ====="`; + await $`lscpu`; + await $`lsblk`; + await $`lspci`; + await $`lsusb`; } const shardPair = shard.split("/").map(t => parseInt(t, 10));