/* * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// cpu info int cpu_information(CPUInformation& cpu_info); int cpu_load(int which_logical_cpu, double* cpu_load); int context_switch_rate(double* rate); int cpu_load_total_process(double* cpu_load); int cpu_loads_process(double* pjvmUserLoad, double* pjvmKernelLoad, double* psystemTotal);
// os information int os_version(char** os_version) const;
// environment information void generate_environment_variables_events();
// system processes information int system_processes(SystemProcess** system_processes, int* no_of_sys_processes);
int network_utilization(NetworkInterface** network_interfaces);
};
int JfrOSInterface::generate_initial_environment_variable_events() { if (os::get_environ() == NULL) { return OS_ERR;
}
if (EventInitialEnvironmentVariable::is_enabled()) { // One time stamp for all events, so they can be grouped together
JfrTicks time_stamp = JfrTicks::now(); for (char** p = os::get_environ(); *p != NULL; p++) { char* variable = *p; char* equal_sign = strchr(variable, '='); if (equal_sign != NULL) { // Extract key/value
ResourceMark rm;
ptrdiff_t key_length = equal_sign - variable; char* key = NEW_RESOURCE_ARRAY(char, key_length + 1); char* value = equal_sign + 1;
strncpy(key, variable, key_length);
key[key_length] = '\0';
EventInitialEnvironmentVariable event(UNTIMED);
event.set_starttime(time_stamp);
event.set_endtime(time_stamp);
event.set_key(key);
event.set_value(value);
event.commit();
}
}
} return OS_OK;
}
int JfrOSInterface::system_processes(SystemProcess** sys_processes, int* no_of_sys_processes) { return instance()._impl->system_processes(sys_processes, no_of_sys_processes);
}
int JfrOSInterface::network_utilization(NetworkInterface** network_interfaces) { return instance()._impl->network_utilization(network_interfaces);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.22Bemerkung:
(vorverarbeitet am 2026-05-02)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.