001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.system.server;
023:
024: import javax.management.ObjectName;
025:
026: import org.jboss.mx.util.ObjectNameFactory;
027:
028: /**
029: * ServerInfo MBean interface.
030: *
031: * @version $Revision: 57205 $
032: */
033: public interface ServerInfoMBean {
034: /** The default ObjectName */
035: ObjectName OBJECT_NAME = ObjectNameFactory
036: .create("jboss.system:type=ServerInfo");
037:
038: // Attributes ----------------------------------------------------
039:
040: String getJavaVersion();
041:
042: String getJavaVendor();
043:
044: String getJavaVMName();
045:
046: String getJavaVMVersion();
047:
048: String getJavaVMVendor();
049:
050: String getOSName();
051:
052: String getOSVersion();
053:
054: String getOSArch();
055:
056: Integer getActiveThreadCount();
057:
058: Integer getActiveThreadGroupCount();
059:
060: /** Returns <tt>Runtime.getRuntime().maxMemory()<tt> on JDK 1.4 vms or -1 on previous versions. */
061: Long getMaxMemory();
062:
063: Long getTotalMemory();
064:
065: Long getFreeMemory();
066:
067: /** Returns <tt>Runtime.getRuntime().availableProcessors()</tt> on JDK 1.4 vms or -1 on previous versions. */
068: Integer getAvailableProcessors();
069:
070: /** Returns InetAddress.getLocalHost().getHostName(); */
071: String getHostName();
072:
073: /** Returns InetAddress.getLocalHost().getHostAddress(); */
074: String getHostAddress();
075:
076: // Operations ----------------------------------------------------
077:
078: /**
079: * Return a listing of the thread pools on jdk5+.
080: * @param fancy produce a text-based graph when true
081: */
082: String listMemoryPools(boolean fancy);
083:
084: /**
085: * Return a listing of the active threads and thread groups,
086: * and a full stack trace for every thread, on jdk5+.
087: */
088: String listThreadDump();
089:
090: /**
091: * Return a sort list of thread cpu utilization.
092: */
093: String listThreadCpuUtilization();
094:
095: /**
096: * Display the java.lang.Package info for the pkgName
097: */
098: String displayPackageInfo(String pkgName);
099:
100: }
|