Alex Rivera | Logout

Read and parse perf.data

Asked 2012-08-12T11:34:57.370
15

I am recording a performance counters frm linux using the command perf record.

I want to use the result perf.data as an input to other programming apps. Do you know how shall I read and parse the data in perf.data? Is there a way to transform it to .text file or .csv?

Edit
Report

1 Answer

-4

An example command definition that redirects service check performance data to a text file for later processing by another application is shown below:

define command{

    command_name    store-service-perfdata

    command_line    /bin/echo -e "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$" >> /usr/local/nagios/var/service-perfdata.dat

    }
answered 2012-08-12T18:32:02.783

Your Answer