home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / source / Chap09 / NPTREE / UNIXPROG.C < prev   
Encoding:
C/C++ Source or Header  |  1996-04-15  |  339 b   |  24 lines

  1.  
  2.  
  3. #include <stdio.h>
  4.  
  5. #define    INTERVAL    1
  6.  
  7. // http://www.swcp.com/zan-bin/vmstat.cgi
  8.  
  9.  
  10. main ()
  11. {
  12.     char buff[100];
  13.  
  14.     printf ("Content-type: text/plain%c%c", 10,10);
  15.     fflush (stdout);
  16.  
  17.     printf ("VMSTAT %d second intervals.\n", INTERVAL);
  18.     fflush (stdout);
  19.  
  20.     sprintf (buff, "vmstat %d 2",INTERVAL);
  21.     
  22.     system (buff); 
  23. }
  24.