I want:
- monitor processes and threads
- specifically monitor a program (such as java, or python)
- run flask and provide real-time monitoring
- save log to DB to view history
- add in Alarm for when there's any SPIKE
- psutil = 5.8.0
- flask == 1.1.2
- Flask Web Server
- HTML with Ajax query
- Listing all processes
- Find process by name
- TODO: monitor CPU usuage
- TODO: Find "main" processes, and list its children
- Flask + SocketIO for streaming process STDOUT and STDERR
- Use threads to write STDOUT/STDERR to file
- Scheduler to query resource info at interval
running apm.py
will start a flask app that can start/stop/monitor a process.
- it runs flask app
/start/number
will Popen on a given file (e.g. infinite.bat), on a given number of times/running
will return pids of processes that are running the file/stop
will stop all procesess that are running the file/monitor
will give information about all proceses running the file
- Flask can't clean up after subprocess properly. atexit.register() is required. Moe tails here
- Flask has a weird thing where it initializes things twice. More detail here
- make process monitor with python (with code) link