FFDC logs name chgs, OS FFDC: cpuinfo, netstat, meminfo, FFDC OS checks
Changes to journalctl.log and ffdc_report.txt to reflect the names of
the other logs (BMC_xxxx).
BMC_meminfo and BMC_procinfo to be there own files instead of in
ffdc_report.txt/BMC_general.
Added OS_meminfo, OS_procinfo, netstat
Added check on OS FFDC for ping and able to ssh, if either of
these fail we bail.
Change-Id: I74dbccf1f23f11d39c731b41a39e406606c6c7ce
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/lib/openbmc_ffdc.robot b/lib/openbmc_ffdc.robot
index f4d330c..b8dc73b 100755
--- a/lib/openbmc_ffdc.robot
+++ b/lib/openbmc_ffdc.robot
@@ -7,13 +7,14 @@
... logs
... ├── 20160909102538035251_TestWarmreset
... │ └── 20160909102538035251_TestWarmResetviaREST
-... │ ├── 20160909102538035251_BMC_journalctl.log
+... │ ├── 20160909102538035251_BMC_journalctl
... │ ├── 20160909102538035251_BMC_proc_list
... │ ├── 20160909102538035251_BMC_dmesg
... │ ├── 20160909102538035251_BMC_inventory
... │ ├── 20160909102538035251_BMC_led
... │ ├── 20160909102538035251_BMC_record_log
... │ ├── 20160909102538035251_BMC_sensor_list
+... │ ├── 20160909102538035251_BMC_general.txt
... │ ├── 20160909102538035251_OS_dmesg
... │ ├── 20160909102538035251_OS_msglog
... │ ├── 20160909102538035251_OS_cpufrequency
@@ -24,8 +25,7 @@
... │ ├── 20160909102538035251_OS_syslog
... │ ├── 20160909102538035251_OS_info
... │ ├── 20160909102538035251_OS_rsct
-... │ ├── 20160909102538035251_OS_secure
-... │ └── 20160909102538035251_ffdc_report.txt
+... │ └── 20160909102538035251_OS_secure
... └── test_history.txt
Resource openbmc_ffdc_methods.robot
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index 0e36d70..e68181e 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -28,8 +28,6 @@
{
'BMC OS': 'uname -a',
'BMC Uptime': 'uptime',
- 'BMC Proc Info': 'cat /proc/cpuinfo',
- 'BMC Mem Info': 'cat /proc/meminfo',
'BMC File System Disk Space Usage': 'df -hT',
},
'APPLICATION DATA':
@@ -44,8 +42,10 @@
{
# File Name Command
'BMC_proc_list': 'top -n 1 -b',
- 'BMC_journalctl.log': 'journalctl --no-pager',
+ 'BMC_journalctl': 'journalctl --no-pager',
'BMC_dmesg': 'dmesg',
+ 'BMC_procinfo': 'cat /proc/cpuinfo',
+ 'BMC_meminfo': 'cat /proc/meminfo',
},
}
@@ -58,6 +58,9 @@
'OS_cpufrequency': 'ppc64_cpu --frequency',
'OS_dmesg': 'dmesg',
'OS_boot': 'cat /var/log/boot.log',
+ 'OS_procinfo': 'cat /proc/cpuinfo',
+ 'OS_meminfo': 'cat /proc/meminfo',
+ 'OS_netstat': 'netstat -a',
},
}
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index ac866e6..9f78ae2 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -4,7 +4,7 @@
Resource openbmc_ffdc_utils.robot
Resource rest_client.robot
-
+Resource utils.robot
*** Keywords ***
@@ -190,12 +190,27 @@
OS FFDC Files
[Documentation] Get the command list and iterate
+ [Arguments] ${OS_HOST}=${OS_HOST} ${OS_USERNAME}=${OS_USERNAME}
+ ... ${OS_PASSWORD}=${OS_PASSWORD}
Return From Keyword If '${OS_HOST}' == '${EMPTY}'
... No OS Host Provided
+
+ # If can't ping, return
+ ${rc}= Run Keyword and Return Status Ping Host ${OS_HOST}
+ Return From Keyword If '${rc}' == '${False}'
+ ... Could not ping OS
+
Open Connection And Log In host=${OS_HOST} username=${OS_USERNAME}
... password=${OS_PASSWORD}
+ ${output} ${stderr} ${rc}= Execute Command uptime return_stderr=True
+ ... return_rc=True
+
+ # If the return code returned by "Execute Command" is non-zero, return
+ Return From Keyword If '${rc}' != '${0}'
+ ... Could not connect to OS
+
@{entries}= Get ffdc os all distros index
:FOR ${index} IN @{entries}
\ Log OS ALL DISTROS FFDC ${index}
diff --git a/lib/openbmc_ffdc_utils.robot b/lib/openbmc_ffdc_utils.robot
index b4890ab..078d97b 100644
--- a/lib/openbmc_ffdc_utils.robot
+++ b/lib/openbmc_ffdc_utils.robot
@@ -43,7 +43,7 @@
Create FFDC Report File
[Documentation] Create a generic file name for ffdc
Set Suite Variable
- ... ${FFDC_FILE_PATH} ${FFDC_DIR_PATH}${/}${FFDC_TIME}_ffdc_report.txt
+ ... ${FFDC_FILE_PATH} ${FFDC_DIR_PATH}${/}${FFDC_TIME}_BMC_general.txt
Create File ${FFDC_FILE_PATH}