Skip to main content

TOP command How to format automatically top output for logging?

added 83 characters in body
Source Link

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in mbm. It is presently showing in tbt. I am getting the above output with the below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

I even tried with small letter e, that doesn't convert for some of the processes.

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in mb. It is presently showing in tb. I am getting the above output with the below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in m. It is presently showing in t. I am getting the above output with the below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

I even tried with small letter e, that doesn't convert for some of the processes.

deleted 8 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in mb. It is presently showing in tb. I am getting the above output with the help of below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in mb. It is presently showing in tb. I am getting the above output with the help of below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

Currently my top command output is shown as:

14861 root      20   0  0.252t 0.028t    556 S  13.3 92.8   8:45.64

I want the display of this in mb. It is presently showing in tb. I am getting the above output with the below command:

top -b -p 14861 -n1 |tail -1

Is there any option to achieve the same. I will be writing this top output to a log using for loop. So I will not be able to do anything manually.

Source Link
Loading