Gathering logs from Core for support cases (195 Views)
Reply
Highlighted
C_M
Occasional Contributor
Posts: 7
Registered: ‎08-13-2013
Message 1 of 2 (195 Views)

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!)

Chris

Respected Contributor
Posts: 54
Registered: ‎08-03-2012
Message 2 of 2 (162 Views)

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 ./logcollect.sh /var/log/opsware/twist/twist.log

 

LOG=$1

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

do

   echo $host

   mkdir ${host}_${LOG}

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

done

 

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

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.