Results 1 to 6 of 6

Thread: Using top with custom configuration files

  1. #1
    Join Date
    Jun 2012
    Beans
    190

    Using top with custom configuration files

    I'm starting to use top alongside htop as a system monitor,I see it has many options amongst which the possibility of saving the actual layout to a .toprc file by pressing W : I was wondering if it was somehow possible to save multiple configuration files in order to use top with different layouts without having to rearrange it every time?

  2. #2
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Using top with custom configuration files

    From the man page

    while top is referred to throughout this document, you are free to name the program anything you wish. That new name, possibly an alias, will then be reflected on top’s display and used when reading and writing a configuration file.

    http://manpages.ubuntu.com/manpages/...an1/top.1.html

  3. #3
    Join Date
    Jun 2012
    Beans
    190

    Re: Using top with custom configuration files

    Sorry,I've read that but still don't get it:how do I rename top? I've tried to alias it to top1,but then all I'm getting when I save a new config file is that the old configuration is overwritten.

  4. #4
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Using top with custom configuration files

    5b. PERSONAL Configuration File
    This file is written as '$HOME/.your-name-4-top' + 'rc'. Use the 'W' interactive command to create it or update it. Here is the general layout: global # line 1: the program name/alias notation " # line 2: id,altscr,irixps,delay,curwin per ea # line a: winname,fieldscur window # line b: winflags,sortindx,maxtasks " # line c: summclr,msgsclr,headclr,taskclr
    If the $HOME variable is not present, top will try to write the personal configuration file to the current directory, subject to permissions.
    http://linux.die.net/man/1/top


    http://www.linkedin.com/answers/tech...40403-48617410


    https://www.google.com/search?q=conf...w=1024&bih=644

  5. #5
    Join Date
    Dec 2008
    Location
    Ghaziabad, India
    Beans
    102
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Using top with custom configuration files

    You can link top with some other name. For example,

    Code:
    ln -s /usr/bin/top topsy
    ./topsy
    Now, top is started with the name topsy, which is shown in top left corner. When you give the W command, the settings are saved in $HOME/.topsyrc. When topsy is run next time, it reads settings from this file.

  6. #6
    Join Date
    Jun 2012
    Beans
    190

    Re: Using top with custom configuration files

    Perfect,thank you very much.

Tags for this Thread

Bookmarks

Posting Permissions

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