diff options
author | mboelen <michael@cisofy.com> | 2015-12-21 23:17:15 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-12-21 23:17:15 +0300 |
commit | d16b38eff83a8dca405e21e1c34205289f3d0832 (patch) | |
tree | d9db1eac3d4ead003f0e1b4fbfbabf0ddeb66c1e /include/tests_memory_processes | |
parent | 83a44827e03543146e39c37c33f14ebca6f40a29 (diff) |
Rename of logtext and report functions, upcoming year change
Diffstat (limited to 'include/tests_memory_processes')
-rw-r--r-- | include/tests_memory_processes | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/include/tests_memory_processes b/include/tests_memory_processes index ef48c4ef..b4bda314 100644 --- a/include/tests_memory_processes +++ b/include/tests_memory_processes @@ -5,7 +5,7 @@ # Lynis # ------------------ # -# Copyright 2007-2015, Michael Boelen, CISOfy (michael.boelen@cisofy.com) +# Copyright 2007-2016, Michael Boelen, CISOfy (michael.boelen@cisofy.com) # Web site: https://cisofy.com # # Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are @@ -27,16 +27,16 @@ Register --test-no PROC-3602 --os Linux --weight L --network NO --description "Checking /proc/meminfo for memory details" if [ ${SKIPTEST} -eq 0 ]; then if [ -f /proc/meminfo ]; then - logtext "Result: found /proc/meminfo" + LogText "Result: found /proc/meminfo" Display --indent 2 --text "- Checking /proc/meminfo" --result FOUND --color GREEN FIND=`awk '/^MemTotal/ { print $2, $3 }' /proc/meminfo` MEMORY_SIZE=`echo ${FIND} | awk '{ print $1 }'` MEMORY_UNITS=`echo ${FIND} | awk '{ print $2 }'` - logtext "Result: Found ${MEMORY_SIZE} ${MEMORY_UNITS} memory" - report "memory_size=${MEMORY_SIZE}" - report "memory_units=${MEMORY_UNITS}" + LogText "Result: Found ${MEMORY_SIZE} ${MEMORY_UNITS} memory" + Report "memory_size=${MEMORY_SIZE}" + Report "memory_units=${MEMORY_UNITS}" else - logtext "Result: /proc/meminfo file not found on this system" + LogText "Result: /proc/meminfo file not found on this system" fi fi # @@ -46,17 +46,17 @@ # Description : Query /proc/meminfo Register --test-no PROC-3604 --os Solaris --weight L --network NO --description "Query prtconf for memory details" if [ ${SKIPTEST} -eq 0 ]; then - logtext "Test: Searching /usr/sbin/prtconf" + LogText "Test: Searching /usr/sbin/prtconf" if [ -x /usr/sbin/prtconf ]; then Display --indent 2 --text "- Querying prtconf for installed memory" --result DONE --color GREEN MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory size:" | cut -d ' ' -f3` MEMORY_UNITS=`/usr/sbin/prtconf | grep "^Memory size:" | cut -d ' ' -f4` - logtext "Result: Found ${MEMORY_SIZE} ${MEMORY_UNITS} memory" - report "memory_size=${MEMORY_SIZE}" - report "memory_units=${MEMORY_UNITS}" + LogText "Result: Found ${MEMORY_SIZE} ${MEMORY_UNITS} memory" + Report "memory_size=${MEMORY_SIZE}" + Report "memory_units=${MEMORY_UNITS}" else Display --indent 2 --text "- Querying prtconf for installed memory" --result SKIPPED --color WHITE - logtext "Result: /usr/sbin/prtconf not found" + LogText "Result: /usr/sbin/prtconf not found" fi fi # @@ -74,11 +74,11 @@ FIND=`${PSBINARY} x -o pid,wchan,stat,comm | awk '{ if ($3 ~ /Z|X/) print $1 }' | xargs` fi if [ "${FIND}" = "" ]; then - logtext "Result: no zombie processes found" + LogText "Result: no zombie processes found" Display --indent 2 --text "- Searching for dead/zombie processes" --result OK --color GREEN else - logtext "Result: found one or more dead or zombie processes" - logtext "Output: PIDs ${FIND}" + LogText "Result: found one or more dead or zombie processes" + LogText "Output: PIDs ${FIND}" Display --indent 2 --text "- Searching for dead/zombie processes" --result WARNING --color RED ReportSuggestion ${TEST_NO} "Check the output of ps for dead or zombie processes" fi @@ -98,12 +98,12 @@ FIND=`${PSBINARY} x -o pid,wchan,stat,comm | awk '{ if ($3=="D") print $1 }' | xargs` fi if [ "${FIND}" = "" ]; then - logtext "Result: No processes were waiting for IO requests to be handled first" + LogText "Result: No processes were waiting for IO requests to be handled first" Display --indent 2 --text "- Searching for IO waiting processes" --result OK --color GREEN else - logtext "Result: found one or more processes which were waiting to get IO requests handled first" - logtext "More info: processes which show up with the status flag 'D' are often stuck, until a disk IO event finished. This can happen for example with network storage, where the connection or protocol settings are not logtext well configured." - logtext "Output: PIDs ${FIND}" + LogText "Result: found one or more processes which were waiting to get IO requests handled first" + LogText "More info: processes which show up with the status flag 'D' are often stuck, until a disk IO event finished. This can happen for example with network storage, where the connection or protocol settings are not logtext well configured." + LogText "Output: PIDs ${FIND}" Display --indent 2 --text "- Searching for IO waiting processes" --result WARNING --color RED ReportSuggestion ${TEST_NO} "Check process listing for processes waiting for IO requests" fi @@ -116,4 +116,4 @@ wait_for_keypress # #================================================================================ -# Lynis - Copyright 2007-2015, Michael Boelen, CISOfy - https://cisofy.com +# Lynis - Copyright 2007-2016, Michael Boelen, CISOfy - https://cisofy.com |