<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/psutil.git/psutil/_pslinux.py, branch pyobj-refact</title>
<subtitle>github.com: giampaolo/psutil.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/'/>
<entry>
<title>Linux, cpu_freq(): diminish os.stat() calls a bit</title>
<updated>2020-12-29T23:37:39+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-12-29T23:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=f18438d135c12f7eb186f49622e0f6683c37f7f5'/>
<id>f18438d135c12f7eb186f49622e0f6683c37f7f5</id>
<content type='text'>
Micro optimization in reference to #1852 and #1851.
Use glob.glob(), which internally relies on os.scandir()
in order to list /sys/devices/system/cpu/cpufreq files.
In doing so, we avoid os.path.exists() for each CPU, which
internally uses os.stat().

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Micro optimization in reference to #1852 and #1851.
Use glob.glob(), which internally relies on os.scandir()
in order to list /sys/devices/system/cpu/cpufreq files.
In doing so, we avoid os.path.exists() for each CPU, which
internally uses os.stat().

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename cpu_count_physical() to cpu_count_cores()</title>
<updated>2020-12-21T00:20:18+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-12-21T00:20:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=a4c0a0eb0d2a872ab7a45e47fcf37ef1fde5b012'/>
<id>a4c0a0eb0d2a872ab7a45e47fcf37ef1fde5b012</id>
<content type='text'>
This has always been cause of confusion, e.g. see:
https://github.com/giampaolo/psutil/pull/1727#issuecomment-698934643

Removed the reference to "physical" from dostrings, functions and test.
I still left it in the doc though, as it's more explanatory.

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has always been cause of confusion, e.g. see:
https://github.com/giampaolo/psutil/pull/1727#issuecomment-698934643

Removed the reference to "physical" from dostrings, functions and test.
I still left it in the doc though, as it's more explanatory.

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't duplicate coretemp sensor readings (#1822)</title>
<updated>2020-12-17T18:31:35+00:00</updated>
<author>
<name>Tim Schlueter</name>
<email>2689079+modelrockettier@users.noreply.github.com</email>
</author>
<published>2020-12-17T18:31:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=9e7fd6a6110f07d5afd17f284bdc3f81d25daec1'/>
<id>9e7fd6a6110f07d5afd17f284bdc3f81d25daec1</id>
<content type='text'>
Fixes giampaolo/psutil#1708</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes giampaolo/psutil#1708</pre>
</div>
</content>
</entry>
<entry>
<title>[macOS, UNIX] prefer _SC_PAGESIZE over (partially) deprecated getpagesize() (#1891)</title>
<updated>2020-12-17T17:59:13+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-12-17T17:59:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=6bdde37049ba9fae31ccf83620468f77a6b9f396'/>
<id>6bdde37049ba9fae31ccf83620468f77a6b9f396</id>
<content type='text'>
Add a reusable `psutil_getpagesize()` utility common to all UNIXes.

Related to #1885 (`getpagesize()` is deprecated on recent macOS, POSIX.1-2001 and possibly other UNIXes).

The problem emerged on macOS but `getpagesize()` is also used in FreeBSD, NetBSD, OpenBSD and AIX, so it makes sense to do this in one place only, similarly to Windows which also provide a `psutil_getpagesize()` utility.

Follow cPython's `mmapmodule.c` and `resourcemodule.c` lead and rely on `sysconf(_SC_PAGESIZE)` instead, but leave `getpagesize()` in place as last resort/attempt for systems where it's not deprecated and/or they still legitimately rely on it.

Also provide a python wrapper so we can test the return value of this C function against Python's stdlib modules.

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a reusable `psutil_getpagesize()` utility common to all UNIXes.

Related to #1885 (`getpagesize()` is deprecated on recent macOS, POSIX.1-2001 and possibly other UNIXes).

The problem emerged on macOS but `getpagesize()` is also used in FreeBSD, NetBSD, OpenBSD and AIX, so it makes sense to do this in one place only, similarly to Windows which also provide a `psutil_getpagesize()` utility.

Follow cPython's `mmapmodule.c` and `resourcemodule.c` lead and rely on `sysconf(_SC_PAGESIZE)` instead, but leave `getpagesize()` in place as last resort/attempt for systems where it's not deprecated and/or they still legitimately rely on it.

Also provide a python wrapper so we can test the return value of this C function against Python's stdlib modules.

Signed-off-by: Giampaolo Rodola &lt;g.rodola@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>remove misleading "in UTC" (#1882)</title>
<updated>2020-11-15T14:09:31+00:00</updated>
<author>
<name>zed</name>
<email>isidore.john.r@gmail.com</email>
</author>
<published>2020-11-15T14:09:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=21bb0822c7d30adc1e144e87d730cd67eb4fa828'/>
<id>21bb0822c7d30adc1e144e87d730cd67eb4fa828</id>
<content type='text'>
"seconds since the epoch" (value returned by `time.time()`) doesn't
depend on the local time zone. It is the same time instance around the
world. It is not in any particular time zone:

```python
import datetime as DT
import zoneinfo

local_time = DT.datetime.fromtimestamp(seconds_since_epoch)    # naive datetime object representing local time
utc_time = DT.datetime.utcfromtimestamp(seconds_since_epoch)  # naive datetime object representing utc time
la_time = DT.datetime.fromtimestamp(seconds_since_epoch, zoneinfo.ZoneInfo("America/Los_Angeles"))   # timezone aware dt
```

Here `local_time`, `utc_time`, `la_time` may correspond to different
clock times but it is exactly the same time instance.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"seconds since the epoch" (value returned by `time.time()`) doesn't
depend on the local time zone. It is the same time instance around the
world. It is not in any particular time zone:

```python
import datetime as DT
import zoneinfo

local_time = DT.datetime.fromtimestamp(seconds_since_epoch)    # naive datetime object representing local time
utc_time = DT.datetime.utcfromtimestamp(seconds_since_epoch)  # naive datetime object representing utc time
la_time = DT.datetime.fromtimestamp(seconds_since_epoch, zoneinfo.ZoneInfo("America/Los_Angeles"))   # timezone aware dt
```

Here `local_time`, `utc_time`, `la_time` may correspond to different
clock times but it is exactly the same time instance.</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite Linux prlimit() with ctypes (Linux wheels) (#1879)</title>
<updated>2020-11-14T23:27:05+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-11-14T23:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=8fc5ed1b20c9c9fab75164aae1984698a46974dc'/>
<id>8fc5ed1b20c9c9fab75164aae1984698a46974dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>revert last commit</title>
<updated>2020-11-01T20:15:30+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-11-01T20:15:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=db80c3e2ff263b17332e9c7cf35fdc4fd2af2266'/>
<id>db80c3e2ff263b17332e9c7cf35fdc4fd2af2266</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix #1868: missing fields from /proc/pid/stat on Alpine Linux</title>
<updated>2020-11-01T13:50:48+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-11-01T13:50:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=9b0efdd06aaac77e4579cab13d894ebed209749f'/>
<id>9b0efdd06aaac77e4579cab13d894ebed209749f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>disk_partitions() maxfile and maxpath  (#1863)</title>
<updated>2020-10-24T20:00:09+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-10-24T20:00:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=40abe5c0aa3e258161284b58cedcee1e11a66e75'/>
<id>40abe5c0aa3e258161284b58cedcee1e11a66e75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FreeBSD] process resource limits (#1859) (#809)</title>
<updated>2020-10-23T17:57:17+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-10-23T17:57:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=89ae354ab7704db69a3f6c880234d21719558511'/>
<id>89ae354ab7704db69a3f6c880234d21719558511</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
