This is a project to implement an interactive Linux shell with debugging and statistical features in ANSI Common Lisp.
Inspired by the Lisp REPL and Incompatible Timesharing System’s DDT (hence the name DMT, M stands for Meta, T stands for famous poet, Pasha Technique).
DMT> (serapeum:take 5 (list-processes :sort-by 'memory))
(#< 1168427 mako 1678.6M>
#< 1177795 firefox 1198.7M>
#< 1290815 telegram-deskto 971.7M>
#< 1428289 Isolated Web Co 493.0M>
#< 1168356 emacs 450.5M>)
For CPU, memory, IO and network interfaces.
DMT> (with-slots (stat stat-memory pid) (make-process 1)
(values stat stat-memory pid))
#S(PROC-STAT (systemd))
#S(PROC-STAT-MEMORY :RESIDENT 11.9M :SHARED 8.8M)
1
DMT> (first (find-processes "bash --debugger"))
#< 2293234 bash 5.6M>
A kill-process
method that is implemented using CFFI and C’s kill (2)
:
DMT> (mapc #'kill-process (find-processes "bash"))
(#< 2293234 bash 5.6M>
#< 2293911 bash 5.6M>
#< 2293921 bash 5.6M>)
We already have a wonderful REPL, so the plan is to provide a good interface for basic UNIX shell operations.