How to remove the summary at the beginning of the “top” command in Linux?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I used top -b -n 2 | awk 'if ($9 != 0.0) print $0,sed -n '8,20p''>>text.txt
, then the output is :



top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


I wish to get the output like below (which means the header is not printed):



 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


Can anyone suggest a solution?










share|improve this question




























    1















    I used top -b -n 2 | awk 'if ($9 != 0.0) print $0,sed -n '8,20p''>>text.txt
    , then the output is :



    top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
    Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
    KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
    KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
    1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
    1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
    1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
    2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
    2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
    top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
    Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
    KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
    KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
    1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
    1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
    1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
    2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
    2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


    I wish to get the output like below (which means the header is not printed):



     PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
    1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
    1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
    1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
    2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
    2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
    1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
    1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
    1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
    1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
    2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
    2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


    Can anyone suggest a solution?










    share|improve this question


























      1












      1








      1








      I used top -b -n 2 | awk 'if ($9 != 0.0) print $0,sed -n '8,20p''>>text.txt
      , then the output is :



      top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
      Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
      %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
      KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
      KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
      top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
      Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
      %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
      KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
      KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


      I wish to get the output like below (which means the header is not printed):



       PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


      Can anyone suggest a solution?










      share|improve this question
















      I used top -b -n 2 | awk 'if ($9 != 0.0) print $0,sed -n '8,20p''>>text.txt
      , then the output is :



      top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
      Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
      %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
      KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
      KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
      top - 16:24:42 up 3:49, 3 users, load average: 0.23, 0.29, 0.31
      Threads: 503 total, 2 running, 501 sleeping, 0 stopped, 0 zombie
      %Cpu(s): 9.7 us, 1.6 sy, 0.0 ni, 88.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
      KiB Mem: 3938668 total, 2148708 used, 1789960 free, 133524 buffers
      KiB Swap: 3903484 total, 0 used, 3903484 free. 822904 cached Mem

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


      I wish to get the output like below (which means the header is not printed):



       PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash
      1054 root 20 0 258664 3524 2692 S 0.5 0.1 0:00.00 rsyslogd
      1086 root 20 0 258664 3524 2692 S 0.4 0.1 0:00.03 in:imuxsock
      1087 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.00 in:imklog
      1090 root 20 0 258664 3524 2692 S 0.3 0.1 0:00.05 rs:main Q:Reg
      2452 fpiat 20 0 25292 7520 3580 S 0.3 0.2 0:00.69 bash
      2495 fpiat 20 0 25088 6988 3256 S 0.3 0.2 0:00.05 bash


      Can anyone suggest a solution?







      linux awk sed top






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 14 at 15:28









      Jeff Schaller

      40.1k1054126




      40.1k1054126










      asked Jan 11 at 1:53









      Shi Jie TioShi Jie Tio

      1343




      1343




















          3 Answers
          3






          active

          oldest

          votes


















          2














          The top command is intended for interactive use. To get the output you want in a programmatic way, you might consider using ps instead, which can give most of the same information but it is more script-friendly.



          Example:



          $ ps -eo pid,uid,pri,nice,vsz,rss,s,%cpu,%mem,time,comm | head
          PID UID PRI NI VSZ RSS S %CPU %MEM TIME COMMAND
          1 0 19 0 186380 9608 S 0.0 0.0 00:01:15 systemd
          2 0 19 0 0 0 S 0.0 0.0 00:00:00 kthreadd
          3 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_gp
          4 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_par_gp
          6 0 39 -20 0 0 I 0.0 0.0 00:00:00 kworker/0:0H-kblockd
          8 0 39 -20 0 0 I 0.0 0.0 00:00:00 mm_percpu_wq
          9 0 19 0 0 0 S 0.0 0.0 00:00:19 ksoftirqd/0
          10 0 41 - 0 0 I 0.0 0.0 00:02:20 rcu_preempt
          11 0 41 - 0 0 S 0.0 0.0 00:00:24 rcuc/0


          Notice how the only field missing is SHR. (I couldn't find out how to get ps to print it.)






          share|improve this answer


















          • 1





            On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

            – JdeBP
            Jan 11 at 9:14











          • @JdeBP Okay, how well is that working for OP?

            – cryptarch
            Jan 11 at 10:30











          • @JdeBP I mean, if you think you have a better Answer ... where is it?

            – cryptarch
            Jan 11 at 10:33











          • You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

            – JdeBP
            Jan 11 at 12:20











          • @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

            – cryptarch
            Jan 11 at 12:39


















          2














          command:top -b -n1| sed -n '/PID/,$p'



          output



          ux_example ~]# top -b -n1| sed -n '/PID/,$p'
          PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
          7 root RT 0 0 0 0 S 1.7 0.0 0:01.04 migration/1
          1 root 20 0 19356 1564 1252 S 0.0 0.1 0:07.96 init
          2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
          3 root RT 0 0 0 0 S 0.0 0.0 0:03.46 migration/0
          4 root 20 0 0 0 0 S 0.0 0.0 0:01.84 ksoftirqd/0
          5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
          6 root RT 0 0 0 0 S 0.0 0.0 1:58.23 watchdog/0
          8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
          9 root 20 0 0 0 0 S 0.0 0.0 0:02.87 ksoftirqd/1
          10 root RT 0 0 0 0 S 0.0 0.0 2:10.65 watchdog/1
          11 root RT 0 0 0 0 S 0.0 0.0 0:02.42 migration/2
          12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
          13 root 20 0 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/2
          14 root RT 0 0 0 0 S 0.0 0.0 1:55.75 watchdog/2
          15 root RT 0 0 0 0 S 0.0 0.0 0:01.03 migration/3
          16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
          17 root 20 0 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd/3
          18 root RT 0 0 0 0 S 0.0 0.0 1:58.07 watchdog/3
          19 root 20 0 0 0 0 S 0.0 0.0 0:14.40 events/0
          20 root 20 0 0 0 0 S 0.0 0.0 3:52.96 events/1
          21 root 20 0 0 0 0 S 0.0 0.0 0:16.77 events/2
          22 root 20 0 0 0 0 S 0.0 0.0 1:34.48 events/3
          23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
          24 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khelper
          25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
          26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
          27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
          28 root 20 0 0 0 0 S 0.0 0.0 0:07.44 sync_supers
          29 root 20 0 0 0 0 S 0.0 0.0 0:03.43 bdi-default
          30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
          31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/1
          32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/2
          33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/3
          34 root 20 0 0 0 0 S 0.0 0.0 0:02.02 kblockd/0
          35 root 20 0 0 0 0 S 0.0 0.0 0:01.02 kblockd/1
          36 root 20 0 0 0 0 S 0.0 0.0 0:07.83 kblockd/2
          37 root 20 0 0 0 0 S 0.0 0.0 0:22.51 kblockd/3
          38 root 20 0 0 0 0 S 0.0 0.0 0:





          share|improve this answer






























            0














            The various components of the Summary Area can be enabled or disabled as follows:



             Summary-Area-defaults
            'l' - Load Avg/Uptime On (thus program name)
            't' - Task/Cpu states On (1+1 lines, see '1')
            'm' - Mem/Swap usage On (2 lines worth)
            '1' - Single Cpu On (thus 1 line if smp)


            To disable all of them, start top then press each of the m, l and t keys until those lines disappear (some of them cycle through a few modes, rather than being simple on-off toggles). Then save your changes to .toprc with W.



            After that, top -b -n 1 will show only a blank line, the column header line, and the individual lines for each process.



            The configuration file is, for the most part, human-readable, so you could edit it directly, but it doesn't appear to be designed for that. (Notably, the fieldscur field contains characters from outside the usual ASCII range.) The parts you want to disable are all represented by bits in the winflags entry, but the exact values (as well as the location of the config file) may vary between different versions.






            share|improve this answer
























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493852%2fhow-to-remove-the-summary-at-the-beginning-of-the-top-command-in-linux%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              The top command is intended for interactive use. To get the output you want in a programmatic way, you might consider using ps instead, which can give most of the same information but it is more script-friendly.



              Example:



              $ ps -eo pid,uid,pri,nice,vsz,rss,s,%cpu,%mem,time,comm | head
              PID UID PRI NI VSZ RSS S %CPU %MEM TIME COMMAND
              1 0 19 0 186380 9608 S 0.0 0.0 00:01:15 systemd
              2 0 19 0 0 0 S 0.0 0.0 00:00:00 kthreadd
              3 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_gp
              4 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_par_gp
              6 0 39 -20 0 0 I 0.0 0.0 00:00:00 kworker/0:0H-kblockd
              8 0 39 -20 0 0 I 0.0 0.0 00:00:00 mm_percpu_wq
              9 0 19 0 0 0 S 0.0 0.0 00:00:19 ksoftirqd/0
              10 0 41 - 0 0 I 0.0 0.0 00:02:20 rcu_preempt
              11 0 41 - 0 0 S 0.0 0.0 00:00:24 rcuc/0


              Notice how the only field missing is SHR. (I couldn't find out how to get ps to print it.)






              share|improve this answer


















              • 1





                On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

                – JdeBP
                Jan 11 at 9:14











              • @JdeBP Okay, how well is that working for OP?

                – cryptarch
                Jan 11 at 10:30











              • @JdeBP I mean, if you think you have a better Answer ... where is it?

                – cryptarch
                Jan 11 at 10:33











              • You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

                – JdeBP
                Jan 11 at 12:20











              • @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

                – cryptarch
                Jan 11 at 12:39















              2














              The top command is intended for interactive use. To get the output you want in a programmatic way, you might consider using ps instead, which can give most of the same information but it is more script-friendly.



              Example:



              $ ps -eo pid,uid,pri,nice,vsz,rss,s,%cpu,%mem,time,comm | head
              PID UID PRI NI VSZ RSS S %CPU %MEM TIME COMMAND
              1 0 19 0 186380 9608 S 0.0 0.0 00:01:15 systemd
              2 0 19 0 0 0 S 0.0 0.0 00:00:00 kthreadd
              3 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_gp
              4 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_par_gp
              6 0 39 -20 0 0 I 0.0 0.0 00:00:00 kworker/0:0H-kblockd
              8 0 39 -20 0 0 I 0.0 0.0 00:00:00 mm_percpu_wq
              9 0 19 0 0 0 S 0.0 0.0 00:00:19 ksoftirqd/0
              10 0 41 - 0 0 I 0.0 0.0 00:02:20 rcu_preempt
              11 0 41 - 0 0 S 0.0 0.0 00:00:24 rcuc/0


              Notice how the only field missing is SHR. (I couldn't find out how to get ps to print it.)






              share|improve this answer


















              • 1





                On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

                – JdeBP
                Jan 11 at 9:14











              • @JdeBP Okay, how well is that working for OP?

                – cryptarch
                Jan 11 at 10:30











              • @JdeBP I mean, if you think you have a better Answer ... where is it?

                – cryptarch
                Jan 11 at 10:33











              • You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

                – JdeBP
                Jan 11 at 12:20











              • @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

                – cryptarch
                Jan 11 at 12:39













              2












              2








              2







              The top command is intended for interactive use. To get the output you want in a programmatic way, you might consider using ps instead, which can give most of the same information but it is more script-friendly.



              Example:



              $ ps -eo pid,uid,pri,nice,vsz,rss,s,%cpu,%mem,time,comm | head
              PID UID PRI NI VSZ RSS S %CPU %MEM TIME COMMAND
              1 0 19 0 186380 9608 S 0.0 0.0 00:01:15 systemd
              2 0 19 0 0 0 S 0.0 0.0 00:00:00 kthreadd
              3 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_gp
              4 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_par_gp
              6 0 39 -20 0 0 I 0.0 0.0 00:00:00 kworker/0:0H-kblockd
              8 0 39 -20 0 0 I 0.0 0.0 00:00:00 mm_percpu_wq
              9 0 19 0 0 0 S 0.0 0.0 00:00:19 ksoftirqd/0
              10 0 41 - 0 0 I 0.0 0.0 00:02:20 rcu_preempt
              11 0 41 - 0 0 S 0.0 0.0 00:00:24 rcuc/0


              Notice how the only field missing is SHR. (I couldn't find out how to get ps to print it.)






              share|improve this answer













              The top command is intended for interactive use. To get the output you want in a programmatic way, you might consider using ps instead, which can give most of the same information but it is more script-friendly.



              Example:



              $ ps -eo pid,uid,pri,nice,vsz,rss,s,%cpu,%mem,time,comm | head
              PID UID PRI NI VSZ RSS S %CPU %MEM TIME COMMAND
              1 0 19 0 186380 9608 S 0.0 0.0 00:01:15 systemd
              2 0 19 0 0 0 S 0.0 0.0 00:00:00 kthreadd
              3 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_gp
              4 0 39 -20 0 0 I 0.0 0.0 00:00:00 rcu_par_gp
              6 0 39 -20 0 0 I 0.0 0.0 00:00:00 kworker/0:0H-kblockd
              8 0 39 -20 0 0 I 0.0 0.0 00:00:00 mm_percpu_wq
              9 0 19 0 0 0 S 0.0 0.0 00:00:19 ksoftirqd/0
              10 0 41 - 0 0 I 0.0 0.0 00:02:20 rcu_preempt
              11 0 41 - 0 0 S 0.0 0.0 00:00:24 rcuc/0


              Notice how the only field missing is SHR. (I couldn't find out how to get ps to print it.)







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 11 at 4:10









              cryptarchcryptarch

              78011




              78011







              • 1





                On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

                – JdeBP
                Jan 11 at 9:14











              • @JdeBP Okay, how well is that working for OP?

                – cryptarch
                Jan 11 at 10:30











              • @JdeBP I mean, if you think you have a better Answer ... where is it?

                – cryptarch
                Jan 11 at 10:33











              • You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

                – JdeBP
                Jan 11 at 12:20











              • @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

                – cryptarch
                Jan 11 at 12:39












              • 1





                On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

                – JdeBP
                Jan 11 at 9:14











              • @JdeBP Okay, how well is that working for OP?

                – cryptarch
                Jan 11 at 10:30











              • @JdeBP I mean, if you think you have a better Answer ... where is it?

                – cryptarch
                Jan 11 at 10:33











              • You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

                – JdeBP
                Jan 11 at 12:20











              • @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

                – cryptarch
                Jan 11 at 12:39







              1




              1





              On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

              – JdeBP
              Jan 11 at 9:14





              On the contrary, the manual for GNU top explicitly says that the -b option is for sending output "to other programs".

              – JdeBP
              Jan 11 at 9:14













              @JdeBP Okay, how well is that working for OP?

              – cryptarch
              Jan 11 at 10:30





              @JdeBP Okay, how well is that working for OP?

              – cryptarch
              Jan 11 at 10:30













              @JdeBP I mean, if you think you have a better Answer ... where is it?

              – cryptarch
              Jan 11 at 10:33





              @JdeBP I mean, if you think you have a better Answer ... where is it?

              – cryptarch
              Jan 11 at 10:33













              You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

              – JdeBP
              Jan 11 at 12:20





              You are constructing a false dilemma, when you could instead be fixing your answer. Your answer begins with an outright denial of what the manual for the command specifically says about the way that the questioner is using it. This is not an auspicious beginning to an answer.

              – JdeBP
              Jan 11 at 12:20













              @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

              – cryptarch
              Jan 11 at 12:39





              @JdeBP If you want to help me improve my answer, simply nitpicking over the manual is not the way to go. From what is posted in the question, it would appear that the manual contradicts observables. In the question we see that despite the use of -b, top does not behave in a way that works well with other programs. I will defer to what can be observed. Again, you may feel encouraged to post an alternative Answer if your familiarity with top's manual furnishes you with some insight into how to do what is required without switching from top to ps.

              – cryptarch
              Jan 11 at 12:39













              2














              command:top -b -n1| sed -n '/PID/,$p'



              output



              ux_example ~]# top -b -n1| sed -n '/PID/,$p'
              PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
              7 root RT 0 0 0 0 S 1.7 0.0 0:01.04 migration/1
              1 root 20 0 19356 1564 1252 S 0.0 0.1 0:07.96 init
              2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
              3 root RT 0 0 0 0 S 0.0 0.0 0:03.46 migration/0
              4 root 20 0 0 0 0 S 0.0 0.0 0:01.84 ksoftirqd/0
              5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
              6 root RT 0 0 0 0 S 0.0 0.0 1:58.23 watchdog/0
              8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
              9 root 20 0 0 0 0 S 0.0 0.0 0:02.87 ksoftirqd/1
              10 root RT 0 0 0 0 S 0.0 0.0 2:10.65 watchdog/1
              11 root RT 0 0 0 0 S 0.0 0.0 0:02.42 migration/2
              12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
              13 root 20 0 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/2
              14 root RT 0 0 0 0 S 0.0 0.0 1:55.75 watchdog/2
              15 root RT 0 0 0 0 S 0.0 0.0 0:01.03 migration/3
              16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
              17 root 20 0 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd/3
              18 root RT 0 0 0 0 S 0.0 0.0 1:58.07 watchdog/3
              19 root 20 0 0 0 0 S 0.0 0.0 0:14.40 events/0
              20 root 20 0 0 0 0 S 0.0 0.0 3:52.96 events/1
              21 root 20 0 0 0 0 S 0.0 0.0 0:16.77 events/2
              22 root 20 0 0 0 0 S 0.0 0.0 1:34.48 events/3
              23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
              24 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khelper
              25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
              26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
              27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
              28 root 20 0 0 0 0 S 0.0 0.0 0:07.44 sync_supers
              29 root 20 0 0 0 0 S 0.0 0.0 0:03.43 bdi-default
              30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
              31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/1
              32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/2
              33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/3
              34 root 20 0 0 0 0 S 0.0 0.0 0:02.02 kblockd/0
              35 root 20 0 0 0 0 S 0.0 0.0 0:01.02 kblockd/1
              36 root 20 0 0 0 0 S 0.0 0.0 0:07.83 kblockd/2
              37 root 20 0 0 0 0 S 0.0 0.0 0:22.51 kblockd/3
              38 root 20 0 0 0 0 S 0.0 0.0 0:





              share|improve this answer



























                2














                command:top -b -n1| sed -n '/PID/,$p'



                output



                ux_example ~]# top -b -n1| sed -n '/PID/,$p'
                PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
                7 root RT 0 0 0 0 S 1.7 0.0 0:01.04 migration/1
                1 root 20 0 19356 1564 1252 S 0.0 0.1 0:07.96 init
                2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
                3 root RT 0 0 0 0 S 0.0 0.0 0:03.46 migration/0
                4 root 20 0 0 0 0 S 0.0 0.0 0:01.84 ksoftirqd/0
                5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
                6 root RT 0 0 0 0 S 0.0 0.0 1:58.23 watchdog/0
                8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
                9 root 20 0 0 0 0 S 0.0 0.0 0:02.87 ksoftirqd/1
                10 root RT 0 0 0 0 S 0.0 0.0 2:10.65 watchdog/1
                11 root RT 0 0 0 0 S 0.0 0.0 0:02.42 migration/2
                12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
                13 root 20 0 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/2
                14 root RT 0 0 0 0 S 0.0 0.0 1:55.75 watchdog/2
                15 root RT 0 0 0 0 S 0.0 0.0 0:01.03 migration/3
                16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
                17 root 20 0 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd/3
                18 root RT 0 0 0 0 S 0.0 0.0 1:58.07 watchdog/3
                19 root 20 0 0 0 0 S 0.0 0.0 0:14.40 events/0
                20 root 20 0 0 0 0 S 0.0 0.0 3:52.96 events/1
                21 root 20 0 0 0 0 S 0.0 0.0 0:16.77 events/2
                22 root 20 0 0 0 0 S 0.0 0.0 1:34.48 events/3
                23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
                24 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khelper
                25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
                26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
                27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
                28 root 20 0 0 0 0 S 0.0 0.0 0:07.44 sync_supers
                29 root 20 0 0 0 0 S 0.0 0.0 0:03.43 bdi-default
                30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
                31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/1
                32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/2
                33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/3
                34 root 20 0 0 0 0 S 0.0 0.0 0:02.02 kblockd/0
                35 root 20 0 0 0 0 S 0.0 0.0 0:01.02 kblockd/1
                36 root 20 0 0 0 0 S 0.0 0.0 0:07.83 kblockd/2
                37 root 20 0 0 0 0 S 0.0 0.0 0:22.51 kblockd/3
                38 root 20 0 0 0 0 S 0.0 0.0 0:





                share|improve this answer

























                  2












                  2








                  2







                  command:top -b -n1| sed -n '/PID/,$p'



                  output



                  ux_example ~]# top -b -n1| sed -n '/PID/,$p'
                  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
                  7 root RT 0 0 0 0 S 1.7 0.0 0:01.04 migration/1
                  1 root 20 0 19356 1564 1252 S 0.0 0.1 0:07.96 init
                  2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
                  3 root RT 0 0 0 0 S 0.0 0.0 0:03.46 migration/0
                  4 root 20 0 0 0 0 S 0.0 0.0 0:01.84 ksoftirqd/0
                  5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
                  6 root RT 0 0 0 0 S 0.0 0.0 1:58.23 watchdog/0
                  8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
                  9 root 20 0 0 0 0 S 0.0 0.0 0:02.87 ksoftirqd/1
                  10 root RT 0 0 0 0 S 0.0 0.0 2:10.65 watchdog/1
                  11 root RT 0 0 0 0 S 0.0 0.0 0:02.42 migration/2
                  12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
                  13 root 20 0 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/2
                  14 root RT 0 0 0 0 S 0.0 0.0 1:55.75 watchdog/2
                  15 root RT 0 0 0 0 S 0.0 0.0 0:01.03 migration/3
                  16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
                  17 root 20 0 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd/3
                  18 root RT 0 0 0 0 S 0.0 0.0 1:58.07 watchdog/3
                  19 root 20 0 0 0 0 S 0.0 0.0 0:14.40 events/0
                  20 root 20 0 0 0 0 S 0.0 0.0 3:52.96 events/1
                  21 root 20 0 0 0 0 S 0.0 0.0 0:16.77 events/2
                  22 root 20 0 0 0 0 S 0.0 0.0 1:34.48 events/3
                  23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
                  24 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khelper
                  25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
                  26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
                  27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
                  28 root 20 0 0 0 0 S 0.0 0.0 0:07.44 sync_supers
                  29 root 20 0 0 0 0 S 0.0 0.0 0:03.43 bdi-default
                  30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
                  31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/1
                  32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/2
                  33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/3
                  34 root 20 0 0 0 0 S 0.0 0.0 0:02.02 kblockd/0
                  35 root 20 0 0 0 0 S 0.0 0.0 0:01.02 kblockd/1
                  36 root 20 0 0 0 0 S 0.0 0.0 0:07.83 kblockd/2
                  37 root 20 0 0 0 0 S 0.0 0.0 0:22.51 kblockd/3
                  38 root 20 0 0 0 0 S 0.0 0.0 0:





                  share|improve this answer













                  command:top -b -n1| sed -n '/PID/,$p'



                  output



                  ux_example ~]# top -b -n1| sed -n '/PID/,$p'
                  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
                  7 root RT 0 0 0 0 S 1.7 0.0 0:01.04 migration/1
                  1 root 20 0 19356 1564 1252 S 0.0 0.1 0:07.96 init
                  2 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kthreadd
                  3 root RT 0 0 0 0 S 0.0 0.0 0:03.46 migration/0
                  4 root 20 0 0 0 0 S 0.0 0.0 0:01.84 ksoftirqd/0
                  5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
                  6 root RT 0 0 0 0 S 0.0 0.0 1:58.23 watchdog/0
                  8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
                  9 root 20 0 0 0 0 S 0.0 0.0 0:02.87 ksoftirqd/1
                  10 root RT 0 0 0 0 S 0.0 0.0 2:10.65 watchdog/1
                  11 root RT 0 0 0 0 S 0.0 0.0 0:02.42 migration/2
                  12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
                  13 root 20 0 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/2
                  14 root RT 0 0 0 0 S 0.0 0.0 1:55.75 watchdog/2
                  15 root RT 0 0 0 0 S 0.0 0.0 0:01.03 migration/3
                  16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
                  17 root 20 0 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd/3
                  18 root RT 0 0 0 0 S 0.0 0.0 1:58.07 watchdog/3
                  19 root 20 0 0 0 0 S 0.0 0.0 0:14.40 events/0
                  20 root 20 0 0 0 0 S 0.0 0.0 3:52.96 events/1
                  21 root 20 0 0 0 0 S 0.0 0.0 0:16.77 events/2
                  22 root 20 0 0 0 0 S 0.0 0.0 1:34.48 events/3
                  23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cgroup
                  24 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khelper
                  25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
                  26 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
                  27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
                  28 root 20 0 0 0 0 S 0.0 0.0 0:07.44 sync_supers
                  29 root 20 0 0 0 0 S 0.0 0.0 0:03.43 bdi-default
                  30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
                  31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/1
                  32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/2
                  33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/3
                  34 root 20 0 0 0 0 S 0.0 0.0 0:02.02 kblockd/0
                  35 root 20 0 0 0 0 S 0.0 0.0 0:01.02 kblockd/1
                  36 root 20 0 0 0 0 S 0.0 0.0 0:07.83 kblockd/2
                  37 root 20 0 0 0 0 S 0.0 0.0 0:22.51 kblockd/3
                  38 root 20 0 0 0 0 S 0.0 0.0 0:






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 11 at 18:32









                  Praveen Kumar BSPraveen Kumar BS

                  1,366138




                  1,366138





















                      0














                      The various components of the Summary Area can be enabled or disabled as follows:



                       Summary-Area-defaults
                      'l' - Load Avg/Uptime On (thus program name)
                      't' - Task/Cpu states On (1+1 lines, see '1')
                      'm' - Mem/Swap usage On (2 lines worth)
                      '1' - Single Cpu On (thus 1 line if smp)


                      To disable all of them, start top then press each of the m, l and t keys until those lines disappear (some of them cycle through a few modes, rather than being simple on-off toggles). Then save your changes to .toprc with W.



                      After that, top -b -n 1 will show only a blank line, the column header line, and the individual lines for each process.



                      The configuration file is, for the most part, human-readable, so you could edit it directly, but it doesn't appear to be designed for that. (Notably, the fieldscur field contains characters from outside the usual ASCII range.) The parts you want to disable are all represented by bits in the winflags entry, but the exact values (as well as the location of the config file) may vary between different versions.






                      share|improve this answer





























                        0














                        The various components of the Summary Area can be enabled or disabled as follows:



                         Summary-Area-defaults
                        'l' - Load Avg/Uptime On (thus program name)
                        't' - Task/Cpu states On (1+1 lines, see '1')
                        'm' - Mem/Swap usage On (2 lines worth)
                        '1' - Single Cpu On (thus 1 line if smp)


                        To disable all of them, start top then press each of the m, l and t keys until those lines disappear (some of them cycle through a few modes, rather than being simple on-off toggles). Then save your changes to .toprc with W.



                        After that, top -b -n 1 will show only a blank line, the column header line, and the individual lines for each process.



                        The configuration file is, for the most part, human-readable, so you could edit it directly, but it doesn't appear to be designed for that. (Notably, the fieldscur field contains characters from outside the usual ASCII range.) The parts you want to disable are all represented by bits in the winflags entry, but the exact values (as well as the location of the config file) may vary between different versions.






                        share|improve this answer



























                          0












                          0








                          0







                          The various components of the Summary Area can be enabled or disabled as follows:



                           Summary-Area-defaults
                          'l' - Load Avg/Uptime On (thus program name)
                          't' - Task/Cpu states On (1+1 lines, see '1')
                          'm' - Mem/Swap usage On (2 lines worth)
                          '1' - Single Cpu On (thus 1 line if smp)


                          To disable all of them, start top then press each of the m, l and t keys until those lines disappear (some of them cycle through a few modes, rather than being simple on-off toggles). Then save your changes to .toprc with W.



                          After that, top -b -n 1 will show only a blank line, the column header line, and the individual lines for each process.



                          The configuration file is, for the most part, human-readable, so you could edit it directly, but it doesn't appear to be designed for that. (Notably, the fieldscur field contains characters from outside the usual ASCII range.) The parts you want to disable are all represented by bits in the winflags entry, but the exact values (as well as the location of the config file) may vary between different versions.






                          share|improve this answer















                          The various components of the Summary Area can be enabled or disabled as follows:



                           Summary-Area-defaults
                          'l' - Load Avg/Uptime On (thus program name)
                          't' - Task/Cpu states On (1+1 lines, see '1')
                          'm' - Mem/Swap usage On (2 lines worth)
                          '1' - Single Cpu On (thus 1 line if smp)


                          To disable all of them, start top then press each of the m, l and t keys until those lines disappear (some of them cycle through a few modes, rather than being simple on-off toggles). Then save your changes to .toprc with W.



                          After that, top -b -n 1 will show only a blank line, the column header line, and the individual lines for each process.



                          The configuration file is, for the most part, human-readable, so you could edit it directly, but it doesn't appear to be designed for that. (Notably, the fieldscur field contains characters from outside the usual ASCII range.) The parts you want to disable are all represented by bits in the winflags entry, but the exact values (as well as the location of the config file) may vary between different versions.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jan 14 at 16:45

























                          answered Jan 14 at 16:17









                          JigglyNagaJigglyNaga

                          3,873932




                          3,873932



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493852%2fhow-to-remove-the-summary-at-the-beginning-of-the-top-command-in-linux%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown






                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay