473,509 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to find number of processors in python

hello everybody
am writing a scanner using python which has to get the information for
sun's dual processors, so could any one of you please tell me how to
find the number of processors . is there any api's for this , and also
lemme know how exactly i can write the scannerapi for this, so that it
can read the information of all the cpu's. I have the related CFG
file for that.
with regards
thanks in advance
Jul 18 '05 #1
2 2328
>>>>> "muttu" == muttu <mu*******@yahoo.com> writes:
hello everybody
am writing a scanner using python which has to get the information for
sun's dual processors, so could any one of you please tell me how to
find the number of processors . is there any api's for this


You can run /usr/sbin/psrinfo with os.system() and parse the output.

Ganesan
Jul 18 '05 #2
"/usr/sbin/psrinfo -p" will print the number of physical processors on the
system, though it does not indocate if they are on- or off-line. You could also
write an extension which gets processor information using the sys/processor
library. Example code is available in the "p_online" man page.

Chris
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
779
by: AA | last post by:
Do you know how can i get that? Thanks a lot
5
6855
by: PaulThomas | last post by:
Using VS.Net 2000 and C# How can I get the CPU Serial Number and the Operating Syatem Serial Number Thanks in advance, Paul
2
1986
by: mairhtin o'feannag | last post by:
Hello, I am a bit confused as to how this all works with respect to number of processors on a Linux machine. The situation I am encountering is this : because of Hyperthreading technology, the...
7
2114
by: Jean-David Beyer | last post by:
I have six hard drives (4 SCSI and 2 EIDE) on my main machine with parts of a database on each drive. The main index is on one SCSI drive all to itself. The main data are on the other three SCSI...
1
9591
by: Dominic | last post by:
I'd like to tune the performance of my application in a web garden. Our server has dual processors. Is there any guideline to set this "maximum number of worker processes" for web garden? In my...
109
7518
by: jmcgill | last post by:
Hello. Is there a method for computing the number of digits, in a given numeric base, of N factorial, without actually computing the factorial? For example, 8! has 5 digits in base 10; 10! has...
11
4897
by: John | last post by:
Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)?
1
1392
by: zeero | last post by:
Hi, i want to get the number processors in my machine. Plz guide. The code is running on a core 2 duo machine have 2 processing cores so I expect to get 2 processors. I'm writing code in native...
2
1975
by: Shao | last post by:
Dear All, I am looking for a nitty-gritty Python Ajax script to fire off a number of processing programmes, periodically checking their operations, sending messages back to an HTML div form by...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.