V2EX Mrzhang0320
Mrzhang0320

Mrzhang0320

V2EX 第 284881 号会员,加入于 2018-01-20 23:13:49 +08:00
30 S 92 B
Mrzhang0320 最近回复了
对了你可以用这个命令看一下最近的唤醒源 powercfg -lastwake
我也是上个月新买的 出现这种情况 不过我是休眠 莫名其妙会启动;后来我看了一下自动任务 好像是 windows 有些更新会启动,你可以看看
@skylancer 但是你怎么获取到那个 pid 呢,重启之后 pid 改变了
@ThinkZ 对诶
@Thanks 好的谢谢,我试一下加个 try ;确实在上一次打印 pids 时,存在这个 pid ;然后就出错了;
@ThinkZ 在上一次打印的 pids 中 这个不存在的进程 pid 还是有的
@ThinkZ kill 完了,然后也重启启动了,之后就出现这样的
Traceback (most recent call last):
File "D:\python\lib\site-packages\psutil\_pswindows.py", line 635, in wrapper
return fun(self, *args, **kwargs)
File "D:\python\lib\site-packages\psutil\_pswindows.py", line 821, in create_time
return cext.proc_create_time(self.pid)
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\python\lib\site-packages\psutil\__init__.py", line 368, in _init
self.create_time()
File "D:\python\lib\site-packages\psutil\__init__.py", line 699, in create_time
self._create_time = self._proc.create_time()
File "D:\python\lib\site-packages\psutil\_pswindows.py", line 640, in wrapper
raise NoSuchProcess(self.pid, self._name)
psutil._exceptions.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=11812)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "jiankong.py", line 40, in <module>
main()
File "jiankong.py", line 12, in main
p = psutil.Process(pid)
File "D:\python\lib\site-packages\psutil\__init__.py", line 341, in __init__
self._init(pid)
File "D:\python\lib\site-packages\psutil\__init__.py", line 381, in _init
raise NoSuchProcess(pid, None, msg)
psutil._exceptions.NoSuchProcess: psutil.NoSuchrocess no process found with pid 11812
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     868 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 22ms UTC 20:27 PVG 04:27 LAX 13:27 JFK 16:27
Do have faith in what you're doing.
ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86