Skip to content

Commit 8f8b6aa

Browse files
committed
Update DB2 command validation logic and adjust kernel panic validator type
1 parent 1ee7bd5 commit 8f8b6aa

File tree

1 file changed

+3
-3
lines changed
  • src/roles/configuration_checks/tasks/files

1 file changed

+3
-3
lines changed

src/roles/configuration_checks/tasks/files/db2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ checks:
174174
database_type: [*db2]
175175
collector_type: *command
176176
collector_args:
177-
command: "[ $(/sbin/sysctl vm.max_map_count -n) -eq $(($(free -b | grep Mem: | awk '{print $2}') / 4096)) ] && echo OK || echo $(/sbin/sysctl vm.max_map_count -n)"
177+
command: "max_map_count=$(/sbin/sysctl vm.max_map_count -n); mem_bytes=$(free -b | grep Mem: | awk '{print $2}'); required=$((mem_bytes / 4096)); [ $max_map_count -eq $required ] && echo OK || echo \"vm.max_map_count=$max_map_count (required: $required [MemTotal/4096])\""
178178
user: *root
179179
validator_type: *string
180180
validator_args:
@@ -386,9 +386,9 @@ checks:
386386
collector_args:
387387
command: "/sbin/sysctl kernel.panic_on_oops -n"
388388
user: *root
389-
validator_type: *string
389+
validator_type: *list
390390
validator_args:
391-
expected_output: "5"
391+
valid_list: ["0", "1", "2"]
392392
report: *check
393393
references:
394394
other: "https://www.ibm.com/docs/en/db2/11.1?topic=unix-kernel-parameter-requirements-linux"

0 commit comments

Comments
 (0)