SHARE
TWEET

Untitled

a guest Jun 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. char line[128];
  2.   int io;
  3.   FILE *fp = fopen("/proc/diskstats", "r");
  4.  
  5.    while(fgets(line, sizeof line, fp)) {
  6.        fputs(line, stdout);
  7.        if(dev_t_conversion(line) == get_file_devid("/")) {
  8.             sscanf(line, "%*dt%d", &io);
  9.             printf("%dn", io);
  10.             fclose(fp);
  11.         }
  12.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top