使用getconf命令来获取系统信息
作者:互联网
getconf 用途将系统配置变量值写入标准输出,比如:
getconf PAGE_SIZE 查看系统内存分页大小
getconf LONG_BIT 看linux是32位还是64位最简单的方法
getconf -a 查看全部系统变量
...
可以取得的相关信息如下(参考相关资料,在又在版本上会有些不同):
系统配置变量 | 用于查找命令的 PATH 环境变量的值。 |
---|---|
ARG_MAX | exec 子例程之一的参数的最大长度(以字节为单位),包括环境数据。 |
BC_BASE_MAX | 使用 bc 命令允许 obase 变量的最大值。 |
BC_DIM_MAX | bc 命令允许的数组中的最大元素数。 |
BC_SCALE_MAX | 使用 bc 命令的比例变量允许的最大值。 |
BC_STRING_MAX | bc 命令接受的字符串常量的最大长度。 |
CHARCLASS_NAME_MAX | 字符类名称中的最大字节数。 |
CHAR_BIT | 类型字符中的位数。 |
CHAR_MAX | 类型字符的最大值。 |
CHAR_MIN | 类型字符的最小值。 |
CHILD_MAX | 每个真实用户 ID 的最大同时进程数。 |
CLK_TCK | time 子例程返回的每秒时钟滴答数。 |
COLL_WEIGHTS_MAX | 可以分配给语言环境定义文件中 LC_COLLATE 语言环境节中的条目的最大权重数。 |
CS_PATH | 用于查找命令的 PATH 环境变量的值。 |
EXPR_NEST_MAX | expr 命令可以嵌套在括号内的最大表达式数。 |
INT_MAX | int 类型的最大值。 |
INT_MIN | int 类型的最小值。 |
LINE_MAX | Maximum length, in bytes, of a command's input line (either standard input or another file) when the utility is described as processing text files. The length includes room for the trailing new-line character. |
LONG_BIT | Number of bits in a type long int. |
LONG_MAX | Maximum value of a type long int. |
LONG_MIN | Minimum value of a type long int. |
MB_LEN_MAX | Maximum number of bytes in a character for any supported locale. |
NGROUPS_MAX | Maximum number of simultaneous supplementary group IDs for each process. |
NL_ARGMAX | Maximum value of digit in calls to the printf and scanf subroutines. |
NL_LANGMAX | Maximum number of bytes in a LANG name. |
NL_MSGMAX | Maximum message number. |
NL_NMAX | Maximum number of bytes in an N-to-1 collation mapping. |
NL_SETMAX | Maximum set number. |
NL_TEXTMAX | Maximum number of bytes in a message string. |
NZERO | Default process priority. |
OPEN_MAX | Maximum number of files that one process can have open at one time. |
PATH | Sequence of colon-separated path prefixes used to find commands. |
RE_DUP_MAX | Maximum number of repeated occurrences of a regular expression permitted when using the interval-notation parameters, such as the m and n parameters with the ed command. |
SCHAR_MAX | Maximum value of a type signed char. |
SCHAR_MIN | Minimum value of a type signed char. |
SHRT_MAX | Maximum value of a type short. |
SHRT_MIN | Minimum value of a type short. |
SSIZE_MAX | Maximum value of an object of type ssize_t. |
STREAM_MAX | Number of streams that one process can have open at one time. |
TMP_MAX | Minimum number of unique path names generated by the tmpnam subroutine. Maximum number of times an application can reliably call the tmpnam subroutine. |
TZNAME_MAX | Maximum number of bytes supported for the name of a time zone (not the length of the TZ environment variable). |
UCHAR_MAX | Maximum value of a type unsigned char. |
UINT_MAX | Maximum value of a type unsigned int. |
ULONG_MAX | Maximum value of a type unsigned long int. |
USHRT_MAX | Maximum value of a type unsigned short int. |
WORD_BIT | Number of bits in a word or type int |
搬运学习博客链接:
https://www.cnblogs.com/wjoyxt/p/4815782.html
标签:获取,int,MAX,Maximum,value,number,命令,getconf,type 来源: https://www.cnblogs.com/yachengmuCC/p/16341228.html