Show
Ignore:
Timestamp:
10/04/07 17:16:55 (5 years ago)
Author:
andi
Message:

owi updates

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/openmct/packages/system/owi/src/sysinfo.c

    r468 r477  
    5858      /* Just print user list */ 
    5959      sysinfo_list(); 
     60   } else if (!strcmp(command, "process")) { 
     61      sysinfo_process(); 
    6062   } 
    6163 
     
    134136          "0"); 
    135137} 
     138 
     139/* \fn sysinfo_process() 
     140 * Show process 
     141 */ 
     142void sysinfo_process() { 
     143   int i = 0; 
     144 
     145   printf("<h3>%s</h3>\n" 
     146          "<table class=\"box\">\n" 
     147          "<tr>\n" 
     148          "<td>\n" 
     149          "<pre>\n", 
     150          SYSINFO_PROCESS_HEADLINE); 
     151 
     152   /* Execute command now */ 
     153   proc_open("/bin/ps"); 
     154   /* Loop through results */ 
     155   for (i = 0; i < file_line_counter; i++) { 
     156      printf("%s\n", file_line_get(i)); 
     157   } 
     158   file_free(); 
     159 
     160   printf("</pre>\n" 
     161          "</td>\n" 
     162          "</tr>\n" 
     163          "</table>\n"); 
     164 
     165 
     166    
     167}