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

Feature/console mode #95

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open

Feature/console mode #95

wants to merge 46 commits into from

Conversation

elkrieg
Copy link
Contributor

@elkrieg elkrieg commented May 18, 2017

No description provided.

@elkrieg
Copy link
Contributor Author

elkrieg commented Jul 7, 2017

Added few unittests for this feature

@elkrieg
Copy link
Contributor Author

elkrieg commented Jul 20, 2017

@Pitterling could you please let me know, what is needed for merging this functionality into repository? I need some feedback, thank you.

@@ -156,8 +159,7 @@ public int parse(String line, String[] columns) {
GraphConfig mygraphinfo = myosconfig.getGraphConfig(checkStat);
if (mygraphinfo != null) {
if ("unique".equals(mygraphinfo.getType())) {
obj = new Graph(mysar, mygraphinfo, mygraphinfo.getTitle(), line, firstdatacolumn,
mysar.graphtree);
obj = new Graph(mysar, mygraphinfo, mygraphinfo.getTitle(), line, firstdatacolumn, mysar.graphtree);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refrain from interleaving refactorings and feature commits in the same PR.
Refactoring is good, however it would be nice to have those separated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side effect of auto formatting in IDE

@@ -20,6 +20,32 @@

public abstract class AllParser {

protected String sarStartDate = null;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refrain from moving things around in the same commit/PR as the feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved declarations back

static Config config = null;
static GlobalOptions globaloptions = null;
static ResourceBundle resource = ResourceBundle.getBundle("net/atomique/ksar/Language/Message");

public static void usage() {
show_version();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you removed this version info?

log.info("-outputPDF : location of output pdf file\n");
log.info("-outputIMG : prefix for output images\n");
log.info("-width : width for output png charts\n");
log.info("-heigth : heigth for output png charts");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

height should be spelled as height.
Of course naming is hard, however it looks odd to have width and height options dedicated to png.
What if we require pdf page width/height?

I think imgWidth would be better.

PS. Something like https://github.com/airlift/airline or https://github.com/tatsuhiro-t/argparse4j might make sense to parse the options

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was refering to previous version of kSar where console mode was working

It was following
-width : make JPG/PNG with specified width size (default: 800)
-height : make JPG/PNG with specified height size (default: 600)

BTW there is full output for help in older version

-version: show kSar version number
-help: show this help
-input : argument must be either ssh://user@host/command or cmd://command o
r file://path/to/file or just /path/to/file
-graph : space separated list of graph you want to be outputed
-showCPUstacked: will make the CPU used graph as stacked
-showMEMstacked: will make the Memory graph as stacked (linux only)
-cpuFixedAxis: will graph CPU used with fixed axis from 0% to 100%
-showIntrListstacked : will make the Interrupt List graph as stacked
-showTrigger: will show trigger on graph (disabled by default)
-noEmptyDisk: will not export disk with no data
-tile: will tile window
-userPrefs: will use the userPrefs for outputing graphs (last export of this hos
t)
-showOnlygraphName: will only print graph name available for that data (to be us
e for -graph)
-addHTML: will create an html page with PNG/JPG image
-outputPDF : output the pdf report to the pdf file
-outputPNG : output the graphs to PNG file using argument as bas
e filename
-outputJPG : output the graphs to JPG file using argument as bas
e filename
-outputCSV : output the CSV file
-width : make JPG/PNG with specified width size (default: 800)
-height : make JPG/PNG with specified height size (default: 600)
-startdate : will graph the range begining at that time
-enddate : will graph the range until that date
-solarisPagesize : will set solaris pagesize
-wizard: open with unified login popup
-replaceShortcut : replace all shortcut with those in the xml file
-addShortcut : add shortcut from the xml file
-startup: open window marked for opening at startup

@Pitterling
Copy link
Collaborator

@elkrieg @vlsi Please have a look to this implementation New command line arguments with PDF/CSV export@ppalucha/ksar2

should we consider using org.apache.commons.cli ?

@Pitterling Pitterling mentioned this pull request Nov 17, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants