灵活使用getconf命令来获取系统信息
http://blog.chinaunix.net/uid-23105261-id-109513.html
我们时常需要查询系统相关的信息,比如页面大小,整数大小之类,如果编写程序去计算会比较繁琐,这里有一个很有用的命令,可以用来获取系统相关信息。它就是getconf。
| _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 |
灵活使用getconf命令来获取系统信息的更多相关文章
- linux学习笔记:第三单元 Linux命令及获取帮助
第三单元 Linux命令及获取帮助 11) 了解Linux命令的语法格式:命令 [选项] [参数]2) 掌握命令格式中命令.选项.参数的具体含义a) 命令:告诉Linux(UNIX)操作系统做(执行) ...
- Linux命令----uname查看系统信息
uname就是UNIXname的缩写 1.uname可以查询操作系统信息 [root@yuan ~]# uname Linux 2.uname -n显示系统的主机名 [root@yuan ~]# un ...
- 十二、jdk工具之jcmd介绍(堆转储、堆分析、获取系统信息、查看堆外内存)
目录 一.jdk工具之jps(JVM Process Status Tools)命令使用 二.jdk命令之javah命令(C Header and Stub File Generator) 三.jdk ...
- Linux基础-1.Linux命令及获取帮助
1.Linux命令的格式 1)了解Linux命令的语法格式: 命令 [选项] [参数] 2)掌握命令格式中命令.选项.参数的具体的含义 a)命令:告诉Linux(UNIX)操作系统做(执行)什么 b) ...
- java 获取系统信息及CPU的使用率(转)
java 获取系统信息及CPU的使用率 原文:http://kakaluyi.javaeye.com/blog/211492 最近做个项目,就是要取得cpu占有率等等的系统信息,一开始以为要用动态链接 ...
- psutil——获取系统信息的Python第三方模块
本文摘自廖雪峰大神个人网站:https://www.liaoxuefeng.com/wiki/1016959663602400/1183565811281984 用Python来编写脚本简化日常的运维 ...
- C语言使用cmd命令并获取输出方法
转自http://blog.csdn.net/hxh129/article/details/8000205 C语言使用cmd命令并获取输出方法 在实践中,我们有时候需要用C语言来调用cmd的命令,并得 ...
- getconf 命令
getconf 命令 用途 将系统配置变量值写入标准输出. 系统的默认参数,比如mkfs读取默认参数,并格式化,默认PAGESIZE是4096 语法 getconf [ -v specificatio ...
- php获取系统信息的方法
php获取系统信息的方法. 用 getenv函数进行处理: <?php $root = getenv('DOCUMENT_ROOT'); ////服务器文档根目录 $port = getenv( ...
随机推荐
- 【转】android camera(三):camera V4L2 FIMC
关键词:android camera CMM 模组 camera参数 CAMIF V4L2 平台信息:内核:linux系统:android 平台:S5PV310(samsung exynos ...
- cocos2dx lua 学习笔记(二)
安装开发环境 sublime - http://www.sublimetext.com/2 package control - http://packagecontrol.io/installatio ...
- 删除一个表中的重复数据同时保留第一次插入那一条以及sql优化
业务:一个表中有很多数据(id为自增主键),在这些数据中有个别数据出现了重复的数据. 目标:需要把这些重复数据删除同时保留第一次插入的那一条数据,还要保持其它的数据不受影响. 解题过程: 第一步:查出 ...
- git使用图解
使用前 安装git 配置name 和 email git config --global user.name "Your Name" git config --global use ...
- 【树形贪心】【UVA1267】Network
重要意义:复习好久没写的邻接表了. Network, Seoul 2007, LA3902 Consider a tree network with n nodes where the interna ...
- linux进程间通信之共享内存篇
本文是对http://www.cnblogs.com/andtt/articles/2136279.html中共享内存(上)的进一步阐释说说明 1 共享内存的实现原理 共享内存是linux进程间通讯的 ...
- 搭建高可用mongodb集群—— 分片
从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的时候能否做到自动扩展? 在系统早期,数据量还小的时候不会引起太大的问题,但是随着数据量持续增多,后续迟早会出 ...
- MVC学习 (二) Razor语法
MVC的Model层我理解与三层架构的Molde没有区别,都是作为各个层之间的数据沟通桥梁.但是关于Control和View都有一些与传统webform不同的特性. 这里先学习View里所用到的Raz ...
- iOS框架介绍
iOS框架介绍 Cocoa Touch GameKit 实现对游戏中心的支持,让用户能够在线共享他们的游戏相关的信息 iOS设备之间蓝牙数据传输 从iOS7开始过期 局域网游 ...
- JavaScript面向对象,闭包内存图,闭包和作用域
var i = 10; function test(){ var j; i=20; //未定义 function test(){ j='hello'; } console.log(test()); / ...