• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

top

Running Top by Process

September 11, 2022

Here’s how to isolate a process via the top command.

top -c -p $(pgrep -f process_name | head -20 | tr "\\n" "," | sed 's/,$//')

top -c -p $(pgrep -f process_name | head -20 | tr "\\n" "," | sed 's/,$//')

Filed Under: Linux Tagged With: isolate, process, run, top

Nmap Scan Top 1000 Ports

September 13, 2021

Use this option if you want to scan the top 1000 ports.

$ nmap -F 10.10.10.10

$ nmap -F 10.10.10.10

If you want a single specific port, then use -p option.

$ nmap -p 80 10.10.10.10

$ nmap -p 80 10.10.10.10

Filed Under: Linux Tagged With: 1000, nmap, ports, scan, specific, top

Top Shift i

January 8, 2021

When you run top on Linux with multiple processors, you can have processes with percentages higher than 100%. On a 4 core system, you can have a process that can run as high as 400%. To view it differently, press “shift i” while top is running. This will toggle the Irix mode to off. Pressing it again will turn it on. When the Irix mode is off, it will only show percentages divided by a total number of CPUs. This way, you get a true percentage of a process in a multiple core system.

Pressing 1 interestingly shows the breakdown of all CPUs.

Filed Under: Linux Tagged With: cpu, Irix, mode, percentage, top

iotop

November 22, 2020

iotop is a Linux command similar to top but instead of CPU and memory it will display and monitor your disk IO usage.

To install, run the following command based on your Linux ditro.

yum install iotop
apt install iotop
dnf install iotop

yum install iotop apt install iotop dnf install iotop

To use.

iotop
iotop -o

iotop iotop -o

Output:

Filed Under: Linux Tagged With: disk, io, iotop, top, usage

  • Home
  • About
  • Search

Copyright © 2023