times(2) Linux man page
Name
times - get process times
Synopsis
#include <sys/times.h>
clock_t times(struct tms *buf);
Description
times() stores the current process times in the
struct tms that buf points to. The struct tms is as defined
in <sys/times.h>
:
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */
clock_t tms_cutime; /* user time of children */
clock_t tms_cstime; /* system time of children */
};
The tms_utime field contains the CPU time spent executing
instructions of the calling process. The tms_stime field contains the CPU
time spent in the system while executing tasks on behalf of the calling process.
The tms_cutime field contains the sum of the tms_utime and
tms_cutime values for all waited-for terminated children. The
tms_cstime field contains the sum of the tms_stime and
tms_cstime values for all waited-for terminated children.
Times for terminated children (and their descendants) is added in at the
moment wait(2) or waitpid(2) returns their process ID. In particular,
times of grandchildren that the children did not wait for are never seen.
All times reported are in clock ticks.
Return Value
times() returns the number of
clock ticks that have elapsed since an arbitrary point in the past. For Linux
2.4 and earlier this point is the moment the system was booted. Since Linux 2.6,
this point is (2^32/HZ) - 300 (i.e., about 429 million) seconds before
system boot time. The return value may overflow the possible range of type
clock_t. On error, (clock_t) -1 is returned, and errno is
set appropriately.
Notes
The number of clock ticks per second can be obtained using
sysconf(_SC_CLK_TCK);
In POSIX-1996 the symbol CLK_TCK
(defined in <time.h>) is
mentioned as obsolescent. It is obsolete now.
In Linux kernel versions before 2.6.9, if the disposition of SIGCHLD
is set to SIG_IGN then the times of terminated children are automatically
included in the tms_cstime
相关文档:
单用户模式进入:
进入启动画面之后,敲入“e”,光标移动到kernel ...那一行,再敲入“e”,在kernel 一行的最后加上空格single,回车
敲入“b”,启动系统,即进入单用户模式
查看命令启动路径:
vi .bashrc
查看环境变量:
env
改变目录权限:
chmod -R +777 目录
查看自 ......
1.top
top命令可实时地显示Linux系统的进程、CPU、内存、负载等的信息。它是我们了解系统整体状态最好的工具。
top命令的运行状态是一个实时的显示过程,我们可在这个界面监控系统运行情况。我们可通过几个按键来控制top命令,如按q可退出top命令状态,按s可输入信息的更新频率等。这些命令可按h帮助键查询。
2.Ps ......
分享一下我在网上看到的硬盘安装Linux 9.0的相关操作:
下面有两种安装方法.
<A>从dos安装.这方法可以不用软盘,比较方便.
<A.1> 得到dosutils目录
这个目录里有从dos安装和软盘安装的工具.一般都在第一个iso文件里.
在linux下可以这样装载iso文件.
mount -o loop valhalla-i386-disc1.iso /mnt/cdro ......
作者:北南南北
来自:LinuxSir.Org
摘要:本文是关于Linux操作系统主机名(hostname)的文档,对主要配置文件/etc/hosts进行简要的说明 ;另外对基配具工具hostname也进行了举例说明; 欢迎高手斧正,谢谢;
目录
2.1 主机名配置文件 /etc/hosts解说;
2.2 主机名(hostname)和域名(Domain)的区别;
......
网络截包是一项很有意思的课题,可以有数据过滤,防火墙,流量控制,报文篡改等诸多应用,按照内核分层架构将一些截包方法不完全整理如下,欢迎补充。
1、 L1层驱动截包法
在驱动中下手应该可以说是最贴近底层的,网卡驱动中总有rx接收和xmit发送函数,参数总是sk_buffer,在这里修改很黄很暴力,而且 ......