ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine


20. 3
   Monitoring Changes in System Interrupts

 

Monitoring interrupts per CPU core on UNIX systems

ELEMENTS-GROUPING-CLASS: SYSINTERRUPTS

GG-function: gginterrupts()

Sample workspace: SYSINTERRUPTS

Glob the system interrupts 10 times with 250 millis delay

      ints = gginterrupts(syslabel,ViennaRun1,delay,250); ?10,0 ints       where ints is a set variable

Set ks to desirable interrupts

      ks   NMI PMI LOC RES CAL aelm

Show sampled changes in ints

      ,gD`ks~   @ints

Show sampled changes in ints using playchanges command

      playchanges   ints

Set intermittent on historical data

      intermittentarc   1

Show intermittent changes in ints

      playchanges   ints

Show similarity between the sampled changes in ints

      playsim   ints

Play the intermittent changes in ints

      playop   fU,`ks~   ints

Set intermittent to continuous

      intermittentcontinuous    1

Play continuously the intermittent changes in ints

      playop   fU,`ks~   ints

how to monitor changes in system interrupts, monitor changes of interrupts per CPU core

●  Monitoring Changes in System Interrupts

Here we present two ways to monitor your system interrupts. In the first example, the ASPL script, procints.aspl, is a convenient way to add a command on your UNIX system to sample the system interrupts. In the second example, the monitoring is done within an ASPL session by issuing commands at the ASPL prompt.

 

Monitoring Changes in Computer System Interrupts Using procints.aspl

The following ASPL script, procints.aspl, samples the system interrupts on a UNIX system from /proc/interrupts. The script takes two numbers as arguments: the first is the number of iterations, and the second is the delay in milliseconds.

 -LIS- Listing. 20.3.1   [LISTING procints.aspl][ASPL Script procints.aspl]
(raw text)
1.      #!/usr/bin/env  aspl 
2.      #ENVARG= -wsname TRANSIENT -groupingclass SYSINTERRUPTSGROUP
3.      
4.      ;;***********************************************************************
5.      ;;   procints.aspl
6.      ;;   
7.      ;;   Copyright © 2021-2025 Bassem W. Jamaleddine
8.      ;;   All rights reserved.
9.      ;;   
10.     ;;***********************************************************************
11.     
12.     endScriptIfShellArgsLessThan 2
13.     
14.     printblock SAMPLING SYSTEM INTERRUPTS $1 TIMES WITH DELAY OF $2 MILLIS
15.     ints = ggsysinterrupts(grp1,LabelABC,delay,$2); ?$1,0 ints
16.     printblock SAMPLED DATA IN DIFFERENTIAL VARIABLE ints
17.     @ ints
18.     printblock SET ks TO DESIRED INTERRUPTS
19.     ;; ks INT0 INT1 INT4 NMI LOC SPU PMI IWI RES CAL TLB TRM THR MCE MCP aelm
20.     ks NMI PMI LOC RES CAL aelm
21.     intermittentarc 1
22.     printblock PLAY INTERMITTENT CHANGES IN INTERRUPTS
23.     playchanges ints
24.     printblock SHOW SIMILARITY BETWEEN INTERMITTENT CHANGES
25.     playsim sim`fflz ints
26.     
27.     endscript
28.     
29.     __END__
30.     
31.     $00 must be followed by two numbers specifying: iteration millis
32.     
33.        Sample system interrupts looping 5 times with 1000 millisecond delay
34.           $00 5 1000
35.     

SetSphere(C) 2025 Bassem Jamaleddine

 

Monitoring Changes in Computer System Interrupts Using procints.aspl

The script script procints.aspl is run at the UNIX prompt:

procints.aspl

The operations performed by the script procints.aspl are shown in the following display:

viewme

 -TC- Display. 20.3.1   [Monitoring Changes in Computer System Interrupts: procstat.aspl]
Monitoring Changes in Computer System Interrupts: procstat.aspl

 

Detecting Changes in Computer System Interrupts

Aside from the script mentioned above, in this example we show various commands to display the sampled system interrupts. We load the sample workspace SYSINTERRUPTS whose grouping class is SYSINTERRUPTSGROUP, and issue various set operations to play the data on the differential group variable ints. You can start ASPL by creating a new workspace whose grouping class is SYSINTERRUPTSGROUP. For example, the following start ASPL with the workspace JUNKSYSINTS so that you can explore with your own sampled data:

aspl -wsname JUNKSYSINTS -groupingclass SYSINTERRUPTSGROUP

 

Detecting Changes in Computer System Interrupts

aspl SYSINTERRUPTS
    start ASPL loading the sample workspace SYSINTERRUPTS

①  aspl> dm 5

②  aspl> @ ints

③  aspl> ks NMI PMI LOC RES CAL aelm

④  aspl> differentialallarc 1

⑤  aspl> g@,`ks~ ints

⑥  aspl> intermittentarc 1

⑦  aspl> playchanges ints

⑧  aspl> playsim ints

①  aspl> intermittentarc 1

⑨  aspl> playop fU,`ks~ ints

⑩  aspl> ks NMI PMI aelm

⑪  aspl> playchanges ints

viewme

 -TC- Display. 20.3.2   [Detecting Changes in Computer System Interrupts]
Detecting Changes in Computer System Interrupts