File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2222#include < sys/resource.h> // getrusage
2323#include < dirent.h> // dirent
2424#include < iomanip> // setw
25+ #include < stdio.h>
26+ #include < errno.h>
2527#if defined(__APPLE__)
2628#include < libproc.h>
2729#include < sys/resource.h>
@@ -430,7 +432,12 @@ static bool read_proc_io(ProcIO* s) {
430432#if defined(OS_LINUX)
431433 butil::ScopedFILE fp (" /proc/self/io" , " r" );
432434 if (NULL == fp) {
433- PLOG_ONCE (WARNING) << " Fail to open /proc/self/io" ;
435+ static bool ever_printed_io_err = false ;
436+ if (!ever_printed_io_err) {
437+ fprintf (stderr, " WARNING: Fail to open /proc/self/io, errno=%d. "
438+ " I/O related bvars will be unavailable.\n " , errno);
439+ ever_printed_io_err = true ;
440+ }
434441 return false ;
435442 }
436443 errno = 0 ;
You can’t perform that action at this time.
0 commit comments