GET_NPROCS(3) Linux Programmer's Manual GET_NPROCS(3)NAME
get_nprocs, get_nprocs_conf - get number of processors
SYNOPSIS
#include <sys/sysinfo.h>
int get_nprocs(void);
int get_nprocs_conf(void);
DESCRIPTION
The function get_nprocs_conf() returns the number of processors configured by the operating system.
The function get_nprocs() returns the number of processors currently available in the system. This may be less than the number returned by
get_nprocs_conf() because processors may be offline (e.g., on hotpluggable systems).
RETURN VALUE
As given in DESCRIPTION.
CONFORMING TO
These functions are GNU extensions.
NOTES
The current implementation of these functions is rather expensive, since they open and parse files in the /sys filesystem each time they
are called.
The following sysconf(3) calls make use of the functions documented on this page to return the same information.
np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */
np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */
EXAMPLE
The following example shows how get_nprocs() and get_nprocs_conf() can be used.
#include <stdio.h>
#include <sys/sysinfo.h>
int
main(int argc, char *argv[])
{
printf("This system has %d processors configured and "
"%d processors available.
",
get_nprocs_conf(), get_nprocs());
return 0;
}
GNU 2012-03-20 GET_NPROCS(3)
Check Out this Related Man Page
GET_NPROCS(3) Linux Programmer's Manual GET_NPROCS(3)NAME
get_nprocs, get_nprocs_conf - get number of processors
SYNOPSIS
#include <sys/sysinfo.h>
int get_nprocs(void);
int get_nprocs_conf(void);
DESCRIPTION
The function get_nprocs_conf() returns the number of processors configured by the operating system.
The function get_nprocs() returns the number of processors currently available in the system. This may be less than the number returned by
get_nprocs_conf() because processors may be offline (e.g., on hotpluggable systems).
RETURN VALUE
As given in DESCRIPTION.
CONFORMING TO
These functions are GNU extensions.
NOTES
The current implementation of these functions is rather expensive, since they open and parse files in the /sys file system each time they
are called.
The following sysconf(3) calls make use of the functions documented on this page to return the same information.
np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */
np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */
EXAMPLE
The following example shows how get_nprocs() and get_nprocs_conf() can be used.
#include <stdio.h>
#include <sys/sysinfo.h>
int
main(int argc, char *argv[])
{
printf("This system has %d processors configured and "
"%d processors available.
",
get_nprocs_conf(), get_nprocs());
return 0;
}
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2012-03-20 GET_NPROCS(3)
HI ,
I have AIX 5.2 ? I believe.
I am looking to see how many processors I have and what the Memory is in this box? I know there is a command to run but I am really rusty at this
Thanks
Dave (2 Replies)
We have 2 Rs6000 S-85
Each initially had/have 6 processors and 8 GIG of RAM each
Node 1 we added 14 processors and 32 GIG of RAM On May 19. (11 days ago)
My memory utilization reporting for node 1 showed a spike in available memory 25-30GB for May 19 to 25 . I kind of expected this because I... (5 Replies)
Hi All,
I have a p550 server with 4 proc. But when i run nmon analyzer in cpu_sum it show 5 processors cpu0 cpu1 cpu2 cpu3 cpu4. Why it is showing 5 processors. (6 Replies)
I am beginner to os world.
Is OS dependent on hardware()? i guess yes. then how linux get install on intel as well as other processors?
Is there any unix os for intel processors? (3 Replies)
Hi,
I am having problem allocating all my processors -- 6 processors -- to sharedpool1
I have 6 processors
and I want my lpars to share all these 6 processors.
DefaultPool can't be edited.
I edit my Sharedpool1 as follows
Reserved:0
Max Processors: 6
In my lpar profile:
Min: 1... (1 Reply)
Hello,
Using a Solaris SunOS 5.10, is there anyway to limit the number of processors utilised by an external vendor application over the server, from the unix OS perspective? (1 Reply)
Hi All.
having a blonde moment here... can someone please tell me how to check ALL processors currently running on my Unix Host?
thank you
Brian (2 Replies)
Hi all,
i have no of processors .in that some processors locked. how to find the particular locked processors into list of all the processors.
i hav no of processors like
ex:
processors
1021
1022
1023
1024
1025 ---it is locked
1026
--
-
-
-
-
--
2334334
so i don't know 1025 is... (1 Reply)
hi
please how to know that a sun x4100 m2 server has one or two processors installed ?? the OS installed on this server is windows 2003 Enterprise Edition.
thanks (2 Replies)
Hi,
I am very newbie with AIX system.
I have changed the default IP address 192.168.2.147 of HMC1 to our LAN IP address. I can ping to the new ip address but unable to access to ASMI again with the new ip address. Is there a way that I can connect to the console or can reset to the default... (20 Replies)