How can i get this info ? or how can i get this via KProcess and top command, because
Qt Code:
KProcess p; p->start();To copy to clipboard, switch view to plain text mode
and readAllStandardOutput() doesn't work.
How can i get this info ? or how can i get this via KProcess and top command, because
Qt Code:
KProcess p; p->start();To copy to clipboard, switch view to plain text mode
and readAllStandardOutput() doesn't work.
Last edited by jpn; 15th January 2008 at 17:18. Reason: missing [code] tags
The process works in an asynchronous way. You can start it and immediately read the result - it's not there. Connect to a proper signal instead.
i konw that. I have error "top: failed tty get" . Any idea?
Apparently it needs a real terminal. Try using uptime instead of top or parse /proc/stat yourself.
Bookmarks