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"
"fmt"
"log"
"os/exec"
"strings"
"time"
)
@ -84,8 +86,11 @@ func activeUserCount() int {
}
func uptime() string {
// TODO
return "TODO"
out, err := exec.Command("uptime").Output()
if err != nil {
log.Fatalf("could not run uptime %s", err)
}
return strings.TrimSpace(string(out))
}
func tdp() TildeData {