include uptime

master
nate smith 2019-09-06 15:30:50 -05:00
parent a776984f1b
commit 0c7d8cfc27
1 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,8 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log" "log"
"os/exec"
"strings"
"time" "time"
) )
@ -84,8 +86,11 @@ func activeUserCount() int {
} }
func uptime() string { func uptime() string {
// TODO out, err := exec.Command("uptime").Output()
return "TODO" if err != nil {
log.Fatalf("could not run uptime %s", err)
}
return strings.TrimSpace(string(out))
} }
func tdp() TildeData { func tdp() TildeData {