|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Users, seg_02841b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Io; with Table_Formatter; with Time_Utilities; with Scheduler; with String_Utilities; with System_Utilities; procedure Users (Jobs_Too : Boolean := False; Verbose : Boolean := False) is use System_Utilities; use Io; package Tu renames Time_Utilities; function Image (Value : Long_Integer; Base : Natural := 10; Width : Natural := 0; Leading : Character := ' ') return String renames String_Utilities.Number_To_String; Output : File_Type := Current_Output; S : Session_Iterator; J_Iter : Job_Iterator; function Elapsed (For_Job : Job_Id) return String is begin return Tu.Image (Elapsed (For_Job)); end Elapsed; function Trim (S : String; Width : Natural; Left : Boolean := False) return String is begin if S'Length > Width then if Left then return S (S'Last - Width .. S'Last); else return S (S'First .. S'First + Width); end if; else return S; end if; end Trim; function Name (S : Session_Id) return String is begin return User_Name (S) & '.' & Session_Name (S); end Name; procedure Show_Sessions is package Tf is new Table_Formatter (5); use Tf; procedure Display_Session (S : Session_Id) is J : Job_Iterator; Displayed : Boolean := False; begin Item (Name (S)); Item (Port'Image (System_Utilities.Terminal (S))); Init (J, S); while not Done (J) loop declare use Scheduler; begin if Get_Job_Kind (Value (J)) = Scheduler.Ce then Item (Image (Long_Integer (Value (J)))); Item (Tu.Image (Elapsed (Value (J)))); Displayed := True; exit; end if; end; Next (J); end loop; if not Displayed then Item ("?"); Item ("?"); end if; Item (Image (Input_Count (System_Utilities.Terminal (S))) & "/" & Image (Output_Count (System_Utilities.Terminal (S)))); end Display_Session; begin Header ("Session"); Header ("Line", Right); Header ("Job", Right); Header ("Time", Right); Header ("IO Count", Centered); Init (S); while not Done (S) loop Display_Session (Value (S)); Next (S); end loop; Sort; Display (Output); end Show_Sessions; procedure Show_Jobs is package Tf is new Table_Formatter (5); use System_Utilities; J : System_Utilities.Job_Iterator; begin Io.New_Line; Tf.Header ("Owner"); Tf.Header ("Job"); Tf.Header ("Elapsed", Tf.Right); Tf.Header ("CPU", Tf.Right); Tf.Header ("Job Name"); Init (S); while not Done (S) loop System_Utilities.Init (J, Value (S)); while not Done (J) loop Tf.Item (Trim (Name (Value (S)), 14, Left => False)); Tf.Item (Image (Long_Integer (Value (J)))); -- job # Tf.Item (Trim (Elapsed (Value (J)), 8, Left => False)); Tf.Item (Trim (Tu.Image (System_Utilities.Cpu (Value (J))), 8, Left => False)); Tf.Item (Trim (Job_Name (Value (J)), 37, Left => False)); Next (J); end loop; Next (S); end loop; Tf.Sort; Tf.Display (Output); end Show_Jobs;egin Io.Put_Line (Output, "Rational Environment " & System_Utilities.System_Boot_Configuration & ", Last boot: " & Tu.Image (Tu.Convert_Time (System_Utilities.System_Up_Time))); Io.New_Line; Show_Sessions; if Jobs_Too then Show_Jobs; end if; end Users; pragma Main;
nblk1=7 nid=0 hdr6=e [0x00] rec0=24 rec1=00 rec2=01 rec3=020 [0x01] rec0=00 rec1=00 rec2=07 rec3=00a [0x02] rec0=20 rec1=00 rec2=02 rec3=028 [0x03] rec0=00 rec1=00 rec2=06 rec3=010 [0x04] rec0=21 rec1=00 rec2=03 rec3=01a [0x05] rec0=1c rec1=00 rec2=04 rec3=002 [0x06] rec0=10 rec1=00 rec2=05 rec3=000 tail 0x2172235d083c1722a863d 0x42a00088462065003