Jacherr / assyst2

Assyst Discord Bot 2.0 rewrite
https://jacher.io/assyst
MIT License
19 stars 4 forks source link

feature: track high cpu/mem processes #3

Closed Jacherr closed 1 month ago

Jacherr commented 8 months ago

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.

Jacherr commented 1 month ago

Not really relevant to Assyst, now I think about it again. Probably better as a separate project.