Requirement |
Where to get the information from |
CPU type the product is supported on |
/proc/cpuinfo |
CPU architecture (32 / 64 bits) |
|
machine model |
|
disk model |
/sys/bus/scsi/devices/0:0:0:0 for example info extraction can be built upon libsysfs |
Requirement |
Where to get the information from |
kernel version |
/proc/sys/kernel/osrelease take the 1st 3 digits
($(VERSION).$(PATCHLEVEL).$(SUBLEVEL)) e.g. in "2.6.9-1.667smp" only take "2.6.9" |
distribution |
/proc/version This file contains the string linux_banner, that is built as follows: "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; The LINUX_COMPILER variable (obtained by $(CC) -v should (don't know if it is always true?) contain the distro level: gcc -v | tail -1 gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) |
compiler version |
/proc/version (see above) |
Requirement |
Where to get the information from |
Number of sibling CPUs on the same physical CPU for architectures which use hyper-threading | /proc/cpuinfo
(siblings) |
Package
id of a logical CPU (if hyper-threading) |
/proc/cpuinfo
(physical id) |
Requirement |
Expressed in |
Where to get the information from |
Memory space |
KB or MB |
/proc/meminfo (MemTotal) |
Size
of a huge page |
kB |
/proc/meminfo
(Hugepagesize) |
Total
number
of huge pages |
# of
pages |
/proc/meminfo
(HugePages_Total) |
Total
number
of available huge pages |
# of
pages |
/proc/meminfo
(HugePages_Free) |
Requirement |
Expressed in |
Where to get the information from |
Swap space |
KB or MB or percentage of the memory space |
/proc/meminfo (SwapTotal) |
Requirement |
Where to get the information from |
Free disk space |
statfs() |
Disk size limitation (max size supported for GPFS) |
/proc/partitions |
Parameter |
Where to set / get the value |
Maximum number of shm segment ids |
/proc/sys/kernel/shmmni |
Maximum shm segment size (in bytes) |
/proc/sys/kernel/shmmax |
Maximum number of shm segment pages system-wide |
/proc/sys/kernel/shmall |
Minimum shm segment size (in bytes) |
ipcs -lm / shmctl(SHMINFO)->shmmin |
Parameter |
Where to set the value |
Maximum size of a message queue |
/proc/sys/kernel/msgmnb |
Maximum number of message queue ids |
/proc/sys/kernel/msgmni |
Parameter |
Where to set the value |
Max number of semaphore identifiers (semmni) |
/proc/sys/kernel/sem (4th field) |
Max number of semaphores per id (semmsl) |
/proc/sys/kernel/sem (1st field) |
Max number of semaphores in system (semmns = semmni * semmsl) |
/proc/sys/kernel/sem (2nd field) |
Max number of operations per semop call (semopm) |
/proc/sys/kernel/sem (3rd field) |
All previous parameters together |
/proc/sys/kernel/sem |
Parameter |
Where to set the value |
Maximum number of file handles |
/proc/sys/fs/file-max |
Parameter |
Where to set the value |
Maximum receive buffer size |
/proc/sys/net/core/rmem_max |
Maximum send buffer size |
/proc/sys/net/core/wmem_max |
Maximum number of received packets that will be processed
before resulting in congestion |
/proc/sys/net/core/netdev_max_backlog |
Minimum / default / maximum memory size of the TCP receive
buffers |
/proc/sys/net/ipv4/tcp_rmem |
Minimum / default / maximum memory size of the TCP send
buffers |
/proc/sys/net/ipv4/tcp_wmem |
Enable TCP to negotiate the use of window scaling (> 64K
buffers) with the other end during connection setup |
/proc/sys/net/ipv4/tcp_window_scaling |
Timeout
for a FIN packet before the socket is forcibly closed |
/proc/sys/net/ipv4/tcp_fin_timeout |
Maximum
number of queued connection requests which= have still not received an
ACK from the connecting client |
/proc/sys/net/ipv4/tcp_max_syn_backlog |
Allow
to reuse TIME-WAIT sockets for new connections |
/proc/sys/net/ipv4/tcp_tw_reuse |
Local port range that is used by TCP and UDP to choose the
local port |
/proc/sys/net/ipv4/ip_local_port_range |
MTU size |
ifconfig or /proc/sys/net/ipv6/conf/<interface>/mtu |
Parameter |
Expressed
in |
Where to set the value |
Kernel policy for memory allocation |
0, 1, 2 |
/proc/sys/vm/overcommit_memory |
Percentage
of the memory that should be added to the swap to determine the maximum
address space that is allowed to be committed |
Percentage
of the physical memory |
/proc/sys/vm/overcommit_ratio |
Swappiness |
[0,
100] |
/proc/sys/vm/swappiness |
Number
of
configured huge pages |
Number
of
pages |
/proc/sys/vm/nr_hugepages |
Parameter |
Default value |
How to set the value (command level) |
How to set value (syscall
level) |
Number of open file descriptors (hard limit) |
_SC_OPEN_MAX |
ulimit -Hn Note: should be set to less than /proc/sys/fs/file-max |
setrlimit(RLIMIT_NOFILE) |
Number of open file descriptors (soft limt) |
_SC_OPEN_MAX |
ulimit -Sn |
setrlimit(RLIMIT(NOFILE) |
Maximum number of processes (hard limit) |
_SC_CHILD_MAX |
ulimit -Hu |
setrlimit(RLIMIT_NPROC) |
Maximum number of processes (soft limit) |
_SC_CHILD_MAX |
ulimit -Su |
setrlimit(RLIMIT_NPROC) |
Maximum stack size (soft limit) |
_STK_LIM |
ulimit -Ss |
setrlimit(RLIMIT_STACK) |
Maximum size of the data segment (soft limit) |
unlimited (RLIM_INFINITY) |
ulimit -Sd |
setrlimit(RLIMIT_DATA) |
Maximum size of virtual memory (soft limit) |
(datalim / 1024L) + (stacklim / 1024L) |
ulimit -Sv |
setrlimit(RLIMIT_RSS) |
Parameter |
Where to set the value |
Base address for shared libraries (specific to some ditros,
like RH) |
/proc/<pid>/mapped_base |
Parameter |
Where to set the value |
Time
spent
in user mode |
/proc/stat
(column 1 + column 2) |
Time
spent
in kernel mode |
/proc/stat
(column 3) |
Time
spent
idle |
/proc/stat
(column 4) |
Number
of
context switches |
/proc/stat
(ctxt) |
Free
memory |
/proc/meminfo
(MemFree) |
Total
amount
of swap space |
/proc/meminfo
(SwapTotal) |
Free
swap
area |
/proc/meminfo
(SwapFree) |
Network
device statistics |
/proc/net/dev |
Parameter |
Where to set the value |
Status information about a given process |
/proc/<pid>/stat |
Characteristics of the underlying object |
Example |
attributes |
location |
field
number or line delimiter |
strategy
routine |
||
data
format |
name
scope |
contents
scope |
|||||
Existing routine |
system
wide |
N/A |
min
shm segment size |
N/A |
N/A |
N/A |
strat_shmmin |
Entire file contents |
system
wide |
system wide |
max
number of shm segment ids |
ATTR_NAME_SYS_WIDE
| ATTR_CONT_SYS_WIDE |
/proc/sys/kernel/shmmni |
N/A |
strat_file |
per
process |
system wide |
Shared
libraries base address for a process |
ATTR_NAME_PER_PROC | ATTR_CONT_SYS_WIDE |
/proc/%d/mapped_base |
N/A |
strat_file |
|
per
network interface |
system wide |
MTU
size |
ATTR_NAME_PER_NETINT | ATTR_CONT_SYS_WIDE |
/proc/sys/net/ipv6/conf/%s/mtu |
N/A |
strat_file |
|
single line |
system
wide |
system wide |
max
number of semaphores per id |
ATTR_NAME_SYS_WIDE | ATTR_CONT_SYS_WIDE |
/proc/sys/kernel/sem |
1 |
strat_sub_file_line |
per
process |
system wide |
ppid
of a process |
ATTR_NAME_PER_PROC | ATTR_CONT_SYS_WIDE |
/proc/%d/stat |
4 |
strat_sub_file_line | |
one line of
data per single object |
system wide |
per network
interface |
Number
of receive packets for a network interface |
ATTR_NAME_SYS_WIDE
| ATTR_CONT_PER_NETINT |
/proc/net/dev |
2 |
strat_sub_file_lines |
several lines, each line containing a
fixed string followed by the corresponding value |
system
wide |
system wide |
Total
swap space |
ATTR_NAME_SYS_WIDE | ATTR_CONT_SYS_WIDE | /proc/meminfo |
"SwapTotal" |
strat_sub_file_block |
per
process |
system wide |
Sleep
average time of a process |
ATTR_NAME_PER_PROC | ATTR_CONT_SYS_WIDE |
/proc/%d/status |
"SleepAVG" |
strat_sub_file_block | |
block
of data for each object |
system
wide |
per CPU |
Package
id of a cpu |
ATTR_NAME_SYS_WIDE | ATTR_CONT_PER_CPU |
/proc/cpuinfo |
"physical
id" |
strat_sub_file_block |