简体   繁体   中英

How to create a running process graph in Linux

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM