mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Added to repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
22
scripts/monitor-interrupt-rate
Executable file
22
scripts/monitor-interrupt-rate
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
interval="${1:-5}"
|
||||
|
||||
while true
|
||||
do
|
||||
sum=0
|
||||
while read line
|
||||
do
|
||||
for word in $line
|
||||
do
|
||||
if [ "${word#[0-9]}" != "$word" -a "${word%[0-9]}" != "$word" ]; then
|
||||
sum="$((sum + word))"
|
||||
fi
|
||||
done
|
||||
done </proc/interrupts
|
||||
if [ "$prev" != "" ]; then
|
||||
echo $(((sum-prev)/interval))
|
||||
fi
|
||||
prev="$sum"
|
||||
sleep "$interval"
|
||||
done
|
||||
Reference in New Issue
Block a user