Giter Site home page Giter Site logo

tuxming / javasysmon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jezhumble/javasysmon

0.0 1.0 0.0 570 KB

Manage OS processes and get cpu and memory stats cross-platform in Java.

Home Page: http://wiki.github.com/jezhumble/javasysmon

License: Other

javasysmon's Introduction

JavaSysMon

JavaSysMon is designed to provide an OS-independent way to manage OS processes and get live system performance information such as CPU and memory usage, distributed as a single jar file. It is written in C and Java. However the native binaries are hidden away inside the jar, so you never need to worry about them.

Currently it supports Mac OS X, Linux, Windows, and Solaris. Ultimately we aim to support everything from AIX to Android.

If you’re interested in adding support for a new platform, check out the project wiki.

Download latest

The current version of JavaSysMon is 0.3.0, released January 8th. You can get it here: http://github.com/jezhumble/javasysmon/downloads

Run it with java -jar

Building and running

Run ant, and then:

java -jar target/javasysmon.jar

Using the library from code

Simply put the jar in your classpath, and use it like this:

import com.jezhumble.javasysmon.JavaSysMon;
   
JavaSysMon monitor =   new JavaSysMon();
String osName =        monitor.osName();
etc...

For full details of the API, consult the JavaDoc

Current support and limitations

  • Currently supports Mac OS X, Linux, Windows, and Solaris
  • Solaris binary is compiled on x86 on OpenSolaris, so it won't work on SPARC, and has not been tested on SunOS < 5.11
  • Solaris CPU usage only correctly reports usage for first CPU.
  • Supports Java 1.4 and above
  • CPU speed on Linux only reports correct values for Intel CPUs

Source code

The Java source code sits under src/main/java. The C source code is in src/main/c, with a subdirectory for each platform supported by JavaSysMon. The compiled binaries are stored in lib/native, and it is these that are used to build the jar when you run ant. So if you change the c source, you'll need to compile and copy the binary to lib/native before running ant in order to test your changes.

License

JavaSysMon uses the NetBSD (2-line) license.

Links

javasysmon's People

Contributors

jezhumble avatar janmejay avatar jsankey avatar itspanzi avatar

Watchers

James Cloos avatar

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.