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

A --help argument would help #28

Closed
GoogleCodeExporter opened this issue Jul 14, 2015 · 4 comments
Closed

A --help argument would help #28

GoogleCodeExporter opened this issue Jul 14, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

What steps will reproduce the problem?
1. ./jvmtop.sh --help

jvmtop has several arguments that can only be learned through looking at a few 
different pages in the wiki - since there is no source code, hard to know if 
they are all documented anywhere.

What is the expected output? What do you see instead?

[me@localhost~]$ jvmtop --help

JvmTop 0.7.1 alpha, http://code.google.com/p/jvmtop
Usage: info [OPTIONS]... [PID]

Monitor JVM metrics on the command line

Options (only one can be specified):
  --help                this text
  --once  [PID]      Run jvmtop one time, then exit
  --delay N           Delay N seconds between updates
  --profile PID      Profile a specifc JVM instance

Examples:
   jvmtop             Summarize all currently running JVM's
   jvmtop 3944    Display detailed information for a single JVM (pid #3944)
   jvmtop --delay 3 --profile 3944
                           Profile process #3944, updating the display every 3 seconds

Plus appending what you currently have written up for the column definitions on 
the ExampleOutput wiki page would be a nice touch.  


or for an unknown argument:

[me@localhost~]$ jvmtop --foo
jvmtop: unrecognized option '--foo'
Try --help for more information.


Actual:
[me@localhost~]$ jvmtop --help
Exception in thread "main" java.lang.NumberFormatException: For input string: 
"--help"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at com.jvmtop.JvmTop.main(JvmTop.java:122)



Original issue reported on code.google.com by DaveParillo on 8 Aug 2013 at 11:49

@GoogleCodeExporter
Copy link
Contributor Author

For anyone interested, I created a modified jvmtop.sh that (sort of) does this 
- it uses getopts, so uses short instead of long args :(  

I've tested it some, but not a ton.

Original comment by DaveParillo on 9 Aug 2013 at 1:22

Attachments:

@GoogleCodeExporter
Copy link
Contributor Author

I totally agree, a --help argument should definitely be implemented. It's on my 
TODO-list since the first alpha release - but obviously not with the highest 
priority.
The same is true for argument parsing/short args support.

Thanks for sharing the shell script which adds these features right now.

Original comment by [email protected] on 9 Aug 2013 at 8:17

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Contributor Author

No prob.  In the spirit of full disclosure, I should mention that the first 
script uploaded has two lines that may be specific to my environment:  line 2 : 
. ~/.bash_profile  and the last line: java $JAVA_OPTS -cp 
/home/jboss/bin/jvmtop.jar ....

I am uploading a new script to add your $DIR back in, but not sure how to get 
the verify_java to use JAVA_HOME, even though it's in my environment.

Original comment by DaveParillo on 9 Aug 2013 at 11:40

Attachments:

@GoogleCodeExporter
Copy link
Contributor Author

added in 0.8.0

Original comment by [email protected] on 14 Aug 2013 at 2:47

  • Changed state: Resolved

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

No branches or pull requests

2 participants