Skip to content

Commit

Permalink
feat: print more machine info
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed May 31, 2024
1 parent 867c1de commit 99e953c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 99e953c

Please sign in to comment.