Is there a way to detect programmatically? Also, what would be the linux commands to detect which processes are thrashing?