Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone tell me how I can tweak the following top command so that it always runs in Solaris mode in a batch mode operation?

top -d 3 -n 2 -b -p <PID>

I need 'top' to output a process' CPU usage that had already been divided by the total number of CPUs, and as far as I know, that can be achieved with the 'I' toggle (Irix mode), but it only seems to be available in interactive operation (not in batch operation).

So I was wondering if this is indeed the case, or does anyone know any workaround for what I intended to achieve?


PS. OS: RedHat Enterprise Linux 5.

share|improve this question
By the way, it's Irix or Solaris mode. – Dennis Williamson Sep 10 '09 at 1:41
up vote 2 down vote accepted

Put this in a file called $HOME/.toprc or edit the existing one so it has Mode_irixps=0 for off or Mode_irixps=1 for on:

    RCfile for "top with windows"  	# shameless braggin'
    Id:a, Mode_altscr=0, Mode_irixps=0, Delay_time=3.000, Curwin=0

Or you can set all your toggles, field selections and window settings in top the way you want them and press Shift +W to write the rc file for you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.