Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows Server 2016] AttributeError: 'Process' object has no attribute 'num_fds' #1492

Closed
anelshaer opened this issue Apr 23, 2019 · 1 comment
Assignees

Comments

@anelshaer
Copy link

anelshaer commented Apr 23, 2019

Platform
Microsoft Windows Server 2016 Standard, Version : 10.0.14393, BuildNumber : 14393

Name: psutil, Version: 5.6.1
Location: c:\python27\lib\site-packages

Bug description
Process Object has no attribute 'num_fds' when running Osquery profiler on windows although on linux it runs smoothly. https://github.com/facebook/osquery

Profiling query: SELECT version, build, platform FROM os_version;
Traceback (most recent call last):
  File "C:\Users\dev\Downloads\osquery\tools\analysis\profile.py", line 365, in <module>
    timeout=args.timeout, count=args.count, rounds=args.rounds
  File "C:\Users\dev\Downloads\osquery\tools\analysis\profile.py", line 201, in profile
    result = run_query(shell, query, timeout=timeout, count=count)
  File "C:\Users\dev\Downloads\osquery\tools\analysis\profile.py", line 144, in run_query
    ], timeout=timeout, count=count)
  File "C:\Users\dev\Downloads\osquery\tools\analysis/../tests/utils.py", line 166, in profile_cmd
    current_stats = get_stats(p, step)
  File "C:\Users\dev\Downloads\osquery\tools\analysis/../tests/utils.py", line 142, in get_stats
    "fds": p.num_fds(),
AttributeError: 'Process' object has no attribute 'num_fds'

Use Case

osquery\tools\analysis\profile.py" --shell .\osqueryi.exe --table "osquery\osquery\tables\" --count 1 --round 4 --query  "SELECT version, build, platform FROM os_version;"
@giampaolo
Copy link
Owner

This looks like a osquery bug: num_fds() is not available on Windows (it's documented) so it should not be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants