Comments (13)
From [email protected] on March 08, 2009 21:32:30
Implemented on Windows as r232 .
Status: Started
from psutil.
From [email protected] on March 09, 2009 07:26:03
Implemented on Linux as r236 .
from psutil.
From [email protected] on March 09, 2009 11:48:32
A debate to decide what return for PID 0 is also needed.
I modeled Windows and Linux implementations to provisionally return 0.0 (year 1970)
for now.
Returning the system uptime could make more sense.
from psutil.
From [email protected] on March 13, 2009 08:03:38
PID 0 is the kernel, so system uptime would make sense.
from psutil.
From [email protected] on March 13, 2009 16:41:52
Modified special case in create_time to return system uptime for PID 0 on Windows and
Linux as r257 .
from psutil.
From [email protected] on March 16, 2009 13:19:05
Just do document this somewhere aside from the SVN log, in order to return system
uptime as a number of seconds since the epoch we had quite the juggling match on
Python 2.6 due to this issue: http://bugs.python.org/issue3308 Apparently the time.h functions aren't able to be loaded properly when using MinGW
with Python 2.6 on Windows. To get around this I've implemented the calculation of
current time in seconds since the epoch using the Win32 API to get the current time
as a FILETIME struct and converting the value. This is all implemented in
get_system_uptime() using some code I found here:
http://johnstewien.spaces.live.com/blog/cns!E6885DB5CEBABBC8!831.entry Tested the code and it's returning the correct value (same as time.time() on Windows)
for current time which we can then subtract system uptime seconds from in order to
get system uptime in epoch time.
Note that Python 2.5 works just fine with MinGW time.h functions due to different
version of the visual C++ libs etc. but for compatibility reasons we'll use this
approach to avoid any issues in various environments.
from psutil.
From [email protected] on March 16, 2009 18:09:53
I created issue 39 to discuss about pid 0 special case implementation separately.
from psutil.
From [email protected] on March 16, 2009 18:10:03
Blockedon: 39
from psutil.
From [email protected] on March 17, 2009 09:18:29
Labels: Progress-3in4
from psutil.
From [email protected] on March 20, 2009 12:21:55
Labels: -Progress-3in4 Progress-2in4
from psutil.
From [email protected] on March 20, 2009 14:11:27
Implemented on OS X as r269 .
Labels: -Progress-2in4 Progress-3in4
from psutil.
From [email protected] on March 20, 2009 14:16:46
Implemented on FreeBSD as r272
Status: Fixed
Labels: -Progress-3in4 Progress-4in4
from psutil.
From g.rodola on March 02, 2013 03:46:45
Updated csets after the SVN -> Mercurial migration: r232 == revision
7dc906066c68 r236 == revision 4e4234ba4c30 r257 == revision 442aee762cf4 r269 == revision 0c8ab44644c0 r272 == revision 56a85a5d48e9
from psutil.
Related Issues (20)
- [Windows 11] psutil.process_iter() is 10x slower when running from non-admin account than when running from ADMIN/elevated account HOT 5
- [macOS] CPU utilization contains zeroes HOT 7
- Windows build wheels failure HOT 1
- [CentOS 5] ethtool.h : error: unknown type name '__u32' HOT 1
- [CentOS Stream 10] test_linux.TestSystemCPUFrequency.test_emulate_multi_cpu fails on aarch64 HOT 3
- [CentOS Stream 10] test_misc.TestCommonModule.test_debug often fails on ppc64le, s390x, or aarch64 HOT 5
- [Enhancement] Refactoring of test HOT 1
- [Linux] psutil.tests.test_posix.TestProcess.test_nice fails under non-realtime scheduling policy HOT 2
- [OS] title Windows
- [macOS] cpu_freq() fails on arm64 HOT 6
- [Windows] as_dict() failing for win_service_get('WaaSMedicSvc')
- [Windows]Why are the indicators collected by psuntil too large? HOT 5
- [Linux] Distribute linux wheels for python versions > 3.6 on x86 and arm64 HOT 1
- [Linux] run "python3 -m psutil.tests", some test cases failed when nfs boot is used
- [Windows 10] psutil.process_iter() seems to be stuck
- [Linux] psutil.tests.test_linux.TestSystemVirtualMemoryAgainst tests failing
- [Linux] Get laptop charging speed (in Watts)
- process_iter(): no longer check whether PIDs have been reused
- [Linux / FreeBSD] evaluate using `pidfd_send_signal()` for signaling processes HOT 5
- Don't build with limited API for 3.13 free-threaded build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psutil.