Git Product home page Git Product logo

jps_stat's People

Contributors

amarjeetanand avatar amarjeetanandsingh avatar cosimo avatar rsvoboda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jps_stat's Issues

Heap Memory and RAM

I see the RAM memory is lesser than Heap Memory when ran the script in a docker container. Is RAM memory is calculated by excluding heap? .Because heap memory should be a part of RAM right ?

Syntax error

Hi! First of all, thanks for this tool, it's really helpful!
This issue happens all the time, after running it for a while:

cut: /proc/36627/statm: No such file or directory
./jpsstat.sh: line 93: / 1024 : syntax error: operand expected (error token is "/ 1024 ")

Redhat RHEL 7.

jps log output

hello, when I log into a log file I have a problem with special char at the begining.

How to remove them ?

===== ============================== ======= ======= ====== ====== =====
PID Name CurHeap MaxHeap CurRAM MaxRAM %_CPU
===== ============================== ======= ======= ====== ====== =====
10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0
^[[1A10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0
^[[1A10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0
^[[1A10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0
^[[1A10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0
^[[1A10724 org.eclipse.osgi_3.9.1.v201401 36 36 60 60 0

best
bruno

printf error

Hi,
great script. But if I execute the script I get this error:
./jpsstat.sh: line 89: printf: 234.637: invalid number ./jpsstat.sh: line 89: printf: 234.637: invalid number ./jpsstat.sh: line 89: printf: 1.1: invalid number
I found the issue in the printf command where %f has issues to work with decimal numbers. Therefore I modified a few lines:

   MEMORY_T=$(jstat -gc $pid | tail -n 1 | awk '{split($0,a," "); sum=a[3]+a[4]+a[6]+a[8]; mb=sum/1024; print mb}')
        MEMORY=${MEMORY_T%.*}

and
printf "%-6s %-44s %8.2f %8.2f %5.1s\n" $pid ${curr_pid_name["$pid"]} $MEMORY ${curr_pid_max["$pid"]} $cpuuse | sort

It's just a workaround. Hope that helps.

Regards
Marcho

document options in README.md

We need to document all the supported options in README.md

The readme doc is outdated. In recent development, we have got few more options. All the available options can be seen by running ./jpsstat.sh -h.

New available options are -1 | --once and -H | --no-headers and -l

Docker sh support

../../jpsstat.sh: line 98: jps: command not found

Running inside a docker container.
Current working directory is jdk/bin, and jps is present.

sh-4.4# ls | grep jps
jps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.