#查看进程,启动进程和关闭进程的 命令如下
[root@localhost WN]# cd CALCULATION/
[root@localhost CALCULATION]# ps -ef|grep 'calculation_server.py'
root 11030 10932 0 10:22 pts/36 00:00:00 grep --color=auto calculation_se rver.py
[root@localhost CALCULATION]# python calculation_server.py >log.txt
^Z
[1]+ 已停止 python calculation_server.py > log.txt
[root@localhost CALCULATION]# ps -ef|grep 'calculation_server.py'
root 11102 10932 15 10:23 pts/36 00:00:09 python calculation_server.py
root 11247 10932 0 10:24 pts/36 00:00:00 grep --color=auto calculation_server.py
[root@localhost CALCULATION]# kill -9 11102
[root@localhost CALCULATION]# ps -ef|grep 'calculation_server.py'
root 11270 10932 0 10:24 pts/36 00:00:00 grep --color=auto calculation_server.py
[1]+ 已杀死 python calculation_server.py > log.txt
[root@localhost CALCULATION]#
通过grep 进行筛选
通过kill -9 彻底杀死进程
通过>log.txt 可以将python的打印信息重定向
[root@localhost CALCULATION]# cat log.txt
in getConfigFileChangeTime_server CALCULATION
in restartManually_server CALCULATION
rpc_queue_calculation_power [x] Awaiting RPC requests
rpc_queue_calculation_rose [x] Awaiting RPC requests
rpc_queue_get_config_time_CALCULATION [x] Awaiting RPC requests
rpc_queue_manual_restart_CALCULATION [x] Awaiting RPC requests
in wind_power_callback, body: {"fanNo":["INS001","INS002"],"starttime":1609549835,"endtime":1612141835,"step":1000,"type":0}
requestInfo is: {'endTime': 1612141835, 'subSystemName': u'INS001', 'startTime': 1609549835}
查询粗粒度历史请求超时未返回数据,请检查粗粒度历史服务是否开启!
getData from liuZan windSpeedList, windPowerList is: [] []
requestInfo is: {'endTime': 1612141835, 'subSystemName': u'INS002', 'startTime': 1609549835}
查询粗粒度历史请求超时未返回数据,请检查粗粒度历史服务是否开启!
getData from liuZan windSpeedList, windPowerList is: [] []
in wind_power_callback, body: {"fanNo":["INS001"],"starttime":1612142871000,"endtime":1612146471000,"step":1000,"type":3}
13 True
-----year, Last