- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How can we access process info
Operating System - Linux
1753513
Members
5445
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2001 09:09 PM
тАО10-02-2001 09:09 PM
Hi,
In Linux, How can we find out number of threads in a process? In SPARC, We can use /proc file commands. How can we do in LINUX?
In Linux, How can we find out number of threads in a process? In SPARC, We can use /proc file commands. How can we do in LINUX?
We make the difference
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2001 12:44 AM
тАО10-03-2001 12:44 AM
Solution
Hi Sudheer,
you should try in your favorite linux distribution the ps command with the "-m" or "m" switch. I tried it out in redhat 7.1, but I get a "ps: error: Thread display not implemented" error message. Maybe it is implemented in your distrib though...
if you want the thread details of a C program of your own, then you should compile it with the "-g" option, execute it under gdb & you will be able to get thread information with the "info threads" command.
hope this helps
you should try in your favorite linux distribution the ps command with the "-m" or "m" switch. I tried it out in redhat 7.1, but I get a "ps: error: Thread display not implemented" error message. Maybe it is implemented in your distrib though...
if you want the thread details of a C program of your own, then you should compile it with the "-g" option, execute it under gdb & you will be able to get thread information with the "info threads" command.
hope this helps
"This is how the world works: all energy flows according to the wills of the great magnet... What a fool was I to defy him!" (Johnny Depp/Fear+Loathing In Las Vegas)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2001 07:31 AM
тАО10-03-2001 07:31 AM
Re: How can we access process info
Top Command
To allow users to increase their file descriptor limits, change the following configuration files:
In /etc/security/limits.conf, add the lines:
* soft nofile 1024
* hard nofile 4096
In /etc/pam.d/login, add:
session required /lib/security/pam_limits.so
To increase the system-wide file descriptor limit, add the following three lines to the /etc/rc.d/rc.local startup script:
# Increase system-wide file descriptor limit.
echo 8192 > /proc/sys/fs/file-max
echo 24576 > /proc/sys/fs/inode-max
#######################################
Limitations on threads are tightly tied to both file descriptor limits, and process limits.
Under Linux, threads are counted as processes, so any limits to the number of processes also applies to threads. In a heavily threaded app like a threaded TCP engine, or a java server, you can quickly run out of threads.
For starters, you want to get an idea how many threads you can open. The `thread-limit` util mentioned in the Tuning Utilities section is probabaly as good as any.
The first step to increasing the possible number of threads is to make sure you have boosted any process limits
To allow users to increase their file descriptor limits, change the following configuration files:
In /etc/security/limits.conf, add the lines:
* soft nofile 1024
* hard nofile 4096
In /etc/pam.d/login, add:
session required /lib/security/pam_limits.so
To increase the system-wide file descriptor limit, add the following three lines to the /etc/rc.d/rc.local startup script:
# Increase system-wide file descriptor limit.
echo 8192 > /proc/sys/fs/file-max
echo 24576 > /proc/sys/fs/inode-max
#######################################
Limitations on threads are tightly tied to both file descriptor limits, and process limits.
Under Linux, threads are counted as processes, so any limits to the number of processes also applies to threads. In a heavily threaded app like a threaded TCP engine, or a java server, you can quickly run out of threads.
For starters, you want to get an idea how many threads you can open. The `thread-limit` util mentioned in the Tuning Utilities section is probabaly as good as any.
The first step to increasing the possible number of threads is to make sure you have boosted any process limits
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP