Welcome to the VirtuQ Forums.
Results 1 to 5 of 5

Thread: pstree command

  1. #1
    Member
    Join Date
    Oct 2011
    Location
    Allahabad, India
    Posts
    245

    pstree command

    Hi,

    I was going through section 3.3 of Unix Shell Interface(contd)-2 and understanding the working of pstree command and working on lab in parallel.
    When I typed command pstree <PID>, for e.g. pstree 1451 and press enter then it gave output
    ... ... ... ... ... ...
    basha^ : : : :a : : : : a : : : : pstree

    I am not able to understand what does it mean.

    anon 10020
    Last edited by anon10020; 04-10-2011 at 09:27 AM.

  2. #2
    VirtuQ™ Moderator
    Join Date
    Jul 2011
    Location
    Bangalore, India
    Posts
    1,044
    Blog Entries
    2
    Anon10020,

    There is clearly something which is wrong here. It could have something to do with the terminal emulator. Do you know which emulator you are running? In case not, do the following:
    1. Right-click on an empty area on the screen of your VM
    2. Choose Xterm
    3. Repeat pstree command in xterm


    Do you see proper output? In case not, please email a screenshot of what it is that you get at support@virtuq.com and we will take a look.

    Thanks,

    Anup

  3. #3
    Member
    Join Date
    Oct 2011
    Location
    Allahabad, India
    Posts
    245
    Hi,

    What is the difference in executing pstree command on xterm or any other terminal emulator?

    anon10020

  4. #4
    VirtuQ™ Moderator
    Join Date
    Jul 2011
    Location
    Bangalore, India
    Posts
    1,044
    Blog Entries
    2
    Okay, let me answer the terminal emulator part first. Some of the terminal emulators are not able to interpret all the character codes emitted by the programs. These special codes are what make the output appear in color etc. My initial guess was that this is what is causing it to mess up.

    Coming to pstree, it appears to be a case of mixed up locales (localization information or location specific information), fonts and pstree's preference for picking characters from that information. If you run xterm as:

    xterm -fn 9x15& and run pstree in there you will see that its output is proper. There are various hacks to get this fixed. However, the easiest is to tell pstree to use simple characters. Checkout the man page of pstree, but, you can try the following:

    pstree -G

    This was a good catch, thanks .

    Enjoy,

    Anup
    Last edited by anup; 05-10-2011 at 07:52 AM.

  5. #5
    Member
    Join Date
    Oct 2011
    Location
    Allahabad, India
    Posts
    245
    Hi,

    Thanks

    Regards
    Anon10020


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •