ehrhardt
02/19/2020, 10:11 PMAndrea
02/20/2020, 3:59 PMtools/test/utils.py you can substitute the string "fds": p.num_fds(), with "fds": p.num_fds() if platform() == "linux" else -1, on get_stats function. If I remember correctly that's all you need to do.seph
ehrhardt
02/20/2020, 10:53 PMehrhardt
02/20/2020, 10:55 PM_pswindows.py", line 957, in cpu_times
user, system = cext.proc_cpu_times(self.pid)
ProcessLookupError: [Errno 3] No such processehrhardt
02/20/2020, 10:56 PMTraceback (most recent call last):
File "osquery-master\tools\analysis\profile.py", line 358, in <module>
timeout=args.timeout, count=args.count, rounds=args.rounds
File "osquery-master\tools\analysis\profile.py", line 194, in profile
result = run_query(shell, query, timeout=timeout, count=count)
File "osquery-master\tools\analysis\profile.py", line 137, in run_query
], timeout=timeout, count=count)
File "C:\Program Files\osquery\osquery-master\tools\analysis/../tests\utils.py", line 159, in profile_cmd
current_stats = get_stats(p, step)
File "C:\Program Files\osquery\osquery-master\tools\analysis/../tests\utils.py", line 131, in get_stats
utilization = p.cpu_percent(interval=interval)
File "C:\Users\ehrhardt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\__init__.py", line 1106, in cpu_percent
pt2 = self._proc.cpu_times()
File "C:\Users\ehrhardt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_pswindows.py", line 718, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=4152)Andrea
02/21/2020, 10:52 AMprofile.py on Windows 😄 On Linux works fine. Not sure if it is psutil or osquery.Andrea
02/21/2020, 10:54 AMosqueryi 's process dies while still doing some work and psutil clearly gets angry.