Bug 6524 - yocto project tools latencytop cannot run in target
Summary: yocto project tools latencytop cannot run in target
Status: VERIFIED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M2
Assignee: Todor Minchev
QA Contact: Valentin Hangan
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-07-14 02:44 UTC by Chunrong Guo
Modified: 2015-08-28 11:27 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chunrong Guo 2014-07-14 02:44:44 UTC
I run YoctoProjectTools->lantencytop
and there is the following error log:
root@p1020rdb-pd:/# export TERM=xterm;export PATH=$PATH:/usr/local/sbin:/usr/sb
in:/sbin; cd; sudo latencytop
bash: sudo: command not found


I think "latencytop" should replace "sudo latencytop".
Comment 1 Saul Wold 2014-11-11 22:31:17 UTC
Can you confirm what image you installed?  sudo is not part of most images.  
ALso you are already running as root user so no need to use sudo.  Was there a 
specific script or something that you cut and pasted?
Comment 2 Chunrong Guo 2014-12-16 02:27:28 UTC
" initCmd ": set default value in classs LatencytopHandler.

I think "sudo " should be removed . 


public class LatencytopHandler extends DialogHandler {
     
    protected String changeTerm = "export TERM=xterm;";
    private static String initCmd="export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin; cd; sudo latencytop\r";
     
     @Override
     protected String getInitCmd() {
         return initCmd;
     }
     @Override
     protected String changeTerm() {
         return changeTerm;
     }
     @Override
     protected String getConnnectionName() {
         return IBaseConstants.CONNECTION_NAME_LATENCYTOP;                                                                        
     }
     @Override
     protected String getDialogTitle() {
         return IBaseConstants.DIALOG_TITLE_LATENCYTOP;
     }
Comment 3 Stephen K Jolley 2014-12-29 19:13:08 UTC
Information supplied
Comment 4 Stephen K Jolley 2014-12-29 19:13:42 UTC
See above
Comment 5 Saul Wold 2015-01-06 15:04:17 UTC
Where does that script come from?  Can change the line with sudo in it, to 
remove sudo reference?  The script does appear to be part of the Yocto Project.
Comment 6 Saul Wold 2015-01-06 18:35:54 UTC
see prior comment, can you remove the sudo from your script, that script does 
not seem to be part of the latencytop.
Comment 7 Richard Purdie 2015-02-12 22:08:44 UTC
This looks like it is an eclipse plugin issue, reclassifying
Comment 8 Todor Minchev 2015-02-13 08:58:53 UTC
The "sudo" call is done in the plugin, because latencytop requires root access to run. It mounts debugfs and writes to /proc/sys/kernel/latencytop and both of these require UID 0 permissions.
Comment 9 Todor Minchev 2015-06-16 21:56:47 UTC
The sudo call was removed from the latencytop command launch. By default the QEMU images generated by Yocto have only root user and also sudo is not included in all images.
Comment 10 Alexandru Roman 2015-08-28 11:27:26 UTC
Verified on luna-master: 45aa5c77523bdf051d548fff4305382942db2ebb