Reworked linux monitoring script