Skip to content

Commit

Permalink
Issue #57: Code review changes
Browse files Browse the repository at this point in the history
Code review changes
  • Loading branch information
alexdgilbert committed Apr 24, 2024
1 parent 5d73c88 commit 45cb57f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/connector/system/Linux/Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ connector:
- linux
criteria:
- type: osCommand
commandLine: (/usr/bin/uname -o) || (/bin/uname -o )
commandLine: /usr/bin/uname -o || /bin/uname -o
expectedResult: GNU/Linux
errorMessage: Not a valid Linux host.
tags: [ system ]
Expand Down Expand Up @@ -67,7 +67,8 @@ monitors:
computes:
- type: awk
script: |
/procs_/ {s = s ";" $2} END {print s}
/procs_/ {s = s ";" $2}
END {print s}
mapping:
source: ${source::procrb}
attributes:
Expand All @@ -82,11 +83,12 @@ monitors:
memorySys:
# memSystem
type: osCommand
commandLine: (/usr/bin/lsmem -b) || (free -b | awk '/Mem/ {print "Total online memory " $2}')
commandLine: /usr/bin/lsmem -b || /usr/bin/free -b
computes:
- type: awk
script: |
/Total online memory/ { print $4 }
/^Mem:/ { print $2 }
/^Total online memory:/ { print $4 }
memoryInfo:
# memTotal;memFree;memUsed;memBuffers;memCached;memFreeUtilization;memUsedUtilization;memBuffersUtilization;memCachedUtilization
type: osCommand
Expand Down

0 comments on commit 45cb57f

Please sign in to comment.