ksar
ksar copied to clipboard
command line feature for generating reports in PNG and PDF
I am trying out run kSar from commandline in a Jenkins job. I wish to produce PDF graphs from sar reports without using GUI manually. I am running sar with the following command:
java -jar /opt/ksar/ksar-5.2.2-all.jar -input "${WORKSPACE}/report.txt" -outputPDF ${BUILD_NUMBER}-${ENVIRONMENT}/${ENVIRONMENT}${day}.${d}${formatstarttime}-${formatendtime}.pdf
Instead of generating a PDF, the process is running, but produces no output. I just cancel it manually without obtaining the PDF that I need. How to run ksar from commandline to generate PDF with graphs?
i never tried the commandline. did you successfully open the sar file with the GUI? usually when ksar is not progressing its a datetime format issue.
I don't see a DateTimeFormat specified in your cmdline.
@marta-lapina is this issue is still valid? Please provide an update, otherwise i will close it. Thx
I found out that after v5.0.6 kSar it's not possible to run kSar without it's UI to generate reports. You can close the ticket.
please have a look to #95
I know it's a year old thread but just would like to say that I notice that same issue with 5.2.4. I run the same shell command line and it won't produce any pdf output. It just launches the GUI with the file being loaded. When I try to export it to pdf, java issues runtime error
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at net.atomique.ksar.ui.DataView.PDFMenuActionPerformed(DataView.java:291)
I can export the same file to PDF without any issue if I just run the GUI manually (without those input/output paramaters) and export it with menu option. It seems that command line parameter interferes with export process.
Yeah, that's still an open issue .. see also #122
Currently we have 2 PRs open to address this .... #95 and #117
might look into this in the next weeks.
Would it be possible to get the source code of 5.0.6?
sourceforge holds only the 5.1beta code base. This fork here is based on this. Unfortunately we don't have access to 5.0.6 source code.
There is another fork which has worked on the PDF export already https://github.com/ppalucha/ksar2/. I never tried ..