easybuild.tools.systemtools module¶
Module with useful functions for getting system information
| author: | Jens Timmerman (Ghent University) |
|---|
@auther: Ward Poelmans (Ghent University)
-
exception
easybuild.tools.systemtools.SystemToolsException¶ Bases:
exceptions.Exceptionraised when systemtools fails
-
easybuild.tools.systemtools.check_os_dependency(dep)¶ Check if dependency is available from OS.
-
easybuild.tools.systemtools.det_parallelism(par=None, maxpar=None)¶ Determine level of parallelism that should be used. Default: educated guess based on # cores and ‘ulimit -u’ setting: min(# cores, ((ulimit -u) - 15) / 6)
-
easybuild.tools.systemtools.det_terminal_size()¶ Determine the current size of the terminal window. :return: tuple with terminal width and height
-
easybuild.tools.systemtools.get_avail_core_count()¶ Returns the number of available CPUs, according to cgroups and taskssets limits
-
easybuild.tools.systemtools.get_core_count()¶ NO LONGER SUPPORTED: use get_avail_core_count() instead
-
easybuild.tools.systemtools.get_cpu_architecture()¶ Try to detect the CPU architecture
Returns: a value from the CPU_ARCHITECTURES list
-
easybuild.tools.systemtools.get_cpu_family()¶ Determine CPU family. :return: a value from the CPU_FAMILIES list
-
easybuild.tools.systemtools.get_cpu_features()¶ Get list of CPU features
-
easybuild.tools.systemtools.get_cpu_model()¶ Determine CPU model, e.g., Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
-
easybuild.tools.systemtools.get_cpu_speed()¶ Returns the (maximum) cpu speed in MHz, as a float value. In case of throttling, the highest cpu speed is returns.
-
easybuild.tools.systemtools.get_cpu_vendor()¶ Try to detect the CPU vendor
Returns: a value from the CPU_VENDORS list
-
easybuild.tools.systemtools.get_gcc_version()¶ Process gcc –version and return the GCC version.
-
easybuild.tools.systemtools.get_glibc_version()¶ Find the version of glibc used on this system
-
easybuild.tools.systemtools.get_kernel_name()¶ NO LONGER SUPPORTED: use get_os_type() instead
-
easybuild.tools.systemtools.get_os_name()¶ Determine system name, e.g., ‘redhat’ (generic), ‘centos’, ‘debian’, ‘fedora’, ‘suse’, ‘ubuntu’, ‘red hat enterprise linux server’, ‘SL’ (Scientific Linux), ‘opensuse’, …
-
easybuild.tools.systemtools.get_os_type()¶ Determine system type, e.g., ‘Linux’, ‘Darwin’, ‘Java’.
-
easybuild.tools.systemtools.get_os_version()¶ Determine system version.
-
easybuild.tools.systemtools.get_platform_name(withversion=False)¶ Try and determine platform name e.g., x86_64-unknown-linux, x86_64-apple-darwin
Determine extention for shared libraries
Linux: ‘so’, Darwin: ‘dylib’
-
easybuild.tools.systemtools.get_system_info()¶ Return a dictionary with system information.
-
easybuild.tools.systemtools.get_tool_version(tool, version_option='--version')¶ Get output of running version option for specific command line tool. Output is returned as a single-line string (newlines are replaced by ‘; ‘).
-
easybuild.tools.systemtools.get_total_memory()¶ Try to ascertain this node’s total memory
Returns: total memory as an integer, specifically a number of megabytes
-
easybuild.tools.systemtools.use_group(group_name)¶ Use group with specified name.