How can i get this info ? or how can i get this via KProcess and top command, because
and readAllStandardOutput() doesn't work.
Printable View
How can i get this info ? or how can i get this via KProcess and top command, because
and readAllStandardOutput() doesn't work.
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.