Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: How to display OS configuration ffrom JSF page?

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to display OS configuration ffrom JSF page?

    Hi,
    I'm developing a application with JBoss 7 and JSF. I need to display OS information in the web page - CPU load, RAM, HDD, installed RPM packets and etc.
    How I can do this?

    Regards
    Peter


  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: How to display OS configuration ffrom JSF page?

    Unless you have platform support from JBoss/JSF, you'll have to run utilities from your OS that produce that kind of info and capture / parse their output. You can do that by having long-running scripts that make occasional updates to files in known locations, or by invoking those utilities via java.lang.ProcessBuilder

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to display OS configuration ffrom JSF page?

    What OS? Server or client? Server you can use the system dependent utils to get the appropriate info you need. Client side there are security issues with things like javascript or an applet, and I'd recommend against it.

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to display OS configuration ffrom JSF page?

    The server OS is Centos

  5. #5
    Junior Member
    Join Date
    Jun 2011
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to display OS configuration ffrom JSF page?

    I need from a simple JSF page to monitor the load the the server on which the JBoss server is running.

  6. #6
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: How to display OS configuration ffrom JSF page?

    You'd normally need some kind of privileged access to get that kind of information about the underlying OS - do you have privileged access (a CentOS login) on the server?. Do you know how to write shell scripts for Linux?

    I'm not sure any more what's stopping you from writing your page.

Similar Threads

  1. how can i display my data on jsp page in struts2
    By shekhar16 in forum Web Frameworks
    Replies: 0
    Last Post: March 4th, 2011, 06:26 AM
  2. Display Servlet Output into JSP Page
    By DanBrown in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: February 28th, 2011, 10:34 AM
  3. CAS Configuration Problem
    By pacificz in forum Java Theory & Questions
    Replies: 1
    Last Post: July 24th, 2010, 12:44 PM
  4. reg how to use log in jsp page
    By javaking in forum JavaServer Pages: JSP & JSTL
    Replies: 7
    Last Post: April 9th, 2010, 12:36 AM
  5. Need help in JSP Page
    By vinothkumarrvk in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: March 9th, 2010, 05:20 AM