| | |
About /proc/stat ???
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
Hi,
I want to make some kind of monitor for my PC and i want to have CPU load in form like "top" (something% , ex 23%).
So i use C and : i'm opening the file /proc/stat and read the first line :
cpu 92208 2282668 19432 79824 739 1441 3304
the first is user, nice , system ...
So does anyone knows how this things can show me the percentage of CPU usage like "top" does?
thanks
I want to make some kind of monitor for my PC and i want to have CPU load in form like "top" (something% , ex 23%).
So i use C and : i'm opening the file /proc/stat and read the first line :
cpu 92208 2282668 19432 79824 739 1441 3304
the first is user, nice , system ...
So does anyone knows how this things can show me the percentage of CPU usage like "top" does?
thanks
![]() |
Similar Threads
- plotting cpu and mem consumption (C++)
- "Virus Alert" on my taskbar!! (Viruses, Spyware and other Nasties)
Other Threads in the C Forum
- Previous Thread: Serial communication using DEV CPP IDE 4.9.9.2
- Next Thread: system command not working in C functions.pls help
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file fork forloop framework function functions givemetehcodez grade graphics gtkwinlinux hacking histogram homework inches include incrementoperators input intmain() iso kernel keyboard km lazy license linked linkedlist linux list lists locate logical_drives looping loopinsideloop. lowest matrix microsoft mqqueue number oddnumber odf opendocumentformat opensource overwrite owf pdf performance pointer posix problem probleminc process program programming radix recursion recv recvblocked research reversing scanf scripting segmentationfault sequential socket spoonfeeding standard string student systemcall testing threads turboc unix user variable wab whythiscodecausesegmentationfault windowsapi





