Exmap Console
Exmap-console is a suite of command line applications developed around the Exmap memory analysis tool. It is intended for use in situations where running the Exmap GUI application is not feasible, for example, on embedded devices, or when memory data needs to be saved for later examination.
The suite contains three applications: exmap client (exmap), exmap daemon (exampd) and exmap remote server (exmapserver).
How it works
The command line client corresponds broadly to the original GUI application; it aims to preserve as much of the Exmap functionality as feasible, while at the same time having a small footprint. Using the exmap.ko kernel module, a snapshot of the system memory use is created; this snapshot is then used to calculate how memory is shared between various processes, and the results are sent to stdout (or a file specified from the command line). The output can be produced either in an indented ‘human-friendly’ format, or as CSV; the latter is useful for subsequent examination of the data in a spreadsheet.
The level of detail that is printed is controled by a number of command line options: it is possible to print out only a summary information for each process, or to break the data down to the modules each processes loads, the sections within those modules, or even individual symbols (where symbol table is present). Similarly, it is possible to restrict the output to specific pids or commands, or only processes that use more than a certain amount of memory.
Interactive Mode
As of v. 0.3, exmap console can be run interactively by invoking it with the “-–interactive” command line parameter. This makes it possible to examine the system snapshot directly in the terminal window in a manageable way.
Exmap Remote Server
While the console client is lightweight enough to run directly on many of today’s embedded devices, it is sometimes preferrable, or even necessary, to move the data processing from the target system on a remote one. The exmap server makes this easy: you start exmapserver on the target device listening on a specified free port, and then connect to it from the exmap client (running in interactive mode) over TCP/IP. The server is very small and uses minimal resources at runtime; all the memory and cpu intensive tasks are carried out on the client side.
Exmap Daemon
Sometimes, it is useful to be able to examine how system memory is used in real deployment. To simplify this, exmap console is accompanied by a small daemon, exmapd, which can be used to spawn exmap console with specific command line parameters at periodic intervals and log the system snapshot to a suitable place.
Kernel Module
The current version of exmap console uses kernel module from exmap 0.9; it is anticipated that the functionality will be integrated into the upstream Exmap package in the future.
Download
The current release is 0.4.1 (sha1 checksum).
Development
For Development code, use Subversion;
svn co http://svn.o-hand.com/repos/misc/trunk/exmap-console exmap-console
You can also browse the repository.
