Monthly Archives: April 2011

Implementation of the Erlang Timer Module

The timer module provides useful functions related to time. For example: send_after: send a message to a process after some time send_interval: send a message to a process repeatedly after some time cancel: cancels a previously requested timeout sleep: suspend … Continue reading

Posted in erlang | Tagged | Leave a comment

The erlangrc file

There could be an erlang resource file named as “.erlang” in your working directory or home directory. This file is loaded and evaled when erlang is started. So you can do some initialization in this file. Let’s look into start_clean.script … Continue reading

Posted in erlang | Tagged | Leave a comment

How to get parent of an erlang process

The erlang application monitor, i.e. appmon, could build a process tree for an erlang application. To build such a tree, we need to find out all processes that belong to the same application and the hierarchy relations between those processes. … Continue reading

Posted in erlang | Tagged | Leave a comment

Getting Process Information of Erlang Runtime System

In an erlang shell we can get process information by calling i(). 1> i(). Pid Initial Call Heap Reds Msgs Registered Current Function Stack otp_ring0:start/2 610 2419 0 init init:loop/1 2 erlang:apply/2 1597 169165 0 erl_prim_loader erl_prim_loader:loop/3 6 gen_event:init_it/6 377 … Continue reading

Posted in erlang | Tagged | Leave a comment