Essentially takes a list of the highest-running processes by CPU (through a command like top -b -n 1 | head -n 12), finds CPU hungry processes, and if they consume a large amount of CPU for an extended time then log it or send it as a webhook to a channel.
Could also work for memory usage - although for almost commands memory usage is not very significant, assuming I can ever get to the bottom of this pesky memory leak in WSI.
Could be useful for diagnostics or potential bad actor detection in the event of very resource intensive commands being spammed.
Might run separately or part of the main process.
Essentially takes a list of the highest-running processes by CPU (through a command like
top -b -n 1 | head -n 12
), finds CPU hungry processes, and if they consume a large amount of CPU for an extended time then log it or send it as a webhook to a channel.Could also work for memory usage - although for almost commands memory usage is not very significant, assuming I can ever get to the bottom of this pesky memory leak in WSI.
Could be useful for diagnostics or potential bad actor detection in the event of very resource intensive commands being spammed.