mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-21 05:58:13 +02:00
macOS : DYLD_LIBRARY_PATH pour llama-server + journal du moteur dans l'UI
- dyld IGNORE LD_LIBRARY_PATH : sur macOS les .dylib livrees a cote de llama-server n'etaient pas trouvees, le moteur mourait sans un mot - nouvelle route GET /api/service/log (journalctl sous Linux, fichier de log ailleurs) + panneau repliable ouvert en cliquant la pastille d'etat : on voit enfin POURQUOI un modele ne charge pas
This commit is contained in:
1 parent
075a05ebaa
commit
43da4b9197
10 files changed
+109
-6
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -70,3 +71,13 @@ func serviceIsActive() bool {
|
||||
out, _ := exec.Command("systemctl", "is-active", serviceName()).Output()
|
||||
return strings.TrimSpace(string(out)) == "active"
|
||||
}
|
||||
|
||||
// serviceLogTail renvoie les n dernières lignes du journal du service (pour
|
||||
// l'UI web). Linux : journalctl.
|
||||
func serviceLogTail(n int) string {
|
||||
out, err := exec.Command("journalctl", "-u", serviceName(), "-n", strconv.Itoa(n), "--no-pager").CombinedOutput()
|
||||
if err != nil && len(out) == 0 {
|
||||
return "journalctl indisponible : " + err.Error()
|
||||
}
|
||||
return string(out)
|
||||
}
|
||||
Reference in new issue
Block a user