summaryrefslogtreecommitdiff
path: root/linuxstatus/linuxloop.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
committerJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
commit4529b473dc12d8a4d1b49c9ee1ba89897f86d616 (patch)
tree20cdc5bd7c644e3fb8d7afa8e7b872b1f2082684 /linuxstatus/linuxloop.go
parenta808bb55189a44d0c3b2965805c14644f8102cca (diff)
add LinuxStatus()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/linuxloop.go')
-rw-r--r--linuxstatus/linuxloop.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/linuxstatus/linuxloop.go b/linuxstatus/linuxloop.go
new file mode 100644
index 0000000..44946c6
--- /dev/null
+++ b/linuxstatus/linuxloop.go
@@ -0,0 +1,44 @@
+// GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
+// Copyright (c) 2023 WIT.COM, Inc.
+// This is a control panel for DNS
+
+package linuxstatus
+
+import (
+ "strconv"
+
+ "go.wit.com/log"
+)
+
+func linuxLoop() {
+ me.changed = false
+ duration := timeFunction(getHostname)
+ log.Info("getHostname() execution Time: ", duration, "me.changed =", me.changed)
+
+ duration = timeFunction(scanInterfaces)
+ log.Log(NET, "scanInterfaces() execution Time: ", duration)
+ for i, t := range me.ifmap {
+ log.Log(NET, strconv.Itoa(i) + " iface = " + t.iface.Name)
+ }
+
+ var aaaa []string
+ aaaa = dhcpAAAA()
+ var all string
+ for _, s := range aaaa {
+ log.Log(NET, "my actual AAAA = ",s)
+ all += s + "\n"
+ }
+ // me.IPv6.SetText(all)
+
+ /*
+ processName := getProcessNameByPort(53)
+ fmt.Println("Process with port 53:", processName)
+
+ commPath := filepath.Join("/proc", proc.Name(), "comm")
+ comm, err := ioutil.ReadFile(commPath)
+ if err != nil {
+ return "", err // Error reading the process name
+ }
+ return strings.TrimSpace(string(comm)), nil
+ */
+}