Results 1 to 3 of 3

Thread: Monitoring OS with Java

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    199

    Monitoring OS with Java

    Hi,
    I'm wondering is it possible to get the following details from the underlying OS using java ?

    - total machine memory
    - processor useage
    - hard drive accesses
    - network load

    Thanks
    -

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    this probably doesn't have anything you need, but it at least has some stuff about your system
    http://java.sun.com/j2se/1.4.2/docs/...etProperties()
    has to be more where that came from. Just look around on the api pages. I don't know anything off the top of my head though to do that stuff.

  3. #3
    It's a gas!
    Join Date
    Jul 2002
    Posts
    699
    It isnt possible to display os properties as youve requested.
    You can, however, display your java system properties as well as os name, version, etc.
    Code:
    public class SystemProperties
    {
      public static void main(String []args)
      {
        System.getProperties().list(System.out);
      }
    }
    Edit: You can probably do this via a C/C++ system command using JNI

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •