watch-workers.applescript 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. set broker to "h8.opera.com"
  2. set workers to {"h8.opera.com", "h9.opera.com", "h10.opera.com"}
  3. tell application "iTerm"
  4. activate
  5. set myterm to (make new terminal)
  6. tell myterm
  7. set number of columns to 80
  8. set number of rows to 50
  9. repeat with workerhost in workers
  10. set worker to (make new session at the end of sessions)
  11. tell worker
  12. set name to workerhost
  13. set foreground color to "white"
  14. set background color to "black"
  15. set transparency to 0.1
  16. exec command "/bin/sh -i"
  17. write text "ssh root@" & workerhost & " 'tail -f /var/log/celeryd.log'"
  18. end tell
  19. end repeat
  20. set rabbit to (make new session at the end of sessions)
  21. tell rabbit
  22. set name to "rabbit.log"
  23. set foreground color to "white"
  24. set background color to "black"
  25. set transparency to 0.1
  26. exec command "/bin/sh -i"
  27. write text "ssh root@" & broker & " 'tail -f /var/log/rabbitmq/rabbit.log'"
  28. end tell
  29. tell the first session
  30. activate
  31. end tell
  32. end tell
  33. end tell