Shell Writing a console monitoring tool, interrupts & tcp-connections & threads

I want to have some monitoring-info using short scripts.
The info i want is :
- number of software interrupts
- number of hardware interrupts
- number of system calls
- number of tcp connections in respectively listen,initiated,established,terminated state.
- number of tasks, threads in running,sleeping state.
Probably there are some short scripts/commands who retrieve this info.
 
The info i want is :
- number of software interrupts
- number of hardware interrupts
The question is do you want something hardware specific or portable.
Snatching interrputs from a known IRQ or device will be simpler than writng someting generic.
vmstat -i |grep igb0
vmstat -i |grep irq264
 
Thanks, this one gives me the one with the highest rate,
Code:
vmstat -i  | grep -v cpu | sort -k 3 | tail -3 | head -1

Two other,
Code:
netstat -4 | grep ESTABLISHED | wc -l
netstat -4 | grep SYN_SENT | wc -l
 
Sounds to me like you're trying to reinvent Munin. Munin is based on OS dependent scripts called plugins; these are written in shell. It supports FreeBSD.

So by looking the way Munin does such stuff in its plugins you can derivate your own snippets of commands then.
 
Back
Top