Yasmine Habib wrote:
How can i use a shell command inside a program or application? in
other words, i am writing a small scheduler that needs to get the
current cpu usage/utliization of a processor at a certain time. using
"top", "free", "vmstat" provide me with required information but just
as a display when used as a shell command. i need the code to be
written inside my scheduler.
You can try it out with the system( ) call. This will give you the
flexibility to run any command that u can run in the shell.
sandeep
Thank you
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/