首页 > 其他分享 >(转)getconf命令相关信息概要

(转)getconf命令相关信息概要

时间:2024-05-28 09:00:29浏览次数:20  
标签:概要 MAX Maximum value number 命令 getconf type

原文:https://blog.csdn.net/yes_is_ok/article/details/104537934

遇到一个命令发现没遇到过,就记录一下,顺便解析这个命令:
getconf _NPROCESSORS_ONLN
表示内核数量是多少个

make -j$(getconf _NPROCESSORS_ONLN)
表示有多少个核数就运行多少个任务
详细解析如下:

我们时常需要查询系统相关的信息,比如页面大小,整数大小之类,如果编写程序去计算会比较繁琐,这里有一个很有用的命令,可以用来获取系统相关信息。它就是getconf。

getconf 用途将系统配置变量值写入标准输出,比如:

getconf PAGE_SIZE 查看系统内存分页大小

getconf LONG_BIT 看linux是32位还是64位最简单的方法

getconf -a 查看全部系统变量
$ getconf PAGE_SIZE

4096

$ getconf INT_MAX

2147483647

$ getconf LONG_BIT

64

可以取得的相关信息如下(参考相关资料,在又在版本上会有些不同):

_CS_PATH Value for the PATH environment variable used to find commands.
ARG_MAX Maximum length, in bytes, of the arguments for one of the exec subroutines, including environment data.
BC_BASE_MAX Maximum value allowed for the obase variable with the bc command.
BC_DIM_MAX Maximum number of elements permitted in an array by the bc command.
BC_SCALE_MAX Maximum value allowed for the scale variable with the bc command.
BC_STRING_MAX Maximum length of a string constant accepted by the bc command.
CHARCLASS_NAME_MAX Maximum number of bytes in a character class name.
CHAR_BIT Number of bits in a type character.
CHAR_MAX Maximum value of a type character.
CHAR_MIN Minimum value of a type character.
CHILD_MAX Maximum number of simultaneous processes for each real user ID.
CLK_TCK Number of clock ticks per second returned by the time subroutine.
COLL_WEIGHTS_MAX Maximum number of weights that can be assigned to an entry in the LC_COLLATE locale stanza in a locale-definition file.
CS_PATH Value of the PATH environment variable used to find commands.
EXPR_NEST_MAX Maximum number of expressions that can be nested within parentheses by the expr command.
INT_MAX Maximum value of a type int.
INT_MIN Minimum value of a type 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
————————————————

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/yes_is_ok/article/details/104537934

标签:概要,MAX,Maximum,value,number,命令,getconf,type
From: https://www.cnblogs.com/liujiacai/p/18217046

相关文章

  • 命令启用Windows7 .NetFramework 3.5
    最近在测试某系统安装包在各个环境下的安装使用情况,在window7下使用时,安装完成iis后,发现.NetFramework3.5没有自动勾选;命令没有执行成功。通过以下命令可以在window7下打开自带的.netframework3.5.1(CMD窗口内执行)dism/online/enable-feature/featurename:NetFx3 ......
  • 【分享】FFmpeg桌面神器,集多种功能于一身,超级好用,不用命令行!
    在媒体处理上,市面上有很多软件可以选择,在众多软件里面FFmpeg是比较独特的一款,直接选择FFmpeg硬核命令行工具的朋友相对较少,大多时候只是被集成在各样的软件里,如果单独拿出来使用,不少人会觉得有点懵和抗拒的。  那有没有一款好用的FFmpeg图形界面版本呢?今天体验......
  • WPF在ListView中绑定Command命令的写法
    假定:ViewModel中有一个数据源叫Persons,有一个命令叫DoCommand,通过System.Windows.Interactivity触发器绑定鼠标MouseUp事件,当UI端绑定了DataContext数据上下文之后,Command="{BindingDoCommand}"是找不到这个命令的,必须使用Binging类的RelativeSource属性先找到当前UI,再找到DataC......
  • ifconfig命令得到的信息含义
    ens33:flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu1500inet192.168.88.132netmask255.255.255.0broadcast192.168.88.255inet6fe80::aedc:d547:d9e0:797cprefixlen64scopeid0x20ether00:0c:29:19:65:b9txqueuelen1000(以太网)RXpackets6......
  • 11.2 重定向的含义-管道的使用-tee 命令
    11.2.1输出重定向定义:将命令的正常输出结果保存到指定的文件中,而不是直接显示在显示器的屏幕上重定向输出使用`>``>>`操作符号语法:>文件名解释:表示将标准输出的内容,写到后面的文件中,如果此文件已经存在,将会覆盖原文件中的内容语法:>>文件名......
  • 十个对初学者特有用的 Linux 命令(非常详细)零基础入门到精通,收藏这一篇就够了
    21CTO导读:作为一名Linux管理员,或者即使是刚刚开始使用Linux的新手,充分了解解决网络问题时有用的命令也是至关重要的。我们将探讨用于诊断和解决常见网络问题的10个基本Linux命令。每个命令都将附有实际示例,以说明其用法与有效性。1.ping例如:pingwww.21cto.com......
  • mysql常用命令
    连接mysqlmysql-ualgorithm-hxxx-P11234-pxxx添加索引altertablewiki_update_infoaddindexidx_url(url);查看阻塞进程select*frominformation_schema.innodb_trx;常用语句selectt1.post_uuid,t1.urlfromwiki_analysis_infoast1fulljoinwiki_link_info......
  • 常用docker命令
    1、拉取该镜像sudodockerpullml-harbor.ops.qianxin-inc.cn/qaxgpt/transformers-pytorch-deepspeed-latest-gpu-ww-fa:latest2、创建容器,运行该镜像sudodockerrun-t-iml-harbor.ops.qianxin-inc.cn/qaxgpt/transformers-pytorch-deepspeed-latest-gpu-ww-fa:latest/bin/......
  • 常用hdfs命令
    hdfsdfs-mkdir/home/hdp-ait/wangwei22hdfsdfs-ls/home/hdp-ait/wangwei22hdfsdfs-du-h/home/hdp-ait/wangwei22hdfsdfs-touchz/home/hdp-ait/wangwei22/a.txthdfsdfs-rm/home/hdp-ait/wangwei22/edges.txthdfsdfs-rm/home/hdp-ait/wangwei22/vertexs.txt......
  • 【VMware ESXi】使用 smbiosDump 命令获取服务器硬件信息。
    ESXi5.x之前版本,通过SSH连接至ESXi主机,同常规Linux发行版一样,可以使用dmidecode命令来了解服务器的硬件信息。但在之后版本的ESXi主机上,需要使用smbiosDump命令来获取服务器硬件信息,当然运行esxcfg-info命令也可以查找主机信息,不过并没有smbiosDump命令查看方便......