Server Automation Practitioners Forum

Gathering logs from Core for support cases

Trusted Contributor.

Gathering logs from Core for support cases

Hi All


I am hoping someone may be able to help.


We often have to provide HPSA logs from the Core for problem investigation. For example twist, spoke, waybot, vault etc. There are many different log types and iterations of logs for each HPSA component.


So we have to first identify which logs are required, then gather these logs together, usually into a tar.gz format for upload to HP support.


I wondered if there was some utility or script that someone may have written (python or shell) to facilitate log gathering?


Obviously we have dump_session to capture individual job details, and scenesnap for 3days worth of SA logs, but this can be huge. I would like to be able to specify a time period and specific components as requested by HP support.


Thanks in advance (hopefully!)


Honored Contributor.

Re: Gathering logs from Core for support cases

We just use a rather simple shell script that SCP's the logs from each core to the box we run the script from.


A shorter example of basically what the script does:


run with something like ./ /var/log/opsware/twist/twist.log



for host in <core1slice1> <core1slice2> <core1slice3> ( etc )


   echo $host

   mkdir ${host}_${LOG}

   scp $host:$LOG ./${host}_${LOG}



Just setup ssh w/ keys and you're good to go.