System Information Using C/C++


What would be the header files and the suitable codes required for generating system calls in C++ for the below mentioned purposes:-
a. Number of Processes running in the system
b. Number of Zombie Processes in the system
c. Details of each of the processes:
d. Process Name,
e. Process Class (Time sharing class, real-time class, etc.),
f. Process State (sleeping, running, waiting for IO, etc),
g. Process Priority,
h. % of CPU Used
i. CPU Time used by the process in User, Kernel
j. Number of file descriptors opened by the process
k. Listing of Opened files, sockets, pipes, devices
l. Virtual address map of the libraries, files
m. Signals pending, blocked on the process
n. Stack trace of the process or threads


PLS DO reply . ANy reference to any site would be immensely helpful where i can view such sample codes . This is exclusively for windows enviornment system.

Here is how to get a list of processes in MS-Windows. Don't know how to get the rest of the info you need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.