Changeset 42899
- Timestamp:
- Jun 18, 2025, 8:13:15 AM (13 months ago)
- Location:
- tags/ipp-unions-20250528/Ohana/src/opihi
- Files:
-
- 2 edited
-
pantasks/controller_hoststats.c (modified) (2 diffs)
-
pcontrol/hoststats.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-unions-20250528/Ohana/src/opihi/pantasks/controller_hoststats.c
r42897 r42899 3 3 int controller_hoststats (int argc, char **argv) { 4 4 5 int status;5 int N, status; 6 6 char command[1024]; 7 7 IOBuffer buffer; 8 9 int Reset = FALSE; 10 if ((N = get_argument (argc, argv, "-reset"))) { 11 remove_argument (N, &argc, argv); 12 Reset = TRUE; 13 } 8 14 9 15 if (argc != 2) { … … 21 27 22 28 // XXX this has an error? test this out... 23 sprintf (command, "hoststats %s", argv[1]); 29 if (Reset) { 30 sprintf (command, "hoststats %s -reset", argv[1]); 31 } else { 32 sprintf (command, "hoststats %s", argv[1]); 33 } 24 34 InitIOBuffer (&buffer, 0x100); 25 35 -
tags/ipp-unions-20250528/Ohana/src/opihi/pcontrol/hoststats.c
r42897 r42899 3 3 int hoststats (int argc, char **argv) { 4 4 5 int i ;5 int i, N; 6 6 Stack *stack; 7 7 Host *host; 8 8 9 int Reset = FALSE; 10 if ((N = get_argument (argc, argv, "-reset"))) { 11 remove_argument (N, &argc, argv); 12 Reset = TRUE; 13 } 14 9 15 if (argc != 2) { 10 gprint (GP_ERR, "USAGE: hoststats (stack) \n");16 gprint (GP_ERR, "USAGE: hoststats (stack) [-reset]\n"); 11 17 gprint (GP_ERR, " (stack) : all, idle, busy, done, down, off, resp\n"); 12 18 return (FALSE); … … 26 32 host = stack[0].object[i]; 27 33 gprint (GP_LOG, "%lld %s %d : %f %d %d %d\n", host[0].HostID, host[0].hostname, host[0].pid, host[0].read_time, host[0].read_N_Pclient, host[0].read_N_GetJobOutput, host[0].N_jobs_total); 34 if (Reset) { 35 host[0].read_time = 0.0; 36 host[0].read_N_Pclient = 0; 37 host[0].read_N_GetJobOutput = 0; 38 host[0].N_jobs_total = 0; 39 } 28 40 } 29 41 UnlockStack (stack);
Note:
See TracChangeset
for help on using the changeset viewer.
