Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line feature for generating reports in PNG and PDF #63

Open
marta-lapina opened this issue Mar 9, 2017 · 10 comments
Open

command line feature for generating reports in PNG and PDF #63

marta-lapina opened this issue Mar 9, 2017 · 10 comments

Comments

@marta-lapina
Copy link

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?

@marta-lapina marta-lapina changed the title kSar doesn't produce output when lauchned without graphic UI kSar doesn't produce output when launched via shell command from Jenkins Mar 9, 2017
@Pitterling
Copy link
Collaborator

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.

@Pitterling
Copy link
Collaborator

@marta-lapina is this issue is still valid? Please provide an update, otherwise i will close it. Thx

@marta-lapina
Copy link
Author

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.

@Pitterling
Copy link
Collaborator

please have a look to #95

@kmoec
Copy link

kmoec commented Feb 1, 2018

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.

@Pitterling
Copy link
Collaborator

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.

@kmoec
Copy link

kmoec commented Feb 8, 2018

Would it be possible to get the source code of 5.0.6?

@Pitterling
Copy link
Collaborator

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 ..

@Pitterling Pitterling changed the title kSar doesn't produce output when launched via shell command from Jenkins command line feature for generating reports in PNG and PDF Feb 15, 2018
@yjj3019
Copy link

yjj3019 commented Feb 8, 2023

I currently use version 5.2.4.
Can I use command line, -outputPDF ?

@Pitterling
Copy link
Collaborator

@yjj3019 there is no such cmdline option, see #122, #95 , #117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants