Basically, I need to draw a graph over all running Linux Processes.
I followed below step's but looking out some best solution for this work.
Using Top command get all running process and redirect to a file, next then extract input from given file and draw Graph using some programming API.
This step's seem to be very tedious, Is there any other way to do this work in Linux itself. Please give a suggestion.
You should investigate the
/proc filesystem, it has the information you need in a matter that is easily accessible to a perl script.
There is some documentation available at http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
Of special interest to you is the "children" meta file, there is some documentation at https://lwn.net/Articles/475688/