ksmtuned-service.py 599 B

12345678910111213141516171819202122232425262728
  1. from comar.service import *
  2. import os
  3. serviceType = "local"
  4. serviceDefault = "off"
  5. serviceDesc = _({"en": "Kernel Samepage Merging Tuned Daemon",
  6. "tr": "Kernel Aynısayfa Birleştirici İnce Ayarlı Sunucu"})
  7. serviceConf = "ksm"
  8. ksmtuned = "/usr/sbin/ksmtuned"
  9. ksmtunedpid = "/run/ksmtune.pid"
  10. @synchronized
  11. def start():
  12. startService(command=ksmtuned,
  13. pidfile=ksmtunedpid,
  14. donotify=True)
  15. @synchronized
  16. def stop():
  17. stopService(pidfile=ksmtunedpid,
  18. donotify=True)
  19. def status():
  20. return isServiceRunning(ksmtunedpid)