ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/process_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/process_stats.c (file contents):
Revision 1.1 by pajs, Tue Feb 18 19:28:30 2003 UTC vs.
Revision 1.3 by pajs, Sat Mar 1 02:12:59 2003 UTC

# Line 23 | Line 23
23   #endif
24  
25   #include <stdio.h>
26 #include "statgrab.h"
26   #include <stdlib.h>
27   #include <unistd.h>
28 + #include "statgrab.h"
29  
30   #ifdef SOLARIS
31   #include <procfs.h>
32   #include <limits.h>
33 #include <sys/types.h>
33   #include <dirent.h>
34   #include <string.h>
35   #define PROC_LOCATION "/proc"
# Line 61 | Line 60 | process_stat_t *get_process_stats(){
60                  if(atoi(dir_entry->d_name) == 0) continue;
61                  snprintf(filename, MAX_FILE_LENGTH, "/proc/%s/psinfo", dir_entry->d_name);
62  
64                printf("Filename : %s\n", filename);
63                  if((f=fopen(filename, "r"))==NULL){
64                          /* Open failed.. Process since vanished, or the path was too long.
65                           * Ah well, move onwards to the next one */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines