1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#include <stdio.h>
#include <unistd.h>
main()
{
int stat;
long a;
a=sysconf(_SC_ARG_MAX);
printf("max combined size of argv[]= %d\n", a);
a=sysconf(_SC_CLK_TCK);
printf("clock tick per second= %d\n", a);
a=sysconf(_SC_CHILD_MAX);
printf("max processes allowed to any UID= %d\n", a);
a=sysconf(_SC_OPEN_MAX);
printf("max open files per process= %d\n", a);
a=sysconf(_SC_PAGESIZE);
printf("system memory page size= %d\n", a);
a=sysconf(_SC_NPROCESSORS_CONF);
printf("number of processors configured= %d\n", a);
a=sysconf(_SC_NPROCESSORS_ONLN);
printf("number of processors online= %d\n", a);
a=sysconf(_SC_PHYS_PAGES);
printf("total number of pages of physical memory= %d\n", a);
a=sysconf(_SC_AVPHYS_PAGES);
printf("number of pages of physical memory not in use= %d\n", a);
a=sysconf(_SC_SEM_NSEMS_MAX);
printf("maximum number of semaphores that a process may have= %d\n", a);
a=sysconf(_SC_SEM_VALUE_MAX);
printf("maximum value that a semaphore may have= %d\n", a);
a=sysconf(_SC_SIGQUEUE_MAX);
printf("maximum number of queued signals pending at receiver= %d\n", a);
a=sysconf(_SC_TIMER_MAX);
printf("maximum number of timers per process= %d\n", a);
a=sysconf(_SC_SHARED_MEMORY_OBJECTS);
printf("supports shared memory objects= %d\n", a);
}
|