Questions tagged [psutil]
psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python.
psutil
492
questions
1
vote
1
answer
35
views
Popening a gnome-terminal in python immediately appears as a zombie
For background I am working on a script to train multiple pytorch models. I have a training script that I want to be able to run as a sub process in a gnome terminal. The main reason for this is so I ...
1
vote
1
answer
46
views
How to ensure only one instance of a Tkinter executable Python script is running?
I'm developing a Tkinter-based GUI application in Python, and after converting it to an executable using tools like PyInstaller or pytoexe, I encountered an issue where launching the executable ...
0
votes
0
answers
26
views
How can I get the CPU & Memory usage from a service in Google Cloud Run using python?
I want to create a resource tracker for my pipelines (the majority are deployed in a Cloud Run Service). so that I can save a log every time they run with the CPU & Memory usage, something like ...
0
votes
1
answer
45
views
Why does the psutil CPU tracker not work in Google Cloud Run?
I'm currently working on a Tracker of CPU & RAM in python using psutil. I've made some tries locally and everything appears to work fine, but, when I deploy to Google Cloud Run, the tracker is not ...
-1
votes
1
answer
83
views
What is [anon] in psutil memory maps? [duplicate]
I'm trying to solve a memory problem on the RAM in a program written with Python 3.12. I used psutil to output the values of memory_maps. The program runs in Linux.
import psutil
p = psutil.Process(...
0
votes
0
answers
50
views
psutil.disk_usage throws an exception - argument 1 (impossible<bad format char>)
Trying to use the disk_usage, following the documentation throws me an error..
According to the doc:
>>> import psutil
>>> psutil.disk_usage('/')
sdiskusage(total=21378641920, used=...
0
votes
1
answer
24
views
How to set a lower priority for scikit-learn parallel processes spawned by n_jobs?
When using the n_jobs parameter to parallelize scikit-learn routines (like GridSeachCV), is there a way to set the parallel processes to a below-normal priority?
Often I would like to take maximum ...
0
votes
0
answers
36
views
How to handle two dependent tasks?
Let's say we have task A and task B.
B needs A's result in the middle of B's execution time, and B will wait for A's result by polling.
If A exits (due to failures), B can exit
before A exits (not ...
0
votes
0
answers
69
views
How to get a list of all running GUI apps means processes that have a window attached? using python
I have searched extensively for a solution and discovered the psutil library. While I've managed to retrieve all running processes using psutil, I'm struggling to segregate them into GUI applications ...
1
vote
0
answers
38
views
Psutil memory_info return weird values
I want to measure the memory usage of a process and I am using something like this:
# inner psutil function
def process_memory():
process = psutil.Process(os.getpid())
mem_info = process....
0
votes
0
answers
42
views
How to identify whether the partition belongs to OS (Linux) or not using python
I have a requirement to identify only the operating system volumes using python. Is there any method in "psutil" to identify that? Currently I'm thinking of to read fstab, based on the 6th ...
0
votes
0
answers
89
views
psutil.sensors.temperatures() only delivers {}
I'm trying to set up a little python script showing me e.g. my current CPU temperature. I imported psutil to do so. As mentioned in the psutil documentation, I tried the command psutil....
0
votes
0
answers
27
views
Script to track network usage showing increased results when not sending packets
I am trying to monitor the network usage of a python script using psutil and to test this I am using a basic socket programme. When I send this data repeatedly for 60 seconds I get a smaller number ...
0
votes
0
answers
25
views
How to calculate for each image while testing how much cpu utilization the yolo took to detect in this image?
I am using yolo5. I want to estimate how much CPU utilization does yolo take to process a certain image. how can I do that?
I tried to use P-Sutil to calculate the CPU utilization however I can not ...
0
votes
0
answers
42
views
How can I use psutil to Show Values which are Comparable to the Task Manager's Values?
I need your help with a psutil script. I want to log memory and CPU usage of a python 2 script in percent. For that I use something similar to the following loop:
while True:
for process in psutil....