public class WindowsSystemCommander extends AbstractSystemCommander
| Constructor and Description |
|---|
WindowsSystemCommander() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildKill(int pid)
构建kill 命令
|
String |
emptyLogFile(File file)
清空文件内容
|
com.alibaba.fastjson.JSONObject |
getAllMonitor()
获取windows 监控
https://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html
|
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()
getAllMonitor in class AbstractSystemCommanderpublic List<ProcessModel> getProcessList(String processName)
AbstractSystemCommandergetProcessList in class AbstractSystemCommanderprocessName - 进程名称public ProcessModel getPidInfo(int pid)
AbstractSystemCommandergetPidInfo in class AbstractSystemCommanderpid - 进程idpublic String emptyLogFile(File file)
AbstractSystemCommanderemptyLogFile in class AbstractSystemCommanderfile - 文件public 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.