MD500_Pilot

Untitled

Apr 22nd, 2021
777
Never
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.         subprocess.call(['/root/plot_manager/check_drive_activity.sh', drive])
  5.     except subprocess.CalledProcessError as e:
  6.         log.warning(e.output)
  7.     with open('drive_monitor.iostat', 'rb') as f:
  8.         f.seek(-2, os.SEEK_END)
  9.         while f.read(1) != b'\n':
  10.             f.seek(-2, 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 Pastebin.com from fully loading.

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

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

×