免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2673 | 回复: 3
打印 上一主题 下一主题

内核文件acct.h中几个unused变量 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-02 14:23 |只看该作者 |倒序浏览
本帖最后由 yizhongchuanqi 于 2011-11-02 15:16 编辑

kernel中的acct.h文件里定义了一个结构体这里面的几个unused的变量什么时候可以用啊?有木有大侠知道的,小弟这种问题找不到合适的地方可以问所以发这来了
DESCRIPTION         top

       If the kernel is built with the process accounting option enabled
       (CONFIG_BSD_PROCESS_ACCT), then calling acct(2) starts process accounting, for
       example:

           acct("/var/log/pacct");

       When process accounting is enabled, the kernel writes a record to the
       accounting file as each process on the system terminates.  This record
       contains information about the terminated process, and is defined in
       <sys/acct.h> as follows:

           #define ACCT_COMM 16

           typedef u_int16_t comp_t;

           struct acct {
               char ac_flag;           /* Accounting flags */
               u_int16_t ac_uid;       /* Accounting user ID */
               u_int16_t ac_gid;       /* Accounting group ID */
               u_int16_t ac_tty;       /* Controlling terminal */
               u_int32_t ac_btime;     /* Process creation time
                                          (seconds since the Epoch) */
               comp_t    ac_utime;     /* User CPU time */
               comp_t    ac_stime;     /* System CPU time */
               comp_t    ac_etime;     /* Elapsed time */
               comp_t    ac_mem;       /* Average memory usage (kB) */
               comp_t    ac_io;        /* Characters transferred (unused) */
               comp_t    ac_rw;        /* Blocks read or written (unused) */

               comp_t    ac_minflt;    /* Minor page faults */
               comp_t    ac_majflt;    /* Major page faults */
              comp_t    ac_swaps;     /* Number of swaps (unused) */
               u_int32_t ac_exitcode;  /* Process termination status
                                          (see wait(2)) */
               char      ac_comm[ACCT_COMM+1];
                                       /* Command name (basename of last
                                          executed command; null-terminated) */
               char      ac_pad[X];    /* padding bytes */
           };
原文链接http://www.kernel.org/doc/man-pages/online/pages/man5/acct.5.html

论坛徽章:
0
2 [报告]
发表于 2011-11-02 16:06 |只看该作者
自己顶

论坛徽章:
0
3 [报告]
发表于 2011-11-02 16:19 |只看该作者
我也来帮你顶一下

论坛徽章:
0
4 [报告]
发表于 2011-11-03 09:26 |只看该作者
继续顶
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP