View Source os_process (os_process v1.0.0)
Summary
Functions
-spec info() -> #{pid => pos_integer(), priority => map(), atom() := term()}.
Return map with OS-specific information about current process.
On UNIX-like OSes the map will contain:
For more information seepid- process ID for the VM, returned value should be logically the same asos:getpid/0, however it will be integer instead of string there.man 2 getpid.priority- map containing priorities for given process. It will contain 3 keys:processprocess_groupuser
man 2 getpriority.
For more info seepgid- process group ID.man 2 getpgid.
For more info seeparent_pid- process ID of the parent process.man 2 getppid.
For more info seeuid- user ID.man 2 getuid.
For more info seegid- group ID.man 2 getgid.
For more info seeeffective_uid- effective user ID.man 2 geteuid.
For more info seeeffective_gid- effective group ID.man 2 getegid.
On Windows it will contain:
pid- process ID for the VM, returned value should be logically the same asos:getpid/0, however it will be integer instead of string there.priority- map containing priorities for given process. It will contain 3 keys:classthread
user_name- name of the owner of the process as binary.
-spec sizes() -> #{byte => pos_integer(), int => pos_integer(), long => pos_integer(), long_long => pos_integer(), ptr => pos_integer()}.
Return sizes (in bits) of the primitive values for a given system.
byte- amount of bits in a byte, where byte is defined as minimal addressable piece of the memory.int- amount of bits inintC type.long- amount of bits inlongC type.long_long- amount of bits inlong longC type.ptr- amount of bits in C pointer type.