The “most sensible” command unearths the method operating within the running device. It displays the method identity or PID for brief, the person operating the method, the command, the CPU and reminiscence utilization.

Common syntax for most sensible command:

$ most sensible [OPTIONS]
Listing all operating processes
most sensible

Use the most sensible command to show operating duties, reminiscence, cpu and switch. To near the window, press q

Instance: Let’s run the most sensible command in a terminal with none choices to peer the output.

list all running processlist all running process
Show processes of a selected person
most sensible -u [user]

The -u choice means that you can show all details about the operating processes of a selected person.

Instance: Showing operating processes of the root person.

display process of userdisplay process of user
Enabling Batch Mode
most sensible -b

To permit batch mode, use the -b choice. Batch mode sends the output of the most sensible command to a record or every other program.

Instance: Let’s use this way to pipe the result of the tar command into the instance.txt record.

batch modebatch mode
Get started from the similar state
most sensible -c

Use the -c way to view the state of the tar command because it used to be closed.

Instance: The use of the way to show the standing of processes for the reason that final time tar used to be closed.

start from same statestart from same state
Permit Safe Mode
most sensible -s

The -s choice means that you can protected the most sensible command. This feature prevents different customers from enhancing the period, restarting tar, or killing the method.

Instance: Let’s use protected mode and check out to edit the period time the usage of the d key. As you’ll see, strange customers can not do that.

enable secure modeenable secure mode
Set extend time of Display screen Updates
most sensible -d [seconds]

To specify the extend time between display updates within the output, use the -d choice.

Instance: Specifying the quantity 20 after the -d way to replace the output each and every 20 seconds.

screen update delay timescreen update delay time
Set the collection of iterations
most sensible -n [number]

Use the -n way to forestall updating statistics within the output after a definite collection of occasions.

Instance: Surroundings the iteration prohibit to five to replace statistics within the output

number of iterationnumber of iteration

The put up How to Use the Top Command in Linux seemed first on Hongkiat.

WordPress Website Development

[ continue ]