View Full Version : current Cpu(s) usage info
swiety
15th January 2008, 14:04
How can i get this info ? or how can i get this via KProcess and top command, because
KProcess p;
p->setProgram( "top", QStringList() );
p->start();
and readAllStandardOutput() doesn't work.
wysota
15th January 2008, 15:39
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.
swiety
15th January 2008, 17:30
i konw that. I have error "top: failed tty get" . Any idea?
wysota
15th January 2008, 18:17
Apparently it needs a real terminal. Try using uptime instead of top or parse /proc/stat yourself.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.