Skip to content

Commit

Permalink
Improve system package fallbacks.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Jan 29, 2021
1 parent 2200e5d commit 5cb6156
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
File renamed without changes.
8 changes: 8 additions & 0 deletions system/memory_noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// +build !linux,!windows,!darwin,!freebsd,!openbsd,!dragonfly,!netbsd

package system

// GetTotalSystemMemory ... Get the total system memory in the current system.
func GetTotalSystemMemory() uint64 {
return 0
}
2 changes: 1 addition & 1 deletion system/process_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GetProcessStats(pid int) (ProcessStats, error) {
if err != nil {
_, ok := err.(*exec.Error)
if ok {
log.Println("Octyne requires ps on a Linux system to return statistics!")
log.Println("Octyne requires ps on a non-Linux/Windows OS to return statistics!")
}
return ProcessStats{}, err
}
Expand Down

0 comments on commit 5cb6156

Please sign in to comment.