42 lines
708 B
Python
42 lines
708 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Optional
|
|
|
|
|
|
class SystemService(ABC):
|
|
|
|
@abstractmethod
|
|
def getIp(self) -> str:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getCpuUtilization(self) -> float:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getRamMbAvailable(self) -> float:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getMaxRamMbAvailable(self) -> float:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getCpuAvailable(self) -> int:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getProcessCpu(self, pid: int = None) -> Optional[float]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def getProcessRam(self, pid: int = None) -> Optional[float]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def killProcess(self, pid: int = None):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def terminateProcess(self, pid: int = None):
|
|
pass
|