void MonProcessesGatherData(double *cf_this) { struct Item *userList = NULL; char vbuff[CF_BUFSIZE]; int numProcUsers = 0; int numRootProcs = 0; int numOtherProcs = 0; if (!GatherProcessUsers(&userList, &numProcUsers, &numRootProcs, &numOtherProcs)) { return; } cf_this[ob_users] += numProcUsers; cf_this[ob_rootprocs] += numRootProcs; cf_this[ob_otherprocs] += numOtherProcs; snprintf(vbuff,CF_MAXVARSIZE,"%s/state/cf_users",CFWORKDIR); MapName(vbuff); RawSaveItemList(userList,vbuff); DeleteItemList(userList); CfOut(cf_verbose,"","(Users,root,other) = (%d,%d,%d)\n",cf_this[ob_users],cf_this[ob_rootprocs],cf_this[ob_otherprocs]); }
void MonProcessesGatherData(double *cf_this) { Item *userList = NULL; int numProcUsers = 0; int numRootProcs = 0; int numOtherProcs = 0; if (!GatherProcessUsers(&userList, &numProcUsers, &numRootProcs, &numOtherProcs)) { return; } cf_this[ob_users] += numProcUsers; cf_this[ob_rootprocs] += numRootProcs; cf_this[ob_otherprocs] += numOtherProcs; char vbuff[CF_MAXVARSIZE]; xsnprintf(vbuff, sizeof(vbuff), "%s/cf_users", GetStateDir()); MapName(vbuff); RawSaveItemList(userList, vbuff, NewLineMode_Unix); DeleteItemList(userList); Log(LOG_LEVEL_VERBOSE, "(Users,root,other) = (%d,%d,%d)", (int) cf_this[ob_users], (int) cf_this[ob_rootprocs], (int) cf_this[ob_otherprocs]); }