congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.rhq.core.system
Code IndexAdd Tabnine to your IDE (free)

How to use org.rhq.core.system

Best Java code snippets using org.rhq.core.system (Showing top 20 results out of 315)

origin: org.rhq/rhq-core-native-system

public ProcessExecutionResults executeProcess(ProcessExecution processExecution) {
  // TODO: doesn't look like SIGAR has an API to fork/execute processes? fallback to using the Java way
  return SystemInfoFactory.createJavaSystemInfo().executeProcess(processExecution);
}
origin: rhq-project/rhq

public FileSystemInfo(String mountPoint, boolean deferedFetchInfo) {
  this.mountPoint = mountPoint;
  this.fetchedInfo = false;
  if (!deferedFetchInfo) {
    refresh();
  } else {
    SigarProxy sigar = SigarAccess.getSigar();
    createFileSystemObject(sigar);
  }
}
origin: org.rhq/rhq-core-native-system

/**
 * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about currently running
 * processes.
 *
 * @see SystemInfo#getThisProcess()
 */
public ProcessInfo getThisProcess() {
  throw getUnsupportedException("Cannot get information on this process without native support");
}
origin: org.rhq/rhq-core-plugin-api

private boolean isRediscoveryRequired(ProcessInfo processInfo) {
  return processInfo == null || !processInfo.freshSnapshot().isRunning();
}
origin: org.rhq/rhq-core-native-system

/**
 * @deprecated as of 4.6. For similar purpose, call {@link #priorSnaphot()} and then corresponding method
 * from the returned {@link ProcessInfoSnapshot}.
 */
@Deprecated
public ProcExe getExecutable() throws SystemInfoException {
  return priorSnaphot().getExecutable();
}
origin: rhq-project/rhq

/**
 * @deprecated as of 4.6. For similar purpose, call {@link #priorSnaphot()} and then corresponding method
 * from the returned {@link ProcessInfoSnapshot}.
 */
@Deprecated
public ProcState getState() throws SystemInfoException {
  return priorSnaphot().getState();
}
origin: rhq-project/rhq

/**
 * @deprecated as of 4.6. For similar purpose, call {@link #priorSnaphot()} and then corresponding method
 * from the returned {@link ProcessInfoSnapshot}.
 */
@Deprecated
public ProcMem getMemory() throws SystemInfoException {
  return priorSnaphot().getMemory();
}
origin: org.rhq/rhq-core-native-system

public NetworkAdapterStats getNetworkAdapterStats(String interfaceName) {
  try {
    NetInterfaceStat interfaceStat = sigar.getNetInterfaceStat(interfaceName);
    return new NetworkAdapterStats(interfaceStat);
  } catch (SigarException e) {
    throw new SystemInfoException(e);
  }
}
origin: rhq-project/rhq

/**
 * The process's output will be captured and returned in the results. This may be ignored if
 * <code>waitForCompletion</code> is 0 or less. By default capturing to memory is limited to 2MB of
 * process output. If the process writes more output, it will be ignored.
 * @return captureMode
 */
public static CaptureMode memory() {
  return new CaptureMode(true);
}
origin: org.rhq/rhq-core-native-system

/**
 * If there is a native library available for the JVM's platform/operating system, <code>true</code> is returned. If
 * the JVM's platform does not have native libraries available, <code>false</code> is returned (in which case, the
 * only {@link SystemInfo} implementation that is available is {@link JavaSystemInfo}).
 *
 * @return <code>true</code> if there are native library APIs available for the JVM platform
 * @see JavaSystemInfo
 */
public static boolean isNativeSystemInfoAvailable() {
  initialize();
  return nativeLibraryLoadable;
}
origin: org.rhq/rhq-core-native-system

public ProcessInfo(long pid, SigarProxy sigar) throws SystemInfoException {
  this.pid = pid;
  this.sigar = sigar;
  update(pid);
}
origin: org.rhq/rhq-core-native-system

/**
 * Takes a fresh snapshot of the non static process properties.
 *
 * @return a fresh {@link ProcessInfoSnapshot}
 */
public ProcessInfoSnapshot freshSnapshot() {
  refresh();
  return snapshot;
}
origin: org.rhq/rhq-jboss-as-7-plugin

@Override
protected ProcessInfo getPotentialStartScriptProcess(ProcessInfo serverProcess) {
  // If the server was started via domain.sh/bat, its parent process will be the process controller JVM, and the
  // process controller JVM's parent process will be domain.sh/bat.
  return serverProcess.getParentProcess().getParentProcess();
}
origin: rhq-project/rhq

public ProcessExecutionResults executeProcess(ProcessExecution processExecution) {
  // TODO: doesn't look like SIGAR has an API to fork/execute processes? fallback to using the Java way
  return SystemInfoFactory.createJavaSystemInfo().executeProcess(processExecution);
}
origin: org.rhq/rhq-core-native-system

/**
 * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about low level memory
 * details.
 *
 * @see SystemInfo#getMemoryInfo()
 */
public Mem getMemoryInfo() {
  throw getUnsupportedException("Cannot get any information about memory without native support");
}
origin: rhq-project/rhq

/**
 * The process's output will be captured and returned in the results. This may be ignored if
 * <code>waitForCompletion</code> is 0 or less. Process output will be logged into agent.log and at the same time
 * captured into memory. With <code>limit</code> parameter you can set maximum memory buffer to be captured (and possibly returned)
 * captured output size. If the process writes more output, it will only be redirected to agent.log.
 * 
 * @param limit in Bytes (if given value < 0, it's ignored and default 2MB is used instead)
 * @return captureMode
 */
public static CaptureMode agentLog(int limit) {
  return new CaptureMode(true, true, limit);
}
origin: org.rhq/rhq-core-native-system

/**
 * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about CPUs.
 *
 * @see SystemInfo#getCpu(int)
 */
public CpuInformation getCpu(int cpuIndex) {
  throw getUnsupportedException("Cannot get CPU information without native support");
}
origin: rhq-project/rhq

/**
 * Returns partially filled {@link NetworkAdapterInfo} objects - only the data available via the Java API
 * (particularly the <code>NetworkInterface</code> class) will be available in the returned objects.
 *
 * @see SystemInfo#getAllServices()
 */
public List<NetworkAdapterInfo> getAllNetworkAdapters() throws SystemInfoException {
  throw getUnsupportedException("Cannot get list of network adaptors without native support");
}
origin: rhq-project/rhq

/**
 * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about currently running
 * processes.
 *
 * @see SystemInfo#getThisProcess()
 */
public ProcessInfo getThisProcess() {
  throw getUnsupportedException("Cannot get information on this process without native support");
}
origin: org.rhq/rhq-core-native-system

/**
 * Throws {@link UnsupportedOperationException} since the Java API cannot obtain information about file systems.
 *
 * @see SystemInfo#getFileSystems()
 */
public List<FileSystemInfo> getFileSystems() {
  throw getUnsupportedException("Cannot get file systems information");
}
org.rhq.core.system

Most used classes

  • SystemInfo
    Interface of all native system info objects plus the "non-native" generic JavaSystemInfo object. Imp
  • ProcessInfo
    Encapsulates information about a known process. A few process properties (i.e. PID, command line)
  • ProcessExecution
    Provides information on what process to execute and how to execute it. Agent plugin developers shoul
  • ProcessExecutionResults
    Encapsulates the results of a process that was executed via SystemInfo#executeProcess(ProcessExecuti
  • SystemInfoFactory
    Builds SystemInfo objects based on the native operating system the VM is running on.
  • ProcessInfoQuery,
  • OperatingSystemType,
  • SigarAccess,
  • Conditional,
  • AggregateProcessInfo$AggregateProcCpu,
  • AggregateProcessInfo$AggregateProcFd,
  • AggregateProcessInfo$AggregateProcMem,
  • AggregateProcessInfo$AggregateProcTime,
  • AggregateProcessInfo$ProcessStats,
  • AggregateProcessInfo,
  • CpuInformation,
  • FileSystemInfo,
  • JavaSystemInfo,
  • NativeSystemInfo
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now