ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine
20. 3Monitoring 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
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.asplThe 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.
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.
Monitoring Changes in Computer System Interrupts Using procints.asplThe 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:
Detecting Changes in Computer System InterruptsAside 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