Changeset 591
- Timestamp:
- 05/14/07 18:37:57 (2 years ago)
- Files:
-
- trunk/src/vcd/methods/vx/vx_status.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vcd/methods/vx/vx_status.c
r589 r591 45 45 char *name; 46 46 xid_t xid; 47 int running = 0, nproc = 0, tasks = 0, thr_total = 0, thr_running= 0;48 int thr_unintr = 0, thr_onhold = 0,forks_total = 0, uptime = 0;47 int running = 0, thr_total = 0, thr_running = 0, thr_unintr = 0, thr_onhold = 0; 48 int forks_total = 0, uptime = 0; 49 49 char *load1m = NULL, *load5m = NULL, *load15m = NULL; 50 50 … … 63 63 if (errno == ESRCH) { 64 64 running = 0; 65 nproc = 0;66 tasks = 0;67 65 thr_total = 0; 68 66 thr_running = 0; … … 82 80 else { 83 81 vx_stat_t statb; 84 vx_limit_stat_t limnproc;85 86 limnproc.id = RLIMIT_NPROC;87 82 88 83 if (vx_stat(xid, &statb) == -1) 89 84 log_perror("vx_stat(%d)", xid); 90 85 91 else if (vx_limit_stat(xid, &limnproc) == -1)92 log_perror("vx_limit_stat(NPROC, %d)", xid);93 94 86 else { 95 87 running = 1; 96 nproc = (int) limnproc.value;97 tasks = statb.tasks;98 88 thr_total = statb.nr_threads; 99 89 thr_running = statb.nr_running; … … 109 99 110 100 response = xmlrpc_build_value(env, 111 "{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s: i,s:i,s:s,s:s,s:s}",101 "{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:s,s:s,s:s}", 112 102 "running", running, 113 "nproc", nproc,114 "tasks", tasks,115 103 "thr_total", thr_total, 116 104 "thr_running", thr_running,
