Expand description
#Introduction This crate focuses on geting system information.
For now it supports Linux, Mac OS X and Windows. And now it can get information of kernel/cpu/memory/disk/load/hostname and so on.
Structs§
- Disk
Info - Disk information.
- EnvOptions
- configurations for working with env’s on windows.
- Hard
Search Options - type that includes hard search options for
is_program_installed_search_hard()
function. - Language
Options - LinuxOS
Release Info - The os release info of Linux.
- LoadAvg
- System load average value.
- MemInfo
- System memory information.
- RamInFo
- type that includes mghz and ddr type values.
- User
Configurations - Type that includes home directory and shell preference of user.
- Windows
Graphics Card - a type that includes all (probably) informations that windows provide about your graphics card.
Enums§
Functions§
- append_
env - append a value currently existing env, only windows.
- boottime
- Get system boottime
- check_
computer_ type - get the computer type. Only “Notebook” and “Desktop” allowed for linux, checks if a battery is exist that implemented on your computer and if it exists, return “Notebook” value, otherwise “Desktop” value. But the way it work on windows is different, it can return various values since windows has able to give more specific infos about computer types.
- cpu_num
- Get cpu num quantity.
- cpu_
speed - Get cpu speed.
- disk_
info - Get disk information.
- get_
current_ user - get the current user as string. Both works on windows and linux.
- get_
graphics_ info - get the graphic card infos, for windows.
- get_
home_ dir_ and_ shell - Returns The
UserConfigurations
struct that includes home dir and shell preference of the user. Only works on linux. - get_
language_ options - returns the language options for the computer, both works on windows and linux.
- get_
public_ ipv4_ address - Get the public ipv4 address as string.
- get_
ram_ infos - returns the
RamInfo
struct per each ram that attached your computer, that includes the mhz value and ddr type, for only windows. - get_
system_ env_ var - gets value of the env that has given name from the system. only for windows.
- get_
timezone - it returns the system’s timezone info. In windows, It returning values are incompatible with tz database timezones such as “Turkey Standard Time” instead of “Europe/Istanbul”.
- get_
user_ env_ var - gets value of the env that has given name from the user. only for windows.
- hostname
- Get hostname.
- is_
program_ installed - that function searchs a program on the terminal if it’s exist and / or returns a positive answer to various version arguments. Works on both Windows And Linux.
- is_
program_ installed_ search_ hard - Since windows has a bunch of api’s that enlists downloaded programs and not all of them reachable via a terminal, that function searchs a program with given name and options on both terminal and various program listing api’s of windows. Warning: It runs too slow. Use it with caution.
- linux_
os_ release - Get the os release note of Linux
- loadavg
- Get system load average value.
- mem_
info - Get memory information.
- os_
release - Get operation system release version.
- os_type
- Get operation system type.
- proc_
total - Get current processes quantity.
- set_env
- set an env variable if it’s not exist before, only windows.