GithubHelp home page GithubHelp logo

Comments (3)

giampaolo avatar giampaolo commented on August 24, 2024

Also free memory:

2024-04-18T06:42:07.3789370Z ======================================================================
2024-04-18T06:42:07.3789770Z FAIL: psutil.tests.test_osx.TestSystemAPIs.test_vmem_free
2024-04-18T06:42:07.3790360Z ----------------------------------------------------------------------
2024-04-18T06:42:07.3790710Z Traceback (most recent call last):
2024-04-18T06:42:07.3798740Z   File "/private/var/folders/z4/sx941vhj3jd2jb9_gwftzctc0000gn/T/cibw-run-l5yirtks/cp39-macosx_arm64/venv-test-arm64/lib/python3.9/site-packages/psutil/tests/__init__.py", line 739, in wrapper
2024-04-18T06:42:07.3799700Z     raise exc  # noqa: PLE0704
2024-04-18T06:42:07.3800720Z   File "/private/var/folders/z4/sx941vhj3jd2jb9_gwftzctc0000gn/T/cibw-run-l5yirtks/cp39-macosx_arm64/venv-test-arm64/lib/python3.9/site-packages/psutil/tests/__init__.py", line 731, in wrapper
2024-04-18T06:42:07.3801610Z     return fun(*args, **kwargs)
2024-04-18T06:42:07.3802160Z   File "/Users/runner/work/psutil/psutil/psutil/tests/test_osx.py", line 148, in test_vmem_free
2024-04-18T06:42:07.3802800Z     self.assertAlmostEqual(psutil_val, vmstat_val, delta=TOLERANCE_SYS_MEM)
2024-04-18T06:42:07.3803360Z AssertionError: 591855616 != 658292736 within 20971520 delta (66437120 difference)
2024-04-18T06:42:07.3803700Z 
2024-04-18T06:42:07.3803880Z ----------------------------------------------------------------------

from psutil.

dbwiddis avatar dbwiddis commented on August 24, 2024

Just looked at the source code and it uses the same host_statistics64() call.

Could just be a race condition. I ran vm_stat twice on the command line (entered at the same time so minimal delay) and got variance here of 9513 pages

$ vm_stat | grep "Pages active"
vm_stat | grep "Pages active"
Pages active:                           1309272.
Pages active:                           1299759.

That's a difference in 37 MiB.

from psutil.

dbwiddis avatar dbwiddis commented on August 24, 2024

This post is probably relevant: https://stackoverflow.com/questions/14789672/why-does-host-statistics64-return-inconsistent-results

from psutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.