/*ReturnresourceusageinformationonprocessindicatedbyWHOandputitin*USAGE.Returns0forsuccess,-1forfailure.*/externintgetrusage(__rusage_who_t__who,structrusage*__usage)__THROW;參數:who:可能選擇有RUSAGE_SELF:獲取當前進程的資" />

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

linux下getrusage()

系統 2065 0

#include <sys/resource.h>

/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;

參數: 

who:可能選擇有

  RUSAGE_SELF:獲取當前進程的資源使用信息。

  RUSAGE_CHILDREN:獲取子進程的資源使用信息。

usage:指向存放資源使用信息的結構指針

#include <bits/resources.>

/* Structure which says how much of each resource has been used. */
struct rusage
{
?/* Total amount of user time used. */
?struct timeval ru_utime;
?/* Total amount of system time used. */
?struct timeval ru_stime;
?/* Maximum resident set size (in kilobytes). */
?long int ru_maxrss;
?/* Amount of sharing of text segment memory
?with other processes (kilobyte-seconds). */
?long int ru_ixrss;
?/* Amount of data segment memory used (kilobyte-seconds). */
?long int ru_idrss;
?/* Amount of stack memory used (kilobyte-seconds). */
?long int ru_isrss;
?/* Number of soft page faults (i.e. those serviced by reclaiming
?a page from the list of pages awaiting reallocation. */
?long int ru_minflt;
?/* Number of hard page faults (i.e. those that required I/O). */
?long int ru_majflt;
?/* Number of times a process was swapped out of physical memory. */
?long int ru_nswap;
?/* Number of input operations via the file system. Note: This
?and `ru_oublock' do not include operations with the cache. */
?long int ru_inblock;
?/* Number of output operations via the file system. */
?long int ru_oublock;
?/* Number of IPC messages sent. */
?long int ru_msgsnd;
?/* Number of IPC messages received. */
?long int ru_msgrcv;
?/* Number of signals delivered. */
long int ru_nsignals;
/* Number of voluntary context switches, i.e. because the process
gave up the process before it had to (usually to wait for some
resource to be available). */
long int ru_nvcsw;
/* Number of involuntary context switches, i.e. a higher priority process

became runnable or the current process used up its time slice. */
?long int ru_nivcsw;
?};

?

linux下getrusage()


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 精品一区二区久久久久久久网站 | 操网址| 欧美日韩亚洲区久久综合 | 四色成人 | 日本不卡三区 | 日韩欧美一区二区久久 | 亚洲精品一区二区三区中文字幕 | xxxxbbbb欧美| 久久中文字幕不卡一二区 | 国产123区 | 五月综合色 | 国产亚洲精品成人a在线 | 欧美一级毛片特黄黄 | 91大神在线精品视频一区 | 久草加勒比 | 爱爱99| 久久在线一区 | 亚洲综合久久久久久888 | 国产精品一区伦免视频播放 | 欧美日韩国产另类一区二区三区 | 久久在线中文字幕 | 色久综合网 | 国产午夜视频在线观看第四页 | 老子理论不卡影院6080 | 久久麻豆精品 | 特级一级黄色片 | 亚洲欧美一区二区三区麻豆 | 亚洲香蕉国产高清在线播放 | 色播播影院 | 99热最新在线观看 | 一级毛片免费在线观看网站 | 中文字幕一区二区日产乱码 | 四虎884| 99国产成人高清在线视频 | 一 级做人爱全视频在线看 一a级毛片 | 国产综合精品久久久久成人影 | 国产精品久久久久久免费播放 | 国产亚洲美女精品久久久 | 免费在线看h | 天天干天天舔 | 精品免费视在线视频观看 |