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" |
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 */ |