mailRe: Command name as seen with 'top'


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Gary Thompson on September 03, 2007 - 10:54:
Edward d'Auvergne wrote:
Hi,

I'm not sure if this is possible.  However in certain versions of top
you can type 'c' and you will then get the full command line version
of the process.  For example:

  PID  PPID USER      PR  NI  VIRT  RES  SHR SWAP S %CPU %MEM    TIME+  
COMMAND
 5780  6092 edward    17   0 86240  11m 3016  72m R   95  0.6
0:01.90 python /home/edward/relax/relax-1.2/relax full_analysis.py

Apart from this, I don't know what else can be done.

Regards,

Edward


Hi
I guess the problem here is to be able to spot the relax program amongst all the other python instances on you system (this can a real pain if you use gnome as the panel is all python based ;-)) Ah just read the message properly this is what you want!

so here is a solution but not one we would want to apply to the relax distribution I guess ;-)

1. change to the relax directory
2. create a link to python which is in you path ln -s /usr/bin/python $HOME/bin/relax-python 3. edit the top of the relax python file at the top of the relax python distribution to point to the symbolic link you just created
4. happiness... (?):

garyt    17117 18898  0 09:09 pts/1    00:00:00 relax-python ./relax


now there are other methods to do this under unix / linux at a much more hacky level (basically if you change the string argv[0] this will change the name of you application) However, they appear to be horribly messy in all the versions i have seen so far (cf http://davyd.livejournal.com/166352.html)

regards
gary


On 9/2/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,

I would like to know if it would be possible to change the command name
from 'python' to 'relax' ? I'm talking here about the command name we
see when typing the command 'top' on Unix-like machines...

Here's an example of how it is now (Gentoo Linux, top belonging to
sys-process/procps-3.2.7) :


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   COMMAND
11684 semor     39  19 77844  72m 2484 R 96.5  8.2   1713:54  python

And now an example of how it could be :

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   COMMAND
11684 semor     39  19 77844  72m 2484 R 96.5  8.2   1713:54  relax

This would make it easier for people using a shared network. People not
familiar with relax or people not even knowing about relax would then
know more easily what process issued by their colleague takes so much of
their CPUs.

I don't know if I'm clear and also if this kind of modification is hard
to make for the relax code... I'm just asking in case it's an easy task...

Thanks !


Séb  :)

--
         ______________________________________
     _______________________________________________
    |                                               |
   || Sebastien Morin                               ||
  ||| Etudiant au PhD en biochimie                  |||
 |||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne                             |||||
 |||| CREFSIP (Universite Laval, Quebec, CANADA)    ||||
  ||| 1-418-656-2131 #4530                          |||
   ||                                               ||
    |_______________________________________________|
         ______________________________________



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

.



--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: garyt@xxxxxxxxxxxxxxx                   Fax  +44-113-2331407
-------------------------------------------------------------------





Related Messages


Powered by MHonArc, Updated Mon Sep 03 16:40:31 2007