Skip to main content
The 2024 Developer Survey results are live! See the results

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.

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 ...
Sami Wood's user avatar
  • 445
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 ...
JosephMoraila's user avatar
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 ...
lapiceroazul4's user avatar
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 ...
lapiceroazul4's user avatar
-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(...
Fedor v. R.'s user avatar
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=...
Geo48's user avatar
  • 13
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 ...
Grendel13G's user avatar
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 ...
JS0's user avatar
  • 1
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 ...
Tarun Sinha's user avatar
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....
Alejandro's user avatar
  • 5,186
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 ...
Naga's user avatar
  • 301
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....
lumu21's user avatar
  • 1
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 ...
Ruairí Grant's user avatar
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 ...
Kholoud Khaled's user avatar
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....
Maximilian's user avatar

15 30 50 per page
1
2 3 4 5
33