Guest User

Untitled

a guest
May 24th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Including glibtop in linux CPU load
  2. `#include "stdio.h"
  3. #include "glibtop.h"
  4. #include "glibtop/cpu.h"
  5.  
  6. int main(){
  7. glibtop_init();
  8. glibtop_cpu cpu;
  9. glibtop_get_cpu (&cpu);
  10. printf("CPU TYPE INFORMATIONS nn"
  11. "Cpu Total : %ld n"
  12. "Cpu User : %ld n"
  13. "Cpu Nice : %ld n"
  14. "Cpu Sys : %ld n"
  15. "Cpu Idle : %ld n"
  16. "Cpu Frequences : %ld n",
  17. (unsigned long)cpu.total,
  18. (unsigned long)cpu.user,
  19. (unsigned long)cpu.nice,
  20. (unsigned long)cpu.sys,
  21. (unsigned long)cpu.idle,
  22. (unsigned long)cpu.frequency);
  23. return 0;
  24. }`
  25.  
  26. cpuLoad.c:2:21: error: glibtop.h: No such file or directory
  27. In file included from cpuLoad.c:3:
  28. glibtop/cpu.h:25:21: error: glibtop.h: No such file or directory
  29. glibtop/cpu.h:26:28: error: glibtop/global.h: No such file or directory
  30. In file included from cpuLoad.c:3:
  31. glibtop/cpu.h:59: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtypedefâ
  32. glibtop/cpu.h:63: error: expected specifier-qualifier-list before âguint64â
  33. glibtop/cpu.h:84: error: expected â)â before â*â token
  34. glibtop/cpu.h:92: error: expected â)â before â*â token
  35. glibtop/cpu.h:98: error: expected â)â before â*â token
  36. glibtop/cpu.h:99: error: expected â)â before â*â token
  37. cpuLoad.c:9: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâ
Advertisement
Add Comment
Please, Sign In to add comment