XlShmCommands.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, August 27, 1992 6:42:21 pm PDT
Christian Jacobi, March 23, 1993 2:26 pm PST
DIRECTORY
Commander, IO, Rope, XlShmMonitor;
XlShmCommands: CEDAR MONITOR
IMPORTS Commander, IO, XlShmMonitor =
BEGIN
ShmUsage: Commander.CommandProc ~ {
total: CARD ¬ 0;
addr: CARD; bytes: CARD; id: CARD;
seg: REF ¬ XlShmMonitor.Next[];
WHILE seg#NIL DO
[addr, bytes, id] ¬ XlShmMonitor.Info[seg];
total ¬ total+bytes;
IO.PutF[cmd.out, "addr: %g, bytes: %g, id: %g\n", IO.card[addr], IO.card[bytes], IO.card[id]];
seg ¬ XlShmMonitor.Next[seg];
ENDLOOP;
IO.PutF1[cmd.out, "bytes total: %g\n", IO.card[total]];
};
Commander.Register["X11ShmUsage", ShmUsage, "Query usage of shared memory"];
END.