Apr 22nd, 2021
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def check_drive_activity(drive):
  2.     drive = 'sdas1'
  3.     try:
  4.['/root/plot_manager/', drive])
  5.     except subprocess.CalledProcessError as e:
  6.         log.warning(e.output)
  7.     with open('drive_monitor.iostat', 'rb') as f:
  8., os.SEEK_END)
  9.         while != b'\n':
  10.   , os.SEEK_CUR)
  11.         last_line = f.readline().decode()
  12.     if int((str.split(last_line)[0])) > 100:
  13.         return True
  14.     else:
  15.         return False
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.