cpusetSetCPULimits man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



cpusetSetCPULimits(3x)					cpusetSetCPULimits(3x)

NAME
     cpusetSetCPULimits - set the count limits for a cpuset

SYNOPSIS
     #include <cpuset.h>

     int cpusetSetCPULimits(cpuset_QueueDef_t *qdef, int advisory,
					    int mandatory);

DESCRIPTION
     The cpusetSetCPULimits function is used to set the advisory and mandatory
     CPU counts that will constrain the conditions under which the cpuset will
     be created.   The advisory and mandatory CPU count limits will be copied
     into a memory location referenced by the qdef argument.  Consult the
     cpusetAllocQueueDef(3x) man page for additional information about the
     cpuset_QueueDef_t type.

     The advisory limit indicates that if the total number of CPUs is below
     that limit, a warning will be set in errno, but the cpuset will be
     created.  The mandatory limit indicates that if the total number of CPUs
     in the cpuset is below that limit, this results in a failure condition
     being set in errno, and the cpuset will fail to be created.  Both of
     these limit conditions are checked at cpuset creation time, and the
     warning or error condition will be occur during the call to
     cpusetCreate(3x)..

     The return value of the function indicates if the function was
     successfully executed.

EXAMPLES
     This example prints out the advisory and mandatory memory sizes used when
     creating the cpuset mpi_set.

	       char		 *qname = "mpi_set";
	       cpuset_QueueDef_t *qdef	= NULL;
	       int		 cpuadv	 = 128;
	       int		 cpuman	 = 64;

	       /* Alloc queue definition structure, for 10 CPUs */
	       qdef = cpusetAllocQueueDef(128);
	       /* Set the limits else print error & exit */
	       if (!cpusetSetCPULimits(qdef, cpuadv, cpuman)) ) {
		   perror("cpusetSetCPULimits");
		   exit(1);
	       }
	       ......	/* Set all the other attributes for cpuset */
	       if (!cpusetCreate(qdef)) {
		   perror("cpusetCreate");
		   exit(1);
	       }
	       if (errno == ECPUWARN) {
		   printf("Memory: %s\n", strerror(errno));

									Page 1

cpusetSetCPULimits(3x)					cpusetSetCPULimits(3x)

	       }

NOTES
     cpusetSetCPULimits is found in the library "libcpuset.so", and will be
     loaded if the option -lcpuset is used with cc(1) or ld(1).

SEE ALSO
     cpuset(1), cpusetAllocQueueDef(3x), cpusetCreate(3x),
     cpusetGetCPULimits(3x), cpuset(5).

DIAGNOSTICS
     If successful, cpusetSetCPULimits returns 1.  If cpusetSetCPULimits
     fails, it returns 0 and errno is set to indicate the error.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net