Here's the deal, I got some knowledge on C, but now some processes stuff have come in which is pretty new. I've figured much of the problem, but im wondering is there anyway to get the processes info display as below, especially the one in Blue. I did a system ("ps -al"); and got the one way below, but i dont seem to find anything on the man pages to do that sort that's in blue, is it doable?:
Got this with system("ps -al");Code:./prog2a: Printing System Process chart using "ps -al" F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 S 1000 3879 3099 0 78 0 - 331 schedu tty2 00:00:00 script 1 S 1000 3880 3879 0 77 0 - 364 schedu tty2 00:00:00 script ## Next line is the parent process ## 0 R 1000 3888 3881 0 79 0 - 325 - pts/0 00:00:00 prog2a ## Next line is the child process ## 1 S 1000 3889 3888 0 79 0 - 325 clock_ pts/0 00:00:00 prog2a 0 R 1000 3890 3888 0 82 0 - 626 - pts/0 00:00:00 ps
Code:F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 S 4888 11415 11315 0 80 0 - 1325 - pts/0 00:00:00 ssh 0 S 4888 11440 11422 0 80 0 - 1325 - pts/1 00:00:00 ssh 0 R 4888 11600 11463 0 80 0 - 390 - pts/2 00:00:00 l 1 R 4888 11601 11600 0 80 0 - 391 - pts/2 00:00:00 l 0 R 4888 11602 11601 0 80 0 - 443 - pts/2 00:00:00 sh 0 R 4888 11603 11602 0 80 0 - 607 - pts/2 00:00:00 ps