曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 2778|回复: 0
打印 上一主题 下一主题

getconf -- 打印系统配置变量

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34397
跳转到指定楼层
楼主
发表于 2012-1-3 19:11:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
getconf 打印出那些由 sysconf() 或 confstr() 函数所定义的变量值。可以通过 -a 选项查看所有可以获得预设变量值。

获取内存页大小:
$ getconf PAGE_SIZE
4096


获取一个子或 int 类型的位数,通过该值通常也可以判断系统是 32 位的还是 64 位的:
$ getconf WORD_BIT
32


获取 glib 版本号:
getconf GNU_LIBC_VERSION
glibc 2.14.1
获取 glib 更详细信息的方法是直接执行 /lib/libc.so.6 :
/lib/libc.so.6
GNU C Library stable release version 2.14.1 (20111007), by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Configured for i686-suse-linux.
Compiled by GNU CC version 4.6.2.
Compiled on a Linux 3.1.0 system on 2011-12-09.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    NoVersion patch for broken glibc 2.0 binaries
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2025-6-18 03:58 , Processed in 0.076084 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表