public class MacOsSystemCommander extends AbstractSystemCommander
| Constructor and Description |
|---|
MacOsSystemCommander() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildKill(int pid)
构建kill 命令
|
String |
emptyLogFile(File file)
清空文件内容
|
com.alibaba.fastjson.JSONObject |
getAllMonitor()
获取整个服务器监控信息
|
ProcessModel |
getPidInfo(int pid)
获取指定进程的 内存信息
|
List<ProcessModel> |
getProcessList(String processName)
获取当前服务器的所有进程列表
|
boolean |
getServiceStatus(String serviceName)
查询服务状态
|
String |
startService(String serviceName)
启动服务
|
String |
stopService(String serviceName)
关闭服务
|
getHardDisk, getInstance, killpublic com.alibaba.fastjson.JSONObject getAllMonitor()
AbstractSystemCommandergetAllMonitor in class AbstractSystemCommanderpublic List<ProcessModel> getProcessList(String processName)
AbstractSystemCommandergetProcessList in class AbstractSystemCommanderprocessName - 进程名称public String emptyLogFile(File file)
AbstractSystemCommanderemptyLogFile in class AbstractSystemCommanderfile - 文件public ProcessModel getPidInfo(int pid)
AbstractSystemCommandergetPidInfo in class AbstractSystemCommanderpid - 进程idpublic boolean getServiceStatus(String serviceName)
AbstractSystemCommandergetServiceStatus in class AbstractSystemCommanderserviceName - 服务名称public String startService(String serviceName)
AbstractSystemCommanderstartService in class AbstractSystemCommanderserviceName - 服务名称public String stopService(String serviceName)
AbstractSystemCommanderstopService in class AbstractSystemCommanderserviceName - 服务名称public String buildKill(int pid)
AbstractSystemCommanderbuildKill in class AbstractSystemCommanderpid - 进程编号Copyright © 2017–2022. All rights reserved.