灵活使用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( ...
随机推荐
- bzoj1648 [Usaco2006 Dec]Cow Picnic 奶牛野餐
Description The cows are having a picnic! Each of Farmer John's K (1 <= K <= 100) cows is graz ...
- Valid Palindrome 解答
Question Given a string, determine if it is a palindrome, considering only alphanumeric characters a ...
- Mac 下纯lua(一)
Lua 介绍 什么是lua - lua是一种跨平台开发脚本语言. Lua 历史 学校 University of Rio de Janeiro 国家 巴西 作者 Roberto Ierusalimsc ...
- [Android4.4.3] Nubia Z5S Mokee4.4.3 RC2.0 by syhost
这个ROM先前在Mokee官网公布过,但一些人測试bug不少,因此已经撤下, 但又有人反馈跟之前RC1.0版的bug差点儿相同, 所以再次在网盘单独公布, 截图以及注意事项见之前的RC1.0的帖子, ...
- Unity 安卓Jar包的小错误
好久没写博客了,也就意味着好久没有学习了,近几天在搞Unity接入有米的SDk遇到了一点小错误,今天早上解决了,和大家分享下! 1,我们的目的是在在U3D中调用Android产生的Jar包,首先在Ec ...
- notepad++和gcc搭建语言环境
1,工具: Notepad++:http://pan.baidu.com/s/1sjlXl6X MinGW:http://pan.baidu.com/s/1qWyQ3lq 2,安装notepad++ ...
- DataSet、DataTable、DataRow区别
DataSet 表示数据在内存中的缓存. 属性 Tables 获取包含在 DataSet 中的表的集合. ds.Tables["sjxx"] DataTable 表示内存中数据 ...
- 完美实现同时分享图片和文字(Intent.ACTION_SEND)
private void share(String content, Uri uri){ Intent shareIntent = new Intent(Intent.ACTION_SEND); if ...
- Splash界面布局与代码实现(一)
xml界面布局代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns ...
- hibernate总结一
在hibernate中查询使用List,Map和类对象定制返回类型 在使用hibernate进行查询时,使用得最多的还是通过构建hql进行查询了.在查询的过程当中,除使用经常的查询对象方法之外,还 ...