Lines Matching refs:proc
73 FILE *proc; in read_proc_uptime() local
75 proc = fopen("/proc/uptime", "r"); in read_proc_uptime()
76 if (proc == NULL) { in read_proc_uptime()
81 if (fscanf(proc, "%lu.%02lu", &up_sec, &up_nsec) != 2) { in read_proc_uptime()
89 fclose(proc); in read_proc_uptime()
98 FILE *proc; in read_proc_stat_btime() local
101 proc = fopen("/proc/stat", "r"); in read_proc_stat_btime()
102 if (proc == NULL) { in read_proc_stat_btime()
107 while (fgets(line_buf, 2048, proc)) { in read_proc_stat_btime()
110 fclose(proc); in read_proc_stat_btime()
115 fclose(proc); in read_proc_stat_btime()
119 fclose(proc); in read_proc_stat_btime()