Python Forum
How to get a count of -Python- threads from the outside (or via code instrumentation)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get a count of -Python- threads from the outside (or via code instrumentation)
#1
  • Detailed description of your problem, including steps to reproduce it
This is more informational, than a problem.

I want some way of identifying which of my program's many threads are coming from CPython, and which are coming from C/C++ extension modules.

I can tell my program has a couple dozen threads by looking at it in csysdig on a Linux system.
  • What steps have you tried? What was the outcome?
I've googled a lot, but I keep getting tutorials about threading, not how to tell Python threads from C/C++ threads.

I've got this question at stackoverflow too: https://stackoverflow.com/questions/5695...he-outside
So far it has no answers.
  • Full traceback verbatim or other error you receive
The "error" is that the application is much slower than it seems like it should be, even though the CPU load and I/O load on the machine are both low. But this post is mostly about the thread question.
  • System info, python version, operating system, etc.
Python 2.7.12 (I know; we're working on upgrading to 3.x)
Ubuntu 16.04.6 LTS
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Row Count and coloumn count Yegor123 4 1,268 Oct-18-2022, 03:52 AM
Last Post: Yegor123
  Update old Python version because of security threads SanderV 2 1,507 Jun-06-2022, 07:49 PM
Last Post: SanderV
  Reducing JSON character count in Python for a Twitter Bot johnmitchell85 2 45,941 Apr-28-2021, 06:08 PM
Last Post: johnmitchell85
Photo Creating column in python based on the other colums value count Bartek635 2 2,894 Apr-15-2021, 03:47 PM
Last Post: Bartek635
  How to scrape and count star rating using Selenium and Python? celinafregoso99 1 3,273 Feb-15-2021, 02:45 PM
Last Post: kashcode
  How to use the count function from an Excel file using Python? jpy 2 4,372 Dec-21-2020, 12:30 AM
Last Post: jpy
  The count variable is giving me a hard time in this code D4isyy 2 1,929 Aug-09-2020, 10:32 PM
Last Post: bowlofred
  Beginner at Python. Trying to count certain integer from random string of code kiaspelleditwrong 3 2,367 Oct-14-2019, 10:40 AM
Last Post: perfringo
  Count in python Debutantdata 2 1,954 Sep-20-2019, 05:05 AM
Last Post: scidam
  Python threads and aircrack-ng adam2020 2 4,915 Apr-01-2019, 08:54 PM
Last Post: adam2020

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020